CSSEGISandData / COVID-19

Novel Coronavirus (COVID-19) Cases, provided by JHU CSSE
https://systems.jhu.edu/research/public-health/ncov/
29.11k stars 18.39k forks source link

Minor request: format dates to be sortable as strings (in time series data) #1285

Open JetForMe opened 4 years ago

JetForMe commented 4 years ago

Hi there. Thank you for this work!

I was wondering if you could change the format of the date column headers to either be yy/mm/dd, or maybe day-of-year, to make it a simple integer with trivial sorting characteristics. Right now when post processing, one has to convert the string to a date, and the nature of Javascript CSV loading makes that expensive (it has to be done for every row).

Thanks!

EDIT: Oh, I guess it turns out to sort just fine as-is. But it will likely break once we get to October.

gwideman commented 4 years ago

Ideally a well-established ISO most-to-least significant date format such as YYYY-MM-DD. That doesn't nail down the time zone, but is a heck of a lot better than some other order, or missing leading zeroes. The basic point is to have it sort lexicographically in chronological order, without requiring the sorting tool (spreadsheet, database) to apply any special things it knows about numbers or punctuation etc. https://www.iso.org/iso-8601-date-and-time-format.html