Skip to content

Notebooks to generate visualizations of COVID-19 data from JHU CSSE

Notifications You must be signed in to change notification settings

naveenv92/covid-19-visualization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 

Repository files navigation

COVID-19 Data Visualizations 📈📊📉

Set of data visualizations for COVID-19 data from Johns Hopkins CSSE department. Charts of time series trends are inspired by the plot from this article in the Financial Times, graphics by John Burn-Murdoch.

The file covid_visualization.ipynb contains a set of functions for extracting key pieces of data from the JHU dataset. Feel free to use or adapt these functions for your specific use case:

Functions

covidData(country, output=1, start=100)

Extracts time series data of interest for a specific country

country – string with country name of interest
output – type of output (1 for confirmed cases, 2 for recovered cases, 3 for deaths, 4 for net (open) cases – default 1)
start – number of cases after which to report data (e.g. starting after the nth case – default 100)

 

doubling_rate(country, output=1)

Returns the projected doubling rate as well as the most recent doubling event

The growth rate (r) is calculated from the difference in cases between the most recent data point and two days prior:

xn = xn – 2 · (1 + r)2

From the value of r, the projected number of days for doubling (n) can be calculated:

(1 + r)n = 2

country – string with country name of interest
output – type of output (1 for confirmed cases, 2 for recovered cases, and 3 for deaths – default 1)