datalab-dev / covid_worksite_exposure

Scraping and visualizing the UC Davis Potential Worksite Exposure Reporting (AB 685) data
MIT License
6 stars 4 forks source link

Timeline Visual Failing - Adjust Year Assignment Logic in the Code #28

Closed MicheleTobias closed 2 years ago

MicheleTobias commented 2 years ago

Evidence:

The logic in our code is no longer working. It relied on December dates being from 2020, but now that it's December 2021, we have a problem. This will also be a problem in January when we switch to 2022, so we need to fix the code.

Possible solution: keep the columns with parsed dates from previous days rather than re-processing the dates every day. Only process new dates.

MicheleTobias commented 2 years ago

I added some (hopefully) better year assignment logic for the report date that usually comes in with no year. We keep the data we processed in previous days and only process new data that comes in, allowing us to not have to deal with more than two years at a time.