owid-grapher
owid-grapher copied to clipboard
Concept: types in grapher data model
Problem
- The data processing in Grapher on the client is more complex than it needs to be because we don't know types
- Visualisation is more complex than it needs to be because we don't know types
- E.g. we don't know hierarchy between categorical variables (World vs Europe vs Sweden)
- E.g. we don't know that a categorical variable is in fact ordinal (Low Income, Middle Income, Upper Income)
- E.g. we can't auto-pick the best color palette because we don't know enough about the categorical variable
Proposed solution
- Add a type system to Grapher's data model that includes numeric, geo, and ordinal types (with optional ordering)
@pabloarosado Just a head up from the ETL side that this is something that we'd like to move towards.
See https://github.com/owid/owid-grapher/issues/3376 for a list of things that we could improve if we knew data types