From bccfe461dbb7ad99664e0759cf82fcf7fa46d6e6 Mon Sep 17 00:00:00 2001 From: c319822a5d066547a0de4251b9819297 Date: Fri, 11 Oct 2024 10:12:19 +0000 Subject: [PATCH] Update influenza-like-illness-analysis.Rmd --- module3/exo1/influenza-like-illness-analysis.Rmd | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/module3/exo1/influenza-like-illness-analysis.Rmd b/module3/exo1/influenza-like-illness-analysis.Rmd index 8047fa0..a16421f 100644 --- a/module3/exo1/influenza-like-illness-analysis.Rmd +++ b/module3/exo1/influenza-like-illness-analysis.Rmd @@ -25,7 +25,12 @@ The data on the incidence of influenza-like illness are available from the Web s ```{r} data_url = "http://www.sentiweb.fr/datasets/incidence-PAY-3.csv" ``` - +```{r} +data_file = "syndrome-grippal.csv" +if (!file.exists(data_file)) { + download.file(data_url, data_file, method="auto") +} +``` This is the documentation of the data from [the download site](https://ns.sentiweb.fr/incidence/csv-schema-v1.json): | Column name | Description | @@ -41,11 +46,11 @@ This is the documentation of the data from [the download site](https://ns.sentiw | `geo_insee` | Identifier of the geographic area, from INSEE https://www.insee.fr | | `geo_name` | Geographic label of the area, corresponding to INSEE code. This label is not an id and is only provided for human reading | -### Download +### Reading the data The first line of the CSV file is a comment, which we ignore with `skip=1`. ```{r} -data = read.csv(data_url, skip=1) +data = read.csv(data_file, skip=1) ``` Let's have a look at what we got: -- 2.18.1