COVID-19 Outbreak Analysis 🌍 🔬
- 1. From epidemic to pandemic
- 2. Confirmed cases throughout the world
- 3. China compared to the rest of the world
- 4. Let’s annotate!
- 5. Adding a trend line to China
- 6. And the rest of the world?
- 7. Adding a logarithmic scale
- 8. Which countries outside of China have been hit hardest?
- 9. Plotting hardest hit countries as of Mid-March 2020
1. From epidemic to pandemic
In December 2019, COVID-19 coronavirus was first identified in the Wuhan region of China. By March 11, 2020, the World Health Organization (WHO) categorized the COVID-19 outbreak as a pandemic. A lot has happened in the months in between with major outbreaks in Iran, South Korea, and Italy.
We know that COVID-19 spreads through respiratory droplets, such as through coughing, sneezing, or speaking. But, how quickly did the virus spread across the globe? And, can we see any effect from country-wide policies, like shutdowns and quarantines?
Fortunately, organizations around the world have been collecting data so that governments can monitor and learn from this pandemic. Notably, the Johns Hopkins University Center for Systems Science and Engineering created a publicly available data repository to consolidate this data from sources like the WHO, the Centers for Disease Control and Prevention (CDC), and the Ministry of Health from multiple countries.
In this notebook, you will visualize COVID-19 data from the first several weeks of the outbreak to see at what point this virus became a global pandemic.
Please note that information and data regarding COVID-19 is frequently being updated. The data used in this project was pulled on March 17, 2020, and should not be considered to be the most up to date data available.
2. Confirmed cases throughout the world
The table above shows the cumulative confirmed cases of COVID-19 worldwide by date. Just reading numbers in a table makes it hard to get a sense of the scale and growth of the outbreak. Let’s draw a line plot to visualize the confirmed cases worldwide.
3. China compared to the rest of the world
The y-axis in that plot is pretty scary, with the total number of confirmed cases around the world approaching 200,000. Beyond that, some weird things are happening: there is an odd jump in mid February, then the rate of new cases slows down for a while, then speeds up again in March. We need to dig deeper to see what is happening.
Early on in the outbreak, the COVID-19 cases were primarily centered in China. Let’s plot confirmed COVID-19 cases in China and the rest of the world separately to see if it gives us any insight.
We’ll build on this plot in future tasks. One thing that will be important for the following tasks is that you add aesthetics within the line geometry of your ggplot, rather than making them global aesthetics.
## Rows: 112
## Columns: 4
## $ is_china <chr> "China", "China", "China", "China", "China", "China", "China…
## $ date <date> 2020-01-22, 2020-01-23, 2020-01-24, 2020-01-25, 2020-01-26,…
## $ cases <dbl> 548, 95, 277, 486, 669, 802, 2632, 578, 2054, 1661, 2089, 47…
## $ cum_cases <dbl> 548, 643, 920, 1406, 2075, 2877, 5509, 6087, 8141, 9802, 118…
4. Let’s annotate!
Wow! The two lines have very different shapes. In February, the majority of cases were in China. That changed in March when it really became a global outbreak: around March 14, the total number of cases outside China overtook the cases inside China. This was days after the WHO declared a pandemic.
There were a couple of other landmark events that happened during the outbreak. For example, the huge jump in the China line on February 13, 2020 wasn’t just a bad day regarding the outbreak; China changed the way it reported figures on that day (CT scans were accepted as evidence for COVID-19, rather than only lab tests).
By annotating events like this, we can better interpret changes in the plot.
5. Adding a trend line to China
When trying to assess how big future problems are going to be, we need a measure of how fast the number of cases is growing. A good starting point is to see if the cases are growing faster or slower than linearly.
There is a clear surge of cases around February 13, 2020, with the reporting change in China. However, a couple of days after, the growth of cases in China slows down. How can we describe COVID-19’s growth in China after February 15, 2020?
6. And the rest of the world?
From the plot above, the growth rate in China is slower than linear. That’s great news because it indicates China has at least somewhat contained the virus in late February and early March.
How does the rest of the world compare to linear growth?
7. Adding a logarithmic scale
From the plot above, we can see a straight line does not fit well at all, and the rest of the world is growing much faster than linearly. What if we added a logarithmic scale to the y-axis?
8. Which countries outside of China have been hit hardest?
With the logarithmic scale, we get a much closer fit to the data. From a data science point of view, a good fit is great news. Unfortunately, from a public health point of view, that means that cases of COVID-19 in the rest of the world are growing at an exponential rate, which is terrible news.
Not all countries are being affected by COVID-19 equally, and it would be helpful to know where in the world the problems are greatest. Let’s find the countries outside of China with the most confirmed cases in our dataset.
## Rows: 13,272
## Columns: 5
## $ country <chr> "Afghanistan", "Albania", "Algeria", "Andorra", "Antigua and…
## $ province <chr> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, …
## $ date <date> 2020-01-22, 2020-01-22, 2020-01-22, 2020-01-22, 2020-01-22,…
## $ cases <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, …
## $ cum_cases <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, …
9. Plotting hardest hit countries as of Mid-March 2020
Even though the outbreak was first identified in China, there is only one country from East Asia (South Korea) in the above table. Four of the listed countries (France, Germany, Italy, and Spain) are in Europe and share borders. To get more context, we can plot these countries’ confirmed cases over time.
Finally, congratulations on getting to the last step! If you would like to continue making visualizations or find the hardest hit countries as of today, you can do your own analyses with the latest data available here.
## Rows: 2,030
## Columns: 3
## $ country <chr> "Germany", "Iran", "Italy", "Korea, South", "Spain", "US", "…
## $ date <date> 2020-02-18, 2020-02-18, 2020-02-18, 2020-02-18, 2020-02-18,…
## $ cum_cases <dbl> 16, 0, 3, 31, 2, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,…