Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve automatic bracketing in maps to be usable #3640

Open
paarriagadap opened this issue May 23, 2024 · 3 comments
Open

Improve automatic bracketing in maps to be usable #3640

paarriagadap opened this issue May 23, 2024 · 3 comments

Comments

@paarriagadap
Copy link

paarriagadap commented May 23, 2024

Description

Improve the automatically generated map brackets to have a meaningful, usable option that don't involve manual processing every time. This is especially critical in large explorers (indicator-based or csv-based) or when we need to generate multiple charts for a Grapher ID-based explorer.

Expected behaviour

The system should not generate very specific brackets (see pictures below), but rounded, sensible options in the range of the full data (all the years) and following our map bracket guidelines.

Screenshots

For the indicator share in extreme poverty, this is the default behaviour:
Equal-interval strategy
share-of-population-living-in-extreme-poverty (3)

Quantiles strategy
share-of-population-living-in-extreme-poverty (2)

Ckmeans strategy
share-of-population-living-in-extreme-poverty (1)

We would like in this example that the brackets suggested would be something closer to
share-of-population-in-extreme-poverty (10)

Additional context

@marcelgerber
Copy link
Member

Additional context: This document outlines the binning strategies that ArcGIS provides (thanks Fiona!).

@pabloarosado
Copy link
Contributor

Thanks for writing this up, @paarriagadap. Creating map brackets is a big pain!

I've created a separate issue with a proposed implementation of how to improve the current tool in the chart admin. The current issue can be about deciding the optimal strategy (which I think can be harder to figure out).

But for explorers, there's no grapher admin tool, and I think we are from having one, so I've created this separate ETL issue to have something useful with streamlit.

@danyx23
Copy link
Contributor

danyx23 commented Jun 5, 2024

We talked about this today in data viz triage and yesterday in the data meeting and there is a good chance that @pabloarosado has time in his upcoming cycle to tackle this problem on the python side and come up with a good algorithm that comes close to our guilelines. Once this is done it should not be too much work to reimplement this in grapher.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants