diff --git a/module3/Sujet7_StatCOVID19/AnalyseCOVID19.ipynb b/module3/Sujet7_StatCOVID19/AnalyseCOVID19.ipynb index 669a30a9a09313c8431eb65c35cc823571c78d36..08ce0d2aae24884b222116d2a412c8fe66f0623b 100644 --- a/module3/Sujet7_StatCOVID19/AnalyseCOVID19.ipynb +++ b/module3/Sujet7_StatCOVID19/AnalyseCOVID19.ipynb @@ -2,7 +2,10 @@ "cells": [ { "cell_type": "markdown", - "metadata": {}, + "metadata": { + "hideCode": true, + "hidePrompt": true + }, "source": [ "# Analyse statistique des données liées à l'épidemie de COVID 19" ] @@ -10,7 +13,10 @@ { "cell_type": "code", "execution_count": 3, - "metadata": {}, + "metadata": { + "hideCode": true, + "hidePrompt": true + }, "outputs": [], "source": [ "%matplotlib inline\n", @@ -21,10 +27,36 @@ "import urllib" ] }, + { + "cell_type": "markdown", + "metadata": { + "hideCode": true, + "hidePrompt": true + }, + "source": [ + "Dans ce fichier, on s'intéresse à l'évolution du nombres de cas de COVID 19 dans les pays suivants :\n", + " - la Belgique (Belgium),\n", + " - la Chine -sans Hong-Kong (China),\n", + " - Hong Kong (China, Hong-Kong),\n", + " - France métropolitaine (France),\n", + " - Allemagne (Germany),\n", + " - Iran (Iran), l’Italie (Italy), \n", + " - Japon (Japan),\n", + " - Corée du Sud (Korea, South), -\n", + " - Pays-Bas métropolitain (Netherlands), \n", + " - Portugal (Portugal),\n", + " - Espagne (Spain), \n", + " - Royaume-Unis métropolitain (United Kingdom), \n", + " - États-Unis (US)." + ] + }, { "cell_type": "code", "execution_count": 5, - "metadata": {}, + "metadata": { + "hideCode": true, + "hidePrompt": true + }, "outputs": [], "source": [ "data_url = \"https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_covid19_confirmed_global.csv\"" @@ -32,8 +64,11 @@ }, { "cell_type": "code", - "execution_count": 7, - "metadata": {}, + "execution_count": 15, + "metadata": { + "hideCode": true, + "hidePrompt": true + }, "outputs": [ { "data": { @@ -1805,7 +1840,7 @@ "[271 rows x 327 columns]" ] }, - "execution_count": 7, + "execution_count": 15, "metadata": {}, "output_type": "execute_result" } @@ -1814,25 +1849,48 @@ "path_to_file = \"DonneeBrute\"\n", "csv_file = \"donnee_JohnHopkins.csv\"\n", "if os.path.exists(os.path.join(path_to_file,csv_file)):\n", - " raw_data = pd.read_csv(os.path.join(path_to_file,csv_file))\n", + " raw_data = pd.read_csv(os.path.join(path_to_file,csv_file), skiprows=0)\n", "else: \n", " if not(os.path.isdir(path_to_file)):\n", " os.mkdir(path_to_file)\n", " urllib.request.urlretrieve(data_url, os.path.join(path_to_file,csv_file))\n", - " raw_data = pd.read_csv(os.path.join(path_to_file,csv_file))\n", + " raw_data = pd.read_csv(os.path.join(path_to_file,csv_file), skiprows=0)\n", " \n", "raw_data" ] }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "hideCode": true, + "hidePrompt": true + }, + "outputs": [], + "source": [ + "data = raw_data[raw_data['Country/Region'] == 'Belgium']" + ] + }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "hideCode": true, + "hidePrompt": true + }, + "outputs": [], + "source": [] } ], "metadata": { + "hide_code_all_hidden": true, "kernelspec": { "display_name": "Python 3", "language": "python",