Closed asizemore closed 7 months ago
should we be assigning colors to links here? that seems frontend work to me? do i misunderstand?
also, if getting things from a df to Network is in scope here, id bet a toJSON is as well?
We're really converting data to something that can be converted to color. That made no sense lol but take our correlation example. We start with correlation coeffs, plot.data should assign the sign of the correlation coefs to be the edge color (just +/- 1), then the frontend takes that "color" and maps it to actual hex colors. plot.data is the middle man that helps us say 'hey this data should be how we get color, and this is how we map it'. With our correlation case we could instead use a diverging gradient colormap, and in that case plot.data would make sure that the correlation coef itself gets added as the edge color. Did that make sense?
More than just accessors, we need to add the following methods that will allow us to get data into a Network. Since we're only getting data as dfs for now, will only add that method, but the approach would expand just fine to matrices, etc.