This repository contains code (in the form of Python scripts) to obtain and visualize data about confirmed positive cases of COVID-19 in the cities and communities within LA County. It also includes sample data obtained from these scripts as well as sample plots.
We also post the latest plots every day on the following website: CoVID-19 Plots for LA County.
The Los Angeles Department of Public Health do a press release every day, which contains information about the number of CoVID-19 cases in Los Angeles County and its neighborhood. We provide a pointer to some of the press releases that were used for scraping the data below:
- March 16
- March 17
- March 18
- March 19
- March 20
- March 21
- March 22
- March 23
- March 24
- March 25
- March 26
- March 27
The scripts folder contains the python files needed to run and produce the data and plots in this repository. The script titled fetch_and_store.py web scrapes data from the above web sites and stores them in a JSON file for further processing, visualization, and analytics purposes. Also, we provide several scripts that plot heat maps and graph the risk estimation value for communities across time—these are prefixed with 'plot_' in the file name. These scripts have been created to process the press releases starting from 16th of March to 27th of March.
The requirements.txt file contains the modules needed to run these scripts and can be installed by running any of the following in the terminal:
- pip install -r requirements.txt
- conda install --file requirements.txt
For individuals interested in the data, you'll find the data folder to be useful. We provide CSV files of daily Covid-19 cases by community—file named Covid-19.csv. Similarly, this information can be found in JSON files, where the keys represent the "day" in March and the values denote the cases in each community in LA county—files named lacounty_covid.json and lacounty_total_case_count.json.
We have generated plots using the data retrieved from LA county press releases. These plots show the time-series data for confirmed COVID-19 positive cases (daily) and fatalities in the communities and cities within LA County that are showing the most number of cases.
For any questions about this data set or tools, please contact Dr. Gowri Sankar Ramachandran (gsramach@usc.edu) or Prof. Bhaskar Krishnamachari (bkrishna@usc.edu).