diff --git a/module3/exo1/influenza-like-illness-analysis.ipynb b/module3/exo1/influenza-like-illness-analysis.ipynb index 42523bf87ba659d959b9e71e2404f8863e2b582c..8d66766fd2b39d43825b525f7016618dfa3d2094 100644 --- a/module3/exo1/influenza-like-illness-analysis.ipynb +++ b/module3/exo1/influenza-like-illness-analysis.ipynb @@ -9,7 +9,7 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 41, "metadata": {}, "outputs": [], "source": [ @@ -28,11 +28,32 @@ }, { "cell_type": "code", - "execution_count": 21, + "execution_count": 42, "metadata": {}, "outputs": [], "source": [ - "data_url = 'incidence-PAY-3.csv'" + "data_url = \"http://www.sentiweb.fr/datasets/incidence-PAY-3.csv\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "In order to protect us in case the Réseau Sentinelles Web server disappears or is modified, we make a local copy of this dataset that we store together with our analysis. It is unnecessary and even risky to download the data at each execution, because in case of a malfunction we might be replacing our file by a corrupted version. Therefore we download the data only if no local copy exists." + ] + }, + { + "cell_type": "code", + "execution_count": 43, + "metadata": {}, + "outputs": [], + "source": [ + "data_file = \"incidence-PAY-3.csv\"\n", + "\n", + "import os\n", + "import urllib.request\n", + "if not os.path.exists(data_file):\n", + " urllib.request.urlretrieve(data_url, data_file)" ] }, { @@ -59,7 +80,7 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": 44, "metadata": {}, "outputs": [ { @@ -1024,7 +1045,7 @@ "[1882 rows x 10 columns]" ] }, - "execution_count": 22, + "execution_count": 44, "metadata": {}, "output_type": "execute_result" } @@ -1043,7 +1064,7 @@ }, { "cell_type": "code", - "execution_count": 23, + "execution_count": 45, "metadata": {}, "outputs": [ { @@ -1105,7 +1126,7 @@ "1645 FR France " ] }, - "execution_count": 23, + "execution_count": 45, "metadata": {}, "output_type": "execute_result" }