Loads State daily data from https://covidtracking.com/api/
Repos:
- https://www.dolthub.com/repositories/tomdottom/covid-tracking/
- https://github.com/tomdottom/covid-tracking
Use script:
./update.sh
Or just run:
curl http://covidtracking.com/api/states/daily.csv > states-daily
dolt table import --update-table states_daily states-daily.csv
NOTE: Data is updated at 2am via GitHub Actions.
dolt sql -x=ny-infection-rate
dolt sql << EOF
SELECT
date,
state,
positive,
positiveIncrease as positive_increase,
(100.0 * positiveIncrease/(positive - positiveIncrease)) as percentage_increase
FROM states_daily
WHERE state = 'NY'
AND positiveIncrease IS NOT NULL
ORDER BY date
;
EOF
dolt sql < queries/ny-infection-rate.sql
See docs/setup.md