nflverse / nflreadr

Efficiently download nflverse data
https://nflreadr.nflverse.com/
Other
61 stars 12 forks source link

Export nflverse timezone #250

Closed mrcaseb closed 3 months ago

mrcaseb commented 3 months ago

What happened: arrow v17 introduced some weird attribute type checks that lead to infinite loops with some data types such as the output of packageVersion or POSIX types. We used the latter in nflversedata to save the data timestamp as attribute in the data. nflreadr uses this timestamp in its print method. The arrow problem forced us into changing the timestamp attribute to character format (that's probably saver anyways).

If we want to be able to convert timestamps to whatever we want, e.g. local user timezone, we need to define timezones both when saving the data and when using the data. That's why we define a new nflverse_data_timezone variable to centralize the base timezone we use everywhere from now on. Tan wanted "America/Toronto" and I don't care. So here we are

mrcaseb commented 3 months ago

Checks and tests will fail because of the problem this PR will fix together with https://github.com/nflverse/nflverse-data/pull/49 and a data rebuild