Commit 4661448c authored by Dorinel Bastide's avatar Dorinel Bastide

Recommited for correcting the table display part now working

parent ddcc58d9
......@@ -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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment