From 1faef3e48ff2a2f796abe477cd3364e67e684dd0 Mon Sep 17 00:00:00 2001 From: dc97a6904245e0d07c1302ee90fceec3 Date: Mon, 23 Jun 2025 21:14:06 +0000 Subject: [PATCH] no commit message --- .../influenza-like-illness-analysis.ipynb | 23 ++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/module3/exo1/influenza-like-illness-analysis.ipynb b/module3/exo1/influenza-like-illness-analysis.ipynb index 87092fc..ea2d69e 100644 --- a/module3/exo1/influenza-like-illness-analysis.ipynb +++ b/module3/exo1/influenza-like-illness-analysis.ipynb @@ -67,7 +67,21 @@ "metadata": {}, "outputs": [], "source": [ - "raw_data = pd.read_csv(data_url, skiprows=1)\n", + "data_file = \"syndrome-grippal.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)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "raw_data = pd.read_csv(data_file, skiprows=1)\n", "raw_data" ] }, @@ -346,7 +360,10 @@ "collapsed": true }, "outputs": [], - "source": [] + "source": [ + "sorted_data['inc'] = pd.to_numeric(sorted_data['inc'], errors='coerce')\n", + "sorted_data['inc'].plot()" + ] } ], "metadata": { @@ -365,7 +382,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.1" + "version": "3.6.4" } }, "nbformat": 4, -- 2.18.1