https://fearless-dreamer.herokuapp.com/
- Download the TIGER files:
wget https://www2.census.gov/geo/tiger/TIGER2019/STATE/tl_2019_us_state.zip -O data/tl_2019_us_state.zip
wget https://www2.census.gov/geo/tiger/TIGER2019/COUNTY/tl_2019_us_county.zip -O data/tl_2019_us_county.zip
- Unzip the files (there should be a .shp, .shx, .dbf, .prj file for each)
- install Docker
docker-compose up postgres
- load tiger files into the database
docker build -f loader.Dockerfile -t loader . && docker run -it --network=demand-modeler_default loader
* if the network is not correct double check it with docker network ls
- start the API
docker-compose up --build api
- Create a Postgres service and link it to the application
heroku addons:create heroku-postgresql:hobby-dev
- Load the initial state and county shapefiles into the database using the
DATABASE_URL
parameter from Heroku
heroku config
export DATABASE_URL="{DBURL from heroku}
make load
- Install the Go and Nodejs buildpacks
heroku buildpacks:add heroku/nodejs
heroku buildpacks:add heroku/go
- Deploy
- Download the latest CSV file
- Copy into the
data/
directory with this name pattern: `covid19_county_2020_{month}_{day}-{time?}.csv - Perform manual cleaning
- Delete
New Death
column - Rename 'Walton, FL' to 'Walton County'
-
Run the go application and see if it barfs on the new data. Rinse, repeat until it works.
-
Download USAFacts death dataset
-
Verify top 10 counties in top 10 states in both datasets (USAFacts is source of truth)
-
Verify top-10 state value still matches what the dataset reports.
docker build -f usafacts_loader.Dockerfile -t usafacts . && docker run -it --network=demand-modeler_default usafacts