owid / owid-grapher

A platform for creating interactive data visualizations
https://ourworldindata.org
MIT License
1.4k stars 228 forks source link

Support date in Timeline selection in Grapher #3927

Open lucasrodes opened 2 months ago

lucasrodes commented 2 months ago

Core problem

In ETL, we sometimes work with time series with dates (not years). However, Grapher uses 'number of days since zeroDay' under the hood, and is not able to select dates in the Timeline selection.

image

Proposed solution

It'd be nice if we could render a date selector there. Or support date-like strings.

Context

For Grapher to support date format, we have been using a hack:

lucasrodes commented 2 months ago

Saloni was confused with the Timeline selection in https://github.com/owid/owid-issues/issues/1653

danyx23 commented 1 month ago

Maybe a simpler solution to this that could be done more quickly is to allow a YYYY-MM-DD format and just parse and translate that.