Open pabloarosado opened 8 months ago
@pabloarosado could you outline a bit more what you mean with missing data strategy? What should be the conditions to hide which kinds of data?
Hi @danyx23, what I meant is that, while for stacked area charts we have a missing data strategy dropdown menu (e.g. this chart)
for stacked discrete bar charts (e.g. this chart) we don't have that menu.
Currently, in stacked discrete bar charts, nans are treated like zeros (which would be the expected behavior if you chose "Show entities with missing data"). However, you may not want that and would prefer to hide entities if they have nans.
Core problem
We need to handle missing data in stacked discrete bar charts. Currently, the default behaviour is to treat missing data as zeros, but this causes lots of unacceptable chart views.
For example, Per capita energy from fossil fuels, nuclear and renewables chart shows that Norway and Sweden were 100% renewable in 1965. This happens simply because there is no data for fossil fuels until several years later.![per-capita-energy-source-stacked](https://github.com/owid/owid-grapher/assets/12246978/38493e47-7dbe-45ff-8e56-f5970bdfc10c)
Proposed solution
Context
For more context and several examples of unacceptable chart views: see https://github.com/owid/owid-issues/issues/1257