owid / owid-grapher

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

map brackets: show number of countries in each bracket #3774

Open lucasrodes opened 3 weeks ago

lucasrodes commented 3 weeks ago

Core problem

When looking at a map, it'd be nice if the user could quickly know how many countries that fall in each of the categories (or bracket limits).

Proposed solution

When hovering over the map brackets, we could show the number of countries that fall in that range. Find below two half-baked ideas on how this could look like (WARNING: this is just a quick draft)

Demo 1

Simple solution, show the counts in numbers above the brackets. Highlight the one selected somehow (in this example, by bolding its font).

option_1

Demo 2

Along the counts, expand the brackets to represent a distribution (like bins). To do so, we'd have to move the bracket range limit labels to the bottom.

option_b

danyx23 commented 2 weeks ago

This is a nice idea (we especially liked the scaling by popluation) but in practice we are not sure it's worth the effort. The numer of countries seems like a relatively minor benefit. Scaling by population (and doing something like a transposed Marimekko) would be interesting but the legend doesn't have white space around it in the normal case and we probably don't want to rescale the rest of the chart when hovering.

All together we think there are too many open questions and headaches for this to be worth it - sorry!

lucasrodes commented 2 weeks ago

@danyx23 unsure if you wanted to close this issue? In case that was your intention, this is just a reminder. Also, some notes: