In [1]:
%config InlineBackend.figure_formats = ['svg']
import oscovida as ov
In [2]:
ov.display_binder_link("tutorial-acessing-cases-and-deaths.ipynb")

OSCOVIDA Tutorial:

Loading COVID19 data on cases and infections for a country

The main function to access numbers of infections and deaths as a function of time is get_country_data. Here are some examples:

In [3]:
cases, deaths = ov.get_country_data("Italy")

We now have a Pandas Series object with the cases and the deaths:

In [4]:
cases
Out[4]:
2020-01-22         0
2020-01-23         0
2020-01-24         0
2020-01-25         0
2020-01-26         0
               ...  
2020-10-22    465726
2020-10-23    484869
2020-10-24    504509
2020-10-25    525782
2020-10-26    542789
Freq: D, Name: Italy cases, Length: 279, dtype: object
In [5]:
deaths
Out[5]:
2020-01-22        0
2020-01-23        0
2020-01-24        0
2020-01-25        0
2020-01-26        0
              ...  
2020-10-22    36968
2020-10-23    37059
2020-10-24    37210
2020-10-25    37338
2020-10-26    37479
Freq: D, Name: Italy deaths, Length: 279, dtype: object

As a quick check, we can plot the cumulative numbers we have retrieved:

In [6]:
cases.plot();

Or, if we are interested in the changes from day to day (i.e. to see the new infection per day as a function of time), we can use the diff() function that is provided for the Series object:

In [7]:
cases.diff().plot();

To obtain a list of country names, one can use these commands:

In [8]:
world = ov.fetch_cases()
sorted(world.index.drop_duplicates())
Out[8]:
['Afghanistan',
 'Albania',
 'Algeria',
 'Andorra',
 'Angola',
 'Antigua and Barbuda',
 'Argentina',
 'Armenia',
 'Australia',
 'Austria',
 'Azerbaijan',
 'Bahamas',
 'Bahrain',
 'Bangladesh',
 'Barbados',
 'Belarus',
 'Belgium',
 'Belize',
 'Benin',
 'Bhutan',
 'Bolivia',
 'Bosnia and Herzegovina',
 'Botswana',
 'Brazil',
 'Brunei',
 'Bulgaria',
 'Burkina Faso',
 'Burma',
 'Burundi',
 'Cabo Verde',
 'Cambodia',
 'Cameroon',
 'Canada',
 'Central African Republic',
 'Chad',
 'Chile',
 'China',
 'Colombia',
 'Comoros',
 'Congo (Brazzaville)',
 'Congo (Kinshasa)',
 'Costa Rica',
 "Cote d'Ivoire",
 'Croatia',
 'Cuba',
 'Cyprus',
 'Czechia',
 'Denmark',
 'Diamond Princess',
 'Djibouti',
 'Dominica',
 'Dominican Republic',
 'Ecuador',
 'Egypt',
 'El Salvador',
 'Equatorial Guinea',
 'Eritrea',
 'Estonia',
 'Eswatini',
 'Ethiopia',
 'Fiji',
 'Finland',
 'France',
 'Gabon',
 'Gambia',
 'Georgia',
 'Germany',
 'Ghana',
 'Greece',
 'Grenada',
 'Guatemala',
 'Guinea',
 'Guinea-Bissau',
 'Guyana',
 'Haiti',
 'Holy See',
 'Honduras',
 'Hungary',
 'Iceland',
 'India',
 'Indonesia',
 'Iran',
 'Iraq',
 'Ireland',
 'Israel',
 'Italy',
 'Jamaica',
 'Japan',
 'Jordan',
 'Kazakhstan',
 'Kenya',
 'Korea, South',
 'Kosovo',
 'Kuwait',
 'Kyrgyzstan',
 'Laos',
 'Latvia',
 'Lebanon',
 'Lesotho',
 'Liberia',
 'Libya',
 'Liechtenstein',
 'Lithuania',
 'Luxembourg',
 'MS Zaandam',
 'Madagascar',
 'Malawi',
 'Malaysia',
 'Maldives',
 'Mali',
 'Malta',
 'Mauritania',
 'Mauritius',
 'Mexico',
 'Moldova',
 'Monaco',
 'Mongolia',
 'Montenegro',
 'Morocco',
 'Mozambique',
 'Namibia',
 'Nepal',
 'Netherlands',
 'New Zealand',
 'Nicaragua',
 'Niger',
 'Nigeria',
 'North Macedonia',
 'Norway',
 'Oman',
 'Pakistan',
 'Panama',
 'Papua New Guinea',
 'Paraguay',
 'Peru',
 'Philippines',
 'Poland',
 'Portugal',
 'Qatar',
 'Romania',
 'Russia',
 'Rwanda',
 'Saint Kitts and Nevis',
 'Saint Lucia',
 'Saint Vincent and the Grenadines',
 'San Marino',
 'Sao Tome and Principe',
 'Saudi Arabia',
 'Senegal',
 'Serbia',
 'Seychelles',
 'Sierra Leone',
 'Singapore',
 'Slovakia',
 'Slovenia',
 'Solomon Islands',
 'Somalia',
 'South Africa',
 'South Sudan',
 'Spain',
 'Sri Lanka',
 'Sudan',
 'Suriname',
 'Sweden',
 'Switzerland',
 'Syria',
 'Taiwan*',
 'Tajikistan',
 'Tanzania',
 'Thailand',
 'Timor-Leste',
 'Togo',
 'Trinidad and Tobago',
 'Tunisia',
 'Turkey',
 'US',
 'Uganda',
 'Ukraine',
 'United Arab Emirates',
 'United Kingdom',
 'Uruguay',
 'Uzbekistan',
 'Venezuela',
 'Vietnam',
 'West Bank and Gaza',
 'Western Sahara',
 'Yemen',
 'Zambia',
 'Zimbabwe']

Regional information within countries

For some countries, such as Germany and the US, further regional information is available:

Germany

In Germany, there is a two-level subclassification: there are 16 Bundeslaender (called regions in oscovida) and for each Bundesland there are many Landkreise (called 'subregions' in oscovida).

Here is how to retrieve such data, for example for the Bundesland Schleswig-Holstein:

In [8]:
cases, deaths = ov.get_country_data("Germany", region="Schleswig-Holstein")
In [9]:
cases.diff().plot();

To retrieve data for a Landkreis, we can use this notation: (It is not necessary to specify the region here, as the subregions within Germany are unique)

In [10]:
cases, deaths = ov.get_country_data("Germany", subregion="LK Pinneberg")
In [11]:
cases.diff().plot();

To get a list of regions in Germany, we can use:

In [12]:
germany = ov.fetch_data_germany()
sorted(germany['Bundesland'].drop_duplicates())
Out[12]:
['Baden-Württemberg',
 'Bayern',
 'Berlin',
 'Brandenburg',
 'Bremen',
 'Hamburg',
 'Hessen',
 'Mecklenburg-Vorpommern',
 'Niedersachsen',
 'Nordrhein-Westfalen',
 'Rheinland-Pfalz',
 'Saarland',
 'Sachsen',
 'Sachsen-Anhalt',
 'Schleswig-Holstein',
 'Thüringen']

Similarly, to find the Landkreise, we can use:

In [13]:
germany = ov.fetch_data_germany()
sorted(germany['Landkreis'].drop_duplicates())
Out[13]:
['LK Ahrweiler',
 'LK Aichach-Friedberg',
 'LK Alb-Donau-Kreis',
 'LK Altenburger Land',
 'LK Altenkirchen',
 'LK Altmarkkreis Salzwedel',
 'LK Altötting',
 'LK Alzey-Worms',
 'LK Amberg-Sulzbach',
 'LK Ammerland',
 'LK Anhalt-Bitterfeld',
 'LK Ansbach',
 'LK Aschaffenburg',
 'LK Augsburg',
 'LK Aurich',
 'LK Bad Dürkheim',
 'LK Bad Kissingen',
 'LK Bad Kreuznach',
 'LK Bad Tölz-Wolfratshausen',
 'LK Bamberg',
 'LK Barnim',
 'LK Bautzen',
 'LK Bayreuth',
 'LK Berchtesgadener Land',
 'LK Bergstraße',
 'LK Bernkastel-Wittlich',
 'LK Biberach',
 'LK Birkenfeld',
 'LK Bitburg-Prüm',
 'LK Bodenseekreis',
 'LK Borken',
 'LK Breisgau-Hochschwarzwald',
 'LK Burgenlandkreis',
 'LK Böblingen',
 'LK Börde',
 'LK Calw',
 'LK Celle',
 'LK Cham',
 'LK Cloppenburg',
 'LK Coburg',
 'LK Cochem-Zell',
 'LK Coesfeld',
 'LK Cuxhaven',
 'LK Dachau',
 'LK Dahme-Spreewald',
 'LK Darmstadt-Dieburg',
 'LK Deggendorf',
 'LK Diepholz',
 'LK Dillingen a.d.Donau',
 'LK Dingolfing-Landau',
 'LK Dithmarschen',
 'LK Donau-Ries',
 'LK Donnersbergkreis',
 'LK Düren',
 'LK Ebersberg',
 'LK Eichsfeld',
 'LK Eichstätt',
 'LK Elbe-Elster',
 'LK Emmendingen',
 'LK Emsland',
 'LK Ennepe-Ruhr-Kreis',
 'LK Enzkreis',
 'LK Erding',
 'LK Erlangen-Höchstadt',
 'LK Erzgebirgskreis',
 'LK Esslingen',
 'LK Euskirchen',
 'LK Forchheim',
 'LK Freising',
 'LK Freudenstadt',
 'LK Freyung-Grafenau',
 'LK Friesland',
 'LK Fulda',
 'LK Fürstenfeldbruck',
 'LK Fürth',
 'LK Garmisch-Partenkirchen',
 'LK Germersheim',
 'LK Gießen',
 'LK Gifhorn',
 'LK Goslar',
 'LK Gotha',
 'LK Grafschaft Bentheim',
 'LK Greiz',
 'LK Groß-Gerau',
 'LK Göppingen',
 'LK Görlitz',
 'LK Göttingen',
 'LK Günzburg',
 'LK Gütersloh',
 'LK Hameln-Pyrmont',
 'LK Harburg',
 'LK Harz',
 'LK Havelland',
 'LK Haßberge',
 'LK Heidekreis',
 'LK Heidenheim',
 'LK Heilbronn',
 'LK Heinsberg',
 'LK Helmstedt',
 'LK Herford',
 'LK Hersfeld-Rotenburg',
 'LK Herzogtum Lauenburg',
 'LK Hildburghausen',
 'LK Hildesheim',
 'LK Hochsauerlandkreis',
 'LK Hochtaunuskreis',
 'LK Hof',
 'LK Hohenlohekreis',
 'LK Holzminden',
 'LK Höxter',
 'LK Ilm-Kreis',
 'LK Jerichower Land',
 'LK Kaiserslautern',
 'LK Karlsruhe',
 'LK Kassel',
 'LK Kelheim',
 'LK Kitzingen',
 'LK Kleve',
 'LK Konstanz',
 'LK Kronach',
 'LK Kulmbach',
 'LK Kusel',
 'LK Kyffhäuserkreis',
 'LK Lahn-Dill-Kreis',
 'LK Landsberg a.Lech',
 'LK Landshut',
 'LK Leer',
 'LK Leipzig',
 'LK Lichtenfels',
 'LK Limburg-Weilburg',
 'LK Lindau',
 'LK Lippe',
 'LK Ludwigsburg',
 'LK Ludwigslust-Parchim',
 'LK Lörrach',
 'LK Lüchow-Dannenberg',
 'LK Lüneburg',
 'LK Main-Kinzig-Kreis',
 'LK Main-Spessart',
 'LK Main-Tauber-Kreis',
 'LK Main-Taunus-Kreis',
 'LK Mainz-Bingen',
 'LK Mansfeld-Südharz',
 'LK Marburg-Biedenkopf',
 'LK Mayen-Koblenz',
 'LK Mecklenburgische Seenplatte',
 'LK Meißen',
 'LK Merzig-Wadern',
 'LK Mettmann',
 'LK Miesbach',
 'LK Miltenberg',
 'LK Minden-Lübbecke',
 'LK Mittelsachsen',
 'LK Märkisch-Oderland',
 'LK Märkischer Kreis',
 'LK Mühldorf a.Inn',
 'LK München',
 'LK Neckar-Odenwald-Kreis',
 'LK Neu-Ulm',
 'LK Neuburg-Schrobenhausen',
 'LK Neumarkt i.d.OPf.',
 'LK Neunkirchen',
 'LK Neustadt a.d.Aisch-Bad Windsheim',
 'LK Neustadt a.d.Waldnaab',
 'LK Neuwied',
 'LK Nienburg (Weser)',
 'LK Nordfriesland',
 'LK Nordhausen',
 'LK Nordsachsen',
 'LK Nordwestmecklenburg',
 'LK Northeim',
 'LK Nürnberger Land',
 'LK Oberallgäu',
 'LK Oberbergischer Kreis',
 'LK Oberhavel',
 'LK Oberspreewald-Lausitz',
 'LK Odenwaldkreis',
 'LK Oder-Spree',
 'LK Offenbach',
 'LK Oldenburg',
 'LK Olpe',
 'LK Ortenaukreis',
 'LK Osnabrück',
 'LK Ostalbkreis',
 'LK Ostallgäu',
 'LK Osterholz',
 'LK Ostholstein',
 'LK Ostprignitz-Ruppin',
 'LK Paderborn',
 'LK Passau',
 'LK Peine',
 'LK Pfaffenhofen a.d.Ilm',
 'LK Pinneberg',
 'LK Plön',
 'LK Potsdam-Mittelmark',
 'LK Prignitz',
 'LK Rastatt',
 'LK Ravensburg',
 'LK Recklinghausen',
 'LK Regen',
 'LK Regensburg',
 'LK Rems-Murr-Kreis',
 'LK Rendsburg-Eckernförde',
 'LK Reutlingen',
 'LK Rhein-Erft-Kreis',
 'LK Rhein-Hunsrück-Kreis',
 'LK Rhein-Kreis Neuss',
 'LK Rhein-Lahn-Kreis',
 'LK Rhein-Neckar-Kreis',
 'LK Rhein-Pfalz-Kreis',
 'LK Rhein-Sieg-Kreis',
 'LK Rheingau-Taunus-Kreis',
 'LK Rheinisch-Bergischer Kreis',
 'LK Rhön-Grabfeld',
 'LK Rosenheim',
 'LK Rostock',
 'LK Rotenburg (Wümme)',
 'LK Roth',
 'LK Rottal-Inn',
 'LK Rottweil',
 'LK Saale-Holzland-Kreis',
 'LK Saale-Orla-Kreis',
 'LK Saalekreis',
 'LK Saalfeld-Rudolstadt',
 'LK Saar-Pfalz-Kreis',
 'LK Saarlouis',
 'LK Salzlandkreis',
 'LK Sankt Wendel',
 'LK Schaumburg',
 'LK Schleswig-Flensburg',
 'LK Schmalkalden-Meiningen',
 'LK Schwalm-Eder-Kreis',
 'LK Schwandorf',
 'LK Schwarzwald-Baar-Kreis',
 'LK Schweinfurt',
 'LK Schwäbisch Hall',
 'LK Segeberg',
 'LK Siegen-Wittgenstein',
 'LK Sigmaringen',
 'LK Soest',
 'LK Sonneberg',
 'LK Spree-Neiße',
 'LK Stade',
 'LK Stadtverband Saarbrücken',
 'LK Starnberg',
 'LK Steinburg',
 'LK Steinfurt',
 'LK Stendal',
 'LK Stormarn',
 'LK Straubing-Bogen',
 'LK Sächsische Schweiz-Osterzgebirge',
 'LK Sömmerda',
 'LK Südliche Weinstraße',
 'LK Südwestpfalz',
 'LK Teltow-Fläming',
 'LK Tirschenreuth',
 'LK Traunstein',
 'LK Trier-Saarburg',
 'LK Tuttlingen',
 'LK Tübingen',
 'LK Uckermark',
 'LK Uelzen',
 'LK Unna',
 'LK Unstrut-Hainich-Kreis',
 'LK Unterallgäu',
 'LK Vechta',
 'LK Verden',
 'LK Viersen',
 'LK Vogelsbergkreis',
 'LK Vogtlandkreis',
 'LK Vorpommern-Greifswald',
 'LK Vorpommern-Rügen',
 'LK Vulkaneifel',
 'LK Waldeck-Frankenberg',
 'LK Waldshut',
 'LK Warendorf',
 'LK Wartburgkreis',
 'LK Weilheim-Schongau',
 'LK Weimarer Land',
 'LK Weißenburg-Gunzenhausen',
 'LK Werra-Meißner-Kreis',
 'LK Wesel',
 'LK Wesermarsch',
 'LK Westerwaldkreis',
 'LK Wetteraukreis',
 'LK Wittenberg',
 'LK Wittmund',
 'LK Wolfenbüttel',
 'LK Wunsiedel i.Fichtelgebirge',
 'LK Würzburg',
 'LK Zollernalbkreis',
 'LK Zwickau',
 'Region Hannover',
 'SK Amberg',
 'SK Ansbach',
 'SK Aschaffenburg',
 'SK Augsburg',
 'SK Baden-Baden',
 'SK Bamberg',
 'SK Bayreuth',
 'SK Berlin Charlottenburg-Wilmersdorf',
 'SK Berlin Friedrichshain-Kreuzberg',
 'SK Berlin Lichtenberg',
 'SK Berlin Marzahn-Hellersdorf',
 'SK Berlin Mitte',
 'SK Berlin Neukölln',
 'SK Berlin Pankow',
 'SK Berlin Reinickendorf',
 'SK Berlin Spandau',
 'SK Berlin Steglitz-Zehlendorf',
 'SK Berlin Tempelhof-Schöneberg',
 'SK Berlin Treptow-Köpenick',
 'SK Bielefeld',
 'SK Bochum',
 'SK Bonn',
 'SK Bottrop',
 'SK Brandenburg a.d.Havel',
 'SK Braunschweig',
 'SK Bremen',
 'SK Bremerhaven',
 'SK Chemnitz',
 'SK Coburg',
 'SK Cottbus',
 'SK Darmstadt',
 'SK Delmenhorst',
 'SK Dessau-Roßlau',
 'SK Dortmund',
 'SK Dresden',
 'SK Duisburg',
 'SK Düsseldorf',
 'SK Eisenach',
 'SK Emden',
 'SK Erfurt',
 'SK Erlangen',
 'SK Essen',
 'SK Flensburg',
 'SK Frankenthal',
 'SK Frankfurt (Oder)',
 'SK Frankfurt am Main',
 'SK Freiburg i.Breisgau',
 'SK Fürth',
 'SK Gelsenkirchen',
 'SK Gera',
 'SK Hagen',
 'SK Halle',
 'SK Hamburg',
 'SK Hamm',
 'SK Heidelberg',
 'SK Heilbronn',
 'SK Herne',
 'SK Hof',
 'SK Ingolstadt',
 'SK Jena',
 'SK Kaiserslautern',
 'SK Karlsruhe',
 'SK Kassel',
 'SK Kaufbeuren',
 'SK Kempten',
 'SK Kiel',
 'SK Koblenz',
 'SK Krefeld',
 'SK Köln',
 'SK Landau i.d.Pfalz',
 'SK Landshut',
 'SK Leipzig',
 'SK Leverkusen',
 'SK Ludwigshafen',
 'SK Lübeck',
 'SK Magdeburg',
 'SK Mainz',
 'SK Mannheim',
 'SK Memmingen',
 'SK Mönchengladbach',
 'SK Mülheim a.d.Ruhr',
 'SK München',
 'SK Münster',
 'SK Neumünster',
 'SK Neustadt a.d.Weinstraße',
 'SK Nürnberg',
 'SK Oberhausen',
 'SK Offenbach',
 'SK Oldenburg',
 'SK Osnabrück',
 'SK Passau',
 'SK Pforzheim',
 'SK Pirmasens',
 'SK Potsdam',
 'SK Regensburg',
 'SK Remscheid',
 'SK Rosenheim',
 'SK Rostock',
 'SK Salzgitter',
 'SK Schwabach',
 'SK Schweinfurt',
 'SK Schwerin',
 'SK Solingen',
 'SK Speyer',
 'SK Straubing',
 'SK Stuttgart',
 'SK Suhl',
 'SK Trier',
 'SK Ulm',
 'SK Weiden i.d.OPf.',
 'SK Weimar',
 'SK Wiesbaden',
 'SK Wilhelmshaven',
 'SK Wolfsburg',
 'SK Worms',
 'SK Wuppertal',
 'SK Würzburg',
 'SK Zweibrücken',
 'StadtRegion Aachen']

