Visualizing COVID-19 Data with Shiny

Philippe Heitzmann
Posted on Jun 7, 2020

Link to R Shiny project: https://philippe1.shinyapps.io/ShinyProject/ 

The number COVID-19-related deaths recently surpassed the 100,000+ mark in the United States and is sadly on track to keep growing before an effective vaccine can be researched, manufactured and successfully delivered to the millions of Americans who will depend on it to resume their lives. Until then, disseminating accurate and timely information on the spread of the disease and its associated death toll will be a crucial part of any effective and coordinated response as many world governments have already realized. To this end, the purpose of this Shiny project was to offer the user different visualizations of US COVID-19 data recording new cases and deaths at the state and county level and which is published on a daily basis by the New York Times (see here for the repository). 

The app shows bar charts, scatter plots, lollipop charts and state-level maps displaying case and death counts in the US, over time. These visualizations answer the following questions:

1. Which US states have the largest or smallest COVID-19 case counts today?

2. Which US states have the largest or smallest COVID-19 death counts today?

3. Which US states had the largest or smallest COVID-19 case counts at [x] date?

4. Which US states had the largest or smallest COVID-19 case counts at [x] date?

5. How have contagion rates evolved in [x] state since the beginning of the outbreak?

6. How have death rates evolved in [x] state since the beginning of the outbreak?

7. How did absolute COVID-19 case counts compare between [x] and [y] states at [z] date?

8. How did absolute COVID-19 related deaths counts compare between [x] and [y] states at [z] date?

9. How much of the total case count number in the US does [x] state account for?

10. How much of the total death count number in the US does [x] state account for?

The first page of the App displays a side-by-side histogram comparison of number of cases and COVID-19-related deaths for two states that the user selects using the two left-hand side menu dropdowns. The user can furthermore input the date for which they want to dynamically visualize the data on different dates using the bottom-most dropdown selector. 

The second page displays a time-series scatter plot comparison of the growth in number of cases and deaths for two states selected by the user. The app dynamically updates the scatterplots once new state selections are made. 

The third page of the app displays a lollipop chart comparison of cases and COVID-19 related deaths for different states. This chart perspective gives the user a more holistic view of state-by-state differences in COVID-19 cases in order to better understand differences at a more macro level.

Lastly, the fourth page presents a color-coded map view of COVID-19 cases and deaths. Similarly to the lollipop chart, this map intends to provide the user with a more macro view of US state differences in COVID-19 cases and deaths. As the user hovers their mouse over the different states shown in the map, pop-ups will reactively appear with the total number of cases and deaths for that state. 

Future areas of focus to improve this App will be to join this dataset with a state and county demographic dataset in order to derive per capita death and case rates and to get a more accurate picture of which states and counties have fared the best in containing the spread of the disease. Taking this one step further, this demographic data could also be used to show scatterplot regressions between average age and per capita deaths or cases, literacy rates and per capita deaths or cases, poverty rates and per capita deaths or cases, etc to better inform policy makers as to which communities in which counties are the most vulnerable to the disease. 

My contact info is [email protected] if you would like to discuss this project. Thanks for reading!

About Author

Philippe Heitzmann

Philippe Heitzmann

Philippe is an aspiring data scientist with a track record of using data to drive significant and tangible business results in the Sales & Trading and financial advisory fields. He has hands on experience in R and Python...
View all posts by Philippe Heitzmann >

Leave a Comment

No comments found.

View Posts by Categories


Our Recent Popular Posts


View Posts by Tags

#python #trainwithnycdsa 2019 airbnb Alex Baransky alumni Alumni Interview Alumni Reviews Alumni Spotlight alumni story Alumnus API Application artist aws beautiful soup Best Bootcamp Best Data Science 2019 Best Data Science Bootcamp Best Data Science Bootcamp 2020 Best Ranked Big Data Book Launch Book-Signing bootcamp Bootcamp Alumni Bootcamp Prep Bundles California Cancer Research capstone Career Career Day citibike clustering Coding Course Demo Course Report D3.js data Data Analyst data science Data Science Academy Data Science Bootcamp Data science jobs Data Science Reviews Data Scientist Data Scientist Jobs data visualization Deep Learning Demo Day Discount dplyr employer networking feature engineering Finance Financial Data Science Flask gbm Get Hired ggplot2 googleVis Hadoop higgs boson Hiring hiring partner events Hiring Partners Industry Experts Instructor Blog Instructor Interview Job Job Placement Jobs Jon Krohn JP Morgan Chase Kaggle Kickstarter lasso regression Lead Data Scienctist Lead Data Scientist leaflet linear regression Logistic Regression machine learning Maps matplotlib Medical Research Meet the team meetup Networking neural network Neural networks New Courses nlp NYC NYC Data Science nyc data science academy NYC Open Data NYCDSA NYCDSA Alumni Online Online Bootcamp Online Training Open Data painter pandas Part-time Portfolio Development prediction Prework Programming PwC python python machine learning python scrapy python web scraping python webscraping Python Workshop R R language R Programming R Shiny r studio R Visualization R Workshop R-bloggers random forest Ranking recommendation recommendation system regression Remote remote data science bootcamp Scrapy scrapy visualization seaborn Selenium sentiment analysis Shiny Shiny Dashboard Spark Special Special Summer Sports statistics streaming Student Interview Student Showcase SVM Switchup Tableau team TensorFlow Testimonial tf-idf Top Data Science Bootcamp twitter visualization web scraping Weekend Course What to expect word cloud word2vec XGBoost yelp