Resolve "Add timezones to rainfall data"
Closes #45 (closed)
Data is downloaded and stored in UTC, and localized to station timezone for output. We can discuss changes to output formatting if desired.
- filter mesowest stations request to stations with precip data
- save additional columns including station name and timezone
- add
flowalert update_stations
command to fetch updated lists - add
flowalert update_data
--replace
argument
This is a pretty big change, but should make next steps easier. Would appreciate your feedback and testing of these changes.
To pull the changes locally for testing:
git fetch https://code.usgs.gov/ghsc/users/jmfee/FlowAlert 45-station-timezone
git checkout -b 45-station-timezone FETCH_HEAD
If you have an existing data directory, it can be updated to the new timezone-aware formats (may want to back up your data if you want to switch back to old code...)
# update stations to load timezone information
poetry run flowalert update_stations
# replace data with timezone aware, then load past 2 years of data
poetry run flowalert update_data --starttime 2021-01-01 --endtime 2021-06-01 --replace
poetry run flowalert update_data --starttime 2021-06-01 --endtime 2022-01-01
poetry run flowalert update_data --starttime 2022-01-01 --endtime 2022-06-01
poetry run flowalert update_data --starttime 2022-06-01
Edited by Jeremy M Fee