Overview: Creates data visualizations based on COVID-19 case data to look for trends. Note that this was a personal project and was never meant to be a finalized product. Contains 3 main data visualizations
- Map: Choose the level of COVID-19 case data you would like to view based on the tab level (Country, State, County). Choose a date by moving the slider or animate by clicking the play button. Choose a variable from the drop down menu (cases, deaths, death rate, recovered, active). Choose a category from the drop down menu (Total, per 100k, daily change, daily change per 100k, daily percentage change, days to double).
- Time Series: Choose the level of COVID-19 case data you would like to view based on the tab level (Country, State, County). Choose a variable from the drop down menu (cases, deaths, death rate, recovered, active). Choose a category from the drop down menu (Total, per 100k, daily change, daily change per 100k, daily percentage change, days to double). For the Country tab, enter a Country in the text box (ex: US), for the State tab, enter a state in the text box (ex: Illinois), for the County tab, enter in a state and a county (ex: Illinois, Cook). Can also log the data by clicking the check box.
- Time Series Comparison: This allows you to compare time series at different levels. Choose the level of COVID-19 case data you would like to view based on the tab level (Country, State, County). Choose a variable from the drop down menu (cases, deaths, death rate, recovered, active). Choose a category from the drop down menu (Total, per 100k, daily change, daily change per 100k, daily percentage change, days to double). For the County tab, choose a state by the drop down menu. Can log data by clicking the check box and highlight a certain line on the plot.
Notes: Must run data_analysis.Rmd first. This downloads all of the covid-19 case data (Source: Johns Hopkins University, https://github.com/CSSEGISandData/COVID-19/tree/master/csse_covid_19_data), analyzes it, and puts it in the format required by the data visualizations. To change the dates of the data that are grabbed by the script, change to_date and start_date for county data (lines 29 and 30) and to_date_state and start_date_state for state data (lines 51 and 52). Exports 4 files to be read in by the data visualizations (state_data_final3_test33.csv, county_data_final4_test30.csv, US_data_final2_test15.csv, country_data_final2_test10.csv). WARNING: This process is time consuming, computationally intensive, and can output large files.
To run the data visualization, run viz.Rmd. This might take a little bit to import all of the data exported by data_analysis.Rmd. To change dates of analysis, change lines 25 and 26 (to_date, start_date).