Note that the Landkreise (LK) which are a Stadt, are labelled with SK in the beginning - presumably for Stadtkreis.

United States

For the United States, we have the states available:

In [14]:
cases, deaths = ov.get_country_data("US", "California")
Downloaded data: last data point 11/1/20 from https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_covid19_deaths_US.csv
Downloaded data: last data point 11/1/20 from https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_covid19_confirmed_US.csv
In [15]:
cases.diff().plot();

To get a list of available states, we can use

In [16]:
us_cases = ov.fetch_cases_US()
sorted(us_cases['Province_State'].drop_duplicates())
Out[16]:
['Alabama',
 'Alaska',
 'American Samoa',
 'Arizona',
 'Arkansas',
 'California',
 'Colorado',
 'Connecticut',
 'Delaware',
 'Diamond Princess',
 'District of Columbia',
 'Florida',
 'Georgia',
 'Grand Princess',
 'Guam',
 'Hawaii',
 'Idaho',
 'Illinois',
 'Indiana',
 'Iowa',
 'Kansas',
 'Kentucky',
 'Louisiana',
 'Maine',
 'Maryland',
 'Massachusetts',
 'Michigan',
 'Minnesota',
 'Mississippi',
 'Missouri',
 'Montana',
 'Nebraska',
 'Nevada',
 'New Hampshire',
 'New Jersey',
 'New Mexico',
 'New York',
 'North Carolina',
 'North Dakota',
 'Northern Mariana Islands',
 'Ohio',
 'Oklahoma',
 'Oregon',
 'Pennsylvania',
 'Puerto Rico',
 'Rhode Island',
 'South Carolina',
 'South Dakota',
 'Tennessee',
 'Texas',
 'Utah',
 'Vermont',
 'Virgin Islands',
 'Virginia',
 'Washington',
 'West Virginia',
 'Wisconsin',
 'Wyoming']

Hungary

For Hungary, more regional data is available for the following regions:

In [17]:
ov.get_counties_hungary()
Out[17]:
['Bács-Kiskun',
 'Baranya',
 'Békés',
 'Borsod-Abaúj-Zemplén',
 'Budapest',
 'Csongrád',
 'Fejér',
 'Győr-Moson-Sopron',
 'Hajdú-Bihar',
 'Heves',
 'Jász-Nagykun-Szolnok',
 'Komárom-Esztergom',
 'Nógrád',
 'Pest',
 'Somogy',
 'Szabolcs-Szatmár-Bereg',
 'Tolna',
 'Vas',
 'Veszprém',
 'Zala']

As before, the get_country_data function can be used:

In [18]:
cases, deaths = ov.get_country_data("Hungary", region="Baranya")
Please be patient - downloading data from https://raw.githubusercontent.com/sanbrock/covid19/master/datafile.csv ...
Completed downloading 211 rows in 0.3 seconds.
In [19]:
cases
Out[19]:
Dátum
2020-03-31      20
2020-04-01      19
2020-04-02      19
2020-04-03      21
2020-04-04      21
              ... 
2020-10-22    1416
2020-10-23    1460
2020-10-24    1541
2020-10-25    1657
2020-10-26    1691
Freq: D, Name: Hungary-Baranya cases, Length: 210, dtype: int64

However, no data on deaths is available for Hungary, so the deaths object is just a None object:

In [20]:
deaths

Export data

The data series can be exported to comma separated value files or Excel files using pandas exporting tools. For example:

In [21]:
cases, deaths = ov.get_country_data("Italy")
In [22]:
cases.to_csv("italy-cases.csv")
In [23]:
cases.to_excel("italy-cases.xlsx")

The files are saved on the local disk in the current working directory:

In [24]:
!ls -l italy*
-rw-rw-r-- 1 kir kir 4819 Nov  2 12:34 italy-cases.csv
-rw-rw-r-- 1 kir kir 9265 Nov  2 12:34 italy-cases.xlsx

(Note: if you use this notebook on Binder, the files will be saved to the container that Binder has created, i.e. in the cloud, not on your local computer.)

To combine deaths and cases, we can use a convenience function from oscovida:

In [25]:
table = ov.compose_dataframe_summary(cases, deaths)
In [26]:
table
Out[26]:
total cases daily new cases total deaths daily new deaths
2020-10-26 542789 17007 37479 141
2020-10-25 525782 21273 37338 128
2020-10-24 504509 19640 37210 151
2020-10-23 484869 19143 37059 91
2020-10-22 465726 16078 36968 136
... ... ... ... ...
2020-01-27 0 0 0 0
2020-01-26 0 0 0 0
2020-01-25 0 0 0 0
2020-01-24 0 0 0 0
2020-01-23 0 0 0 0

278 rows × 4 columns

In [27]:
table.to_excel("italy.xlsx")

For other, more customised combination of data series, pandas commands can be used.

Other tutorials

You can find more tutorials here.

In [ ]: