diff --git a/module3/exo2/exercice.ipynb b/module3/exo2/exercice.ipynb index 0bbbe371b01e359e381e43239412d77bf53fb1fb..61a5f90ea301f5e5f044155d89968aa07241d902 100644 --- a/module3/exo2/exercice.ipynb +++ b/module3/exo2/exercice.ipynb @@ -1,5 +1,62 @@ { - "cells": [], + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Analyse de l'incidence de la varicelle" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "%matplotlib inline\n", + "import matplotlib.pyplot as plt\n", + "import pandas as pd\n", + "import isoweek" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Les données sur l'incidence de la varicelle sont disponible sur le site web [Réseau Sentinelles](https://www.sentiweb.fr/france/fr/?). Les données sont au format d'un fichier csv, où chaque ligne correspond à une semaine depuis l'année 1991 jusqu'à une semaine récente. Après téléchargement les données sont stockées localement, et re-téléchargées uniquement si le fichier n'est plus présent sur la machine." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "data_url=\"https://www.sentiweb.fr/datasets/incidence-PAY-7.csv\"\n", + "data_file=\"incidence-PAY-7.csv\"\n", + "import os\n", + "import urllib.request\n", + "if not os.path.exists(data_file):\n", + " urllib.request.urlretrieve(data_url, data_file)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Nous affichons les données" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "raw_data = pd.read_csv(data_file, skiprows=1)" + ] + } + ], "metadata": { "kernelspec": { "display_name": "Python 3", @@ -16,10 +73,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.3" + "version": "3.6.4" } }, "nbformat": 4, "nbformat_minor": 2 } -