From c086d38293d6ee9f005c1bbdc21ac0aff1754106 Mon Sep 17 00:00:00 2001 From: a49c585c4fe7205185de4c52fe2e58c3 Date: Sun, 9 Nov 2025 22:30:27 +0000 Subject: [PATCH] no commit message --- module3/exo1/analyse-syndrome-grippal.ipynb | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/module3/exo1/analyse-syndrome-grippal.ipynb b/module3/exo1/analyse-syndrome-grippal.ipynb index 59d72b5..ea9e08d 100644 --- a/module3/exo1/analyse-syndrome-grippal.ipynb +++ b/module3/exo1/analyse-syndrome-grippal.ipynb @@ -16,6 +16,8 @@ "%matplotlib inline\n", "import matplotlib.pyplot as plt\n", "import pandas as pd\n", + "import os\n", + "import urllib.request\n", "import isoweek" ] }, @@ -65,7 +67,17 @@ "metadata": {}, "outputs": [], "source": [ - "raw_data = pd.read_csv(data_url, skiprows=1)\n", + "\n", + "local_file = \"donnees_grippal.csv\"\n", + "\n", + "if not os.path.exists(local_file):\n", + " urllib.request.urlretrieve(data_url, local_file)\n", + "else:\n", + " print(\"Local file already exists\")\n", + "\n", + "raw_data = pd.read_csv(local_file, skiprows=1)\n", + "raw_data.head()\n", + "\n", "raw_data" ] }, @@ -364,7 +376,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.1" + "version": "3.6.4" } }, "nbformat": 4, -- 2.18.1