Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mooc-rr
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
2391b35e42aa93fb5b9c8666a36d9044
mooc-rr
Commits
3f271824
Commit
3f271824
authored
Nov 08, 2025
by
2391b35e42aa93fb5b9c8666a36d9044
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Exercice 03 (1re partie) : lecture via copie locale
parent
2f0dc9e3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
15 deletions
+31
-15
analyse-syndrome-grippal.Rmd
module3/exo1/analyse-syndrome-grippal.Rmd
+31
-15
No files found.
module3/exo1/analyse-syndrome-grippal.Rmd
View file @
3f271824
...
...
@@ -2,22 +2,38 @@
title: "Analyse de l'incidence du syndrôme grippal"
author: "Konrad Hinsen"
output:
pdf_document:
toc: true
html_document:
toc: true
theme: journal
documentclass: article
classoption: a4paper
header-includes:
- \usepackage[french]{babel}
- \usepackage[upright]{fourier}
- \hypersetup{colorlinks=true,pagebackref=true}
---
# --- Import des données : copie locale réplicable ---
# URL d’origine (traçabilité uniquement)
origin_url <- "http://www.sentiweb.fr/datasets/incidence-PAY-3.csv"
# Répertoire local où sauvegarder la copie
local_dir <- "module3/exo1/data"
dir.create(local_dir, showWarnings = FALSE, recursive = TRUE)
# Nom du fichier local
local_csv <- file.path(local_dir, "incidence_fr_metropolitaine.csv")
# 1) Télécharger si la copie locale n’existe pas
if (!file.exists(local_csv)) {
message("Téléchargement depuis le Réseau Sentinelles…")
utils::download.file(origin_url, destfile = local_csv, mode = "wb", quiet = TRUE)
}
# 2) Lire la copie locale
data <- read.csv(local_csv,
skip = 1,
na.strings = c("-", "", "NA"),
stringsAsFactors = FALSE)
names(data) <- trimws(tolower(names(data)))
if (!"inc" %in% names(data) && "inc100" %in% names(data)) {
data$inc <- data$inc100
}
stopifnot(all(c("week", "inc") %in% names(data)))
head(data)
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
## Préparation des données
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment