Simple Visualization for Weather Data---Data Tree Management


I’m using Grasshopper to generate simple visualizations of temperature and wind readings I have taken from a study site (see image). I am representing the sequence of data readings as an array of lines, in which the distance of the offset for the array is based on a temperature reading. The hotter the temperature, the closer the lines. The result is a pattern symbolizing gradients of temperature change as I walk through space.

I’m using lunchbox to apply a color gradient to the array. The problem I am having is this: I have 96 data points in my data collection. I use this data to create values in a color gradient. However, I have 768 lines to apply this data to (96 for each data reading, which are then arrayed 8 times each to create the pattern). Is there a simple way for me to apply the 96 color values to the 768 lines (96 branches with 8 items each)?

Thank you!
Path Sequence Volume (20.1 KB)

Internalize data and post your script if you want more specific help but the answer here is most likely to use the “Remap Numbers” component.

Thanks—I added the script to the original post.

I think this would do it…

a common approach to structuring color data into a gradient is to get the bounds(upper and lower limits of the data being evaluated by the gradient component) and use those for L0 and L1.

In your file, by grafting the S input of the shader component, you are creating 96 colors, (one color per branch). Your Geometry is already sorted into 96 branches, (each branch having 8 items). The result is that you are effectively assigning a unique color to every branch…

Thank you!! This worked!

1 Like