Pulls COVID-19 / Coronavirus case data from the Florida Department of Health and stores it to a MongoDb instance.
Check out a working dashboard here.
Currently publishing embedded chart data at https://www.covid19florida.info/
The following instructions are for Windows 10.
Clone this repository:
git clone https://github.com/mariuspopovici/COVID-19-FL.git
Switch directory to the COVID-19-FL
folder.
cd COVID-19-FL
Install virtualenv:
pip install virtualenv
Create a new virtual environment:
virtualenv env
Activate the virtual environment:
.\env\Scripts\activate
pip install -r requirements.txt
You can download and install MongoDB locally or set up a cloud instance of MongoDB Atlas. See this video for instructions.
Also view this tutorial here.
Create a new database and two collections: florida and other_stats. Get the cluster URL and use it to create the configuration file below.
Edit sampleconfig.json and save it as config.json in the project folder.
{
"mongodb": {
"url": "mongodb+srv://<enter_your_mongodb_URL_here>",
"database": "<database_name>"
},
"other": {
"data_url": "http://www.floridahealth.gov/diseases-and-conditions/COVID-19/",
"dashboard_url": "<analytics_dasboard_url>"
},
"smtp": {
"user": "<your_email_address>",
"password": "<your_email_password>",
"email_from": "<from_email_address>",
"email_to": "<to_email_address>"
},
"api": {
"url": "https://services1.arcgis.com/CY1LXxl9zlJeBuRZ/ArcGIS/rest/services/Florida_COVID19_Case_Line_Data/FeatureServer/0/query",
"daily_url": "https://covidtracking.com/api/states/daily"
}
}
Alternatively, you can define these configuration settings as environment variables:
DATABASE_URL
DATABASE_NAME
DASHBOARD_URL
SMTP_USER
SMTP_PASSWORD
EMAIL_FROM
EMAIL_TO
API_URL
DAILY_STATS_API_URL
Execute the following command to pull the latest data and store new cases in our MongoDB instance.
python cv-api.py
- Florida Health for collecting detailed data and making it publicly available.
- The Covid Tracking Project for providing the API for daily test counts.
Case line data can be obtained from here.