diff --git a/module3/exo1/influenza-like-illness-analysis.org b/module3/exo1/influenza-like-illness-analysis.org index a37cd03e66e1c6a96fdb40d144424cde10e3a9b9..57dc7525f42ecd1456b9b21195d928458348f11e 100644 --- a/module3/exo1/influenza-like-illness-analysis.org +++ b/module3/exo1/influenza-like-illness-analysis.org @@ -82,7 +82,8 @@ if not os.path.exists(data_file): #+END_SRC #+BEGIN_SRC python :results silent :var data_url=data-url -data = urlopen(data_url).read() +#data = urlopen(data_url).read() +data = open(data_file, 'rb').read() lines = data.decode('latin-1').strip().split('\n') data_lines = lines[1:] table = [line.split(',') for line in data_lines] @@ -94,6 +95,11 @@ table[:5] #+END_SRC #+RESULTS: +| week | indicator | inc | inc_low | inc_up | inc100 | inc100_low | inc100_up | geo_insee | geo_name | +| 202011 | 3 | 101704 | 93652 | 109756 | 154 | 142 | 166 | FR | France | +| 202010 | 3 | 104977 | 96650 | 113304 | 159 | 146 | 172 | FR | France | +| 202009 | 3 | 110696 | 102066 | 119326 | 168 | 155 | 181 | FR | France | +| 202008 | 3 | 143753 | 133984 | 153522 | 218 | 203 | 233 | FR | France | ** Checking for missing data Unfortunately there are many ways to indicate the absence of a data value in a dataset. Here we check for a common one: empty fields. For completeness, we should also look for non-numerical data in numerical columns. We don't do this here, but checks in later processing steps would catch such anomalies.