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

country selector: limit options surfaced to the user #2704

Closed
lucasrodes opened this issue Oct 5, 2023 · 3 comments
Closed

country selector: limit options surfaced to the user #2704

lucasrodes opened this issue Oct 5, 2023 · 3 comments

Comments

@lucasrodes
Copy link
Member

lucasrodes commented Oct 5, 2023

Core problem

In some charts, we want to limit the entities that the user can select from.

Context

Sometimes, we plot more than one indicator together. It can be that there is missing data for some of the indicators for some entities, and hence we don't want to show data for that entity.

For instance, in the joint plot of Population vs GDP, it could be that GDP for Holy See is unavailable, but Population is. In that case, we would prefer not to allow users to choose "Holy See" (because the chart would only show one of the relevant indicators: Population).

This was raised by Saloni here: https://github.com/owid/owid-issues/issues/1217#issuecomment-1748390214, in the context of a line chart that plots both cohort life expectancy and period life expectancy to compare them. Demo of the problem:

life-expectancy.mov

Proposed solution

It would be nice to have some flexibility in choosing the entities that are surfaced to the users. Maybe something similar to what we have for "Data to show" section, where we select the countries selected by default:

image

And (or) we could have an option (a checkbox?) with something like "show only entities that have data for all indicators shown in the chart".

@sophiamersmann
Copy link
Member

Is the Missing data section visible in the Data tab? If yes, does that solve the issue?

Screenshot 2023-10-05 at 13 24 26

@lucasrodes
Copy link
Member Author

Hi @sophiamersmann!
I tried setting that option, but it does not get there.

It now recognises that there is missing data (one of the indicators is missing), but it still shows the entity in the selection menu:

image

@sophiamersmann
Copy link
Member

Ahh, I understand. This is an annoying bug that is tracked here. We really want to fix it! (And will hopefully do so soon-ish)

I'll close this issue in favour of #1341. Thanks for reporting!

@sophiamersmann sophiamersmann closed this as not planned Won't fix, can't repro, duplicate, stale Oct 5, 2023
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

2 participants