As of March 7, 2021 we are no longer collecting new data. Learn about available federal data.
This repo implements an API that performs data processing tasks for COVID Tracking Project long-term care spreadsheets.
It contains various functions that receive CSV data from the sheets, process it, and output the processed data.
This project assumes you have Python 3.6. You can use pip install -r requirements.txt
to get dependencies, but it's recommended to use Conda (more container friendly later) to create the environment with all dependencies (see environment.yml
):
conda env create --file environment.yml
To run a local development server
export FLASK_APP=flask_server.py
flask run
This will start a local server at http://127.0.0.1:5000/.
You can now POST data to http://127.0.0.1:5000/api/echo
To spin up a whole stack using docker:
docker build -t cvapi .
docker run -it -p 8000:8000 cvapi
We're moving toward a single entry point to run all functions for a particular state. Like so:
FLASK_APP=flask_server.py flask process --states CA,MD --outfile=/tmp/ca.csv --overwrite-final-gsheet
Somewhat deprecated examples, soon to be fully deprecated:
flask quality_checks "https://docs.google.com/spreadsheets/d/1r7DU4FN_spe71nMa2lsIXAXgGEBw8mwyryiDlby3Q6w/edit#gid=273523772"