owid / owid-grapher

A platform for creating interactive data visualizations
https://ourworldindata.org
MIT License
1.39k stars 229 forks source link

Add center value for diverging map brackets #2166

Open paarriagadap opened 1 year ago

paarriagadap commented 1 year ago

Core problem

When using a diverging scale for a map, Grapher automatically defines a center value (where colors change) which doesn't necessarily reflect how the measure works.

Proposed solution

Adding a "center value" field into Grapher can fix this, expressing exactly where we want this transition point to happen.

Alternatives

The alternative, for now, is creating a symmetric range where the midpoint is exactly this transition point, but that generates brackets that do not cover the values as we might like.

Context

See original post in Slack. In this example, I would like the colors to start changing (from red to blue) from 0 and not from 4: image

The alternatives to fix this would be to create symmetrical brackets, as lgbt-policy-index (1) lgbt-policy-index (2) ... which is not ideal.

There are tools like Tableau that include this kind of functionality: image

sophiamersmann commented 1 year ago

Zero seems to be commonly used as the center value, but there are also other cases where centering around 1 or 50 makes sense (as mentioned by Ed on Slack):

danyx23 commented 6 months ago

Since #3488 requests another version of this feature we are bumping this one up in priority