owid-grapher icon indicating copy to clipboard operation
owid-grapher copied to clipboard

Concept: types in grapher data model

Open larsyencken opened this issue 2 years ago • 2 comments

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)

larsyencken avatar Oct 04 '22 11:10 larsyencken

@pabloarosado Just a head up from the ETL side that this is something that we'd like to move towards.

larsyencken avatar Oct 04 '22 11:10 larsyencken

See https://github.com/owid/owid-grapher/issues/3376 for a list of things that we could improve if we knew data types

sophiamersmann avatar Jan 12 '24 12:01 sophiamersmann