From f0d9d4c7f840d61349805a7957266b75ba09b607 Mon Sep 17 00:00:00 2001 From: dc230e4232c633941d7b74c8cce89395 Date: Sat, 11 Sep 2021 15:14:38 +0000 Subject: [PATCH] Update influenza-like-illness-analysis.Rmd --- module3/exo1/influenza-like-illness-analysis.Rmd | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/module3/exo1/influenza-like-illness-analysis.Rmd b/module3/exo1/influenza-like-illness-analysis.Rmd index 8047fa0..7c27983 100644 --- a/module3/exo1/influenza-like-illness-analysis.Rmd +++ b/module3/exo1/influenza-like-illness-analysis.Rmd @@ -26,6 +26,14 @@ The data on the incidence of influenza-like illness are available from the Web s data_url = "http://www.sentiweb.fr/datasets/incidence-PAY-3.csv" ``` +Adding a local copy of the dataset. In order to protect us in case the Réseau Sentinelles Web server disappears or is modified, we make a local copy of this dataset that we store together with our analysis. It is unnecessary and even risky to download the data at each execution, because in case of a malfunction we might be replacing our file by a corrupted version. Therefore we download the data only if no local copy exists. +```{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 | -- 2.18.1