The color and pop-up info of my polygons (zip codes) depend on a variable that takes many values for each polygon (One for each combination of few categories and dates).

I can see that the range of colors (and histograms with autostyle) takes all the values of the variable. The average is well done, but the color and the pop-up value of the polygons is not the average of all the values from each polygon. In the image with two values it takes the minimum value in both the color and the pop-up, but not always is neither the minimum value the chosen one.

enter image description here

I cannot make a new dataset with the mean values because they change depending on the filtering with other widgets

Is it possible that the color and the pop-up of the polygons reflect the average values of the variable they are showing?


When you apply style by value or autostyle to a layer, it generates automatically a TurboCARTO ramp. TurboCARTO is a CartoCSS preprocessor that allows CARTO users style their layers dynamically (for instance, when filtering with widgets) and without knowing their data. In your case, when filtering for just one value, as explained on TurboCARTO documentation, this gets the first (default) color.

But if you have a clear understanding of your data (breaks, distribution...), you can still apply traditional CartoCSS.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.