Purpose of this notebook

The main purpose of this notebook is to create my own corona dashboard by pulling together interesting data visualizations I found elsewhere and adding some self-made visualizations.

I mainly want to play around with different types of visualizations and learn how to use them.

I attributed all sources correctly. Most dashboards were adopted from the amazing collection of https://covid19dashboards.com/.

Other interesting dashboards are:

Last updated of dataset: 02 May, 2020

Overview of latest stats

based on: https://covid19dashboards.com/covid-overview/

Latest Covid-19 numbers
Confirmed Cases
1,092,701
(+55,388)
Deaths
122,428
(+9,714)

Updated on May 02, 2020 ( +change since 5 days ago.)

Germany
Cases
164,967
(+6,209)
Deaths
6,812
(+686)
Italy
Cases
209,328
(+9,914)
Deaths
28,710
(+1,733)
Spain
Cases
216,582
(+7,117)
Deaths
25,100
(+1,579)

''

5 50 500
Country New Cases Total Cases Deaths Fatality
Apr. 22
May. 02
(+NEW) since Apr, 27
Spain
216,582 (+7,117) 25,100 (+1,579) 11.6%
Italy
209,328 (+9,914) 28,710 (+1,733) 13.7%
United Kingdom
183,500 (+25,152) 28,205 (+3,747) 15.4%
France
168,518 (+2,555) 24,763 (+1,467) 14.7%
Germany
164,967 (+6,209) 6,812 (+686) 4.1%
China
83,959 (+41) 4,637 (+0) 5.5%
Sweden
22,082 (+3,156) 2,669 (+395) 12.1%
Austria
15,558 (+284) 596 (+47) 3.8%
South Korea
10,793 (+41) 250 (+6) 2.3%
Denmark
9,605 (+709) 475 (+48) 4.9%
Norway
7,809 (+210) 211 (+6) 2.7%

New cases

Compare country trajectories

Covid-19 deaths per million inhabitants

source: https://covid19dashboards.com/covid-compare-permillion/

date Deaths per Million Log of Deaths per Million
Country
Austria 2020-05-02 68.227718 4.222851
China 2020-05-02 3.289778 1.190820
Denmark 2020-05-02 82.845692 4.416980
France 2020-05-02 368.352594 5.909041
Germany 2020-05-02 82.957609 4.418330
Italy 2020-05-02 483.659833 6.181382
Norway 2020-05-02 39.770925 3.683136
South Korea 2020-05-02 4.903671 1.589984
Spain 2020-05-02 541.481349 6.294309
Sweden 2020-05-02 269.304871 5.595844
United Kingdom 2020-05-02 426.175938 6.054852
United States 2020-05-02 204.552511 5.320825

Covid-19 confirmed cases per million inhabitants

source: https://covid19dashboards.com/covid-compare-permillion/

Flatten the curve

Let's have a look at the proportion of

  • confirmed
  • death
  • recovered

cases over time

#collapse
alt.Chart(df_melted.query("country.isin(@flatten_countries)")).mark_circle(
    opacity=0.8,
    stroke='black',
    strokeWidth=1
).encode(
    alt.X('date:T', axis=alt.Axis(labelAngle=45)),
    alt.Y('country:N'),
    alt.Size('value:Q',
        scale=alt.Scale(range=[0, 2000]),
        legend=alt.Legend(title='confirmed cases')
    ),
    alt.Color('country:N', legend=None)
).properties(
    width=850,
    height=820
).transform_filter(
    alt.datum.Entity != 'All natural disasters'
)

Guessing the number of infected cases https://covid19dashboards.com/covid-infected/

number of people tested

The effects of the lockdown

Take a look at raw numbers of new cases and see if a country lockdown had an effect

lockdowns = {'Spain': '3/15/20',
            'Italy': '3/10/20',
            'Wuhan': '1/23/20',
            'France': '3/15/20',
            'Ireland': '3/12/20',
            'Belgium': '3/15/20',
            'Germany': '3/16/20'}
#for curr_country in lockdowns:
curr_country = 'Germany'
alt.Chart(new_cases_melted_df.loc[new_cases_melted_df['country'] == curr_country]).mark_bar().encode(
    x='date:T',
    y='new_cases:Q',
     #color='country:N',
    column='country:N',
    color=alt.condition(
            alt.datum.Year == '2020',  # If the year is 1810 this test returns True,
    alt.value('orange'),     # which sets the bar orange.
    alt.value('steelblue')   # And if it's not true it sets the bar steelblue.
    )
).properties(
title='Number of new cases by Country',
width=250,
height=140

).properties(width=600)