diff --git a/rstudio 2 b/rstudio 2 new file mode 100644 index 0000000000000000000000000000000000000000..9d5fec7bbd58635cd86e3b04abc2f8ab8d5fd154 --- /dev/null +++ b/rstudio 2 @@ -0,0 +1,84 @@ +--- +title: "Analyse de l'incidence de la Covid-19 en France" +author: "Nadine Njeim" +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} +--- +knitr::opts_chunk$set(echo = TRUE) +data_url = "https://www.data.gouv.fr/fr/datasets/r/0e4d6fcf-25a6-4b77-a1a1-6dc43e9778b3" +data_file = "covid19_fr.csv" +if (!file.exists(data_file)) { + download.file(data_url, data_file) +} +data = read.csv(data_file, sep = ";") +head(data) +data_url = "https://www.data.gouv.fr/fr/datasets/r/0e4d6fcf-25a6-4b77-a1a1-6dc43e9778b3" +data_file = "covid19_fr.csv" +if (!file.exists(data_file)) { + download.file(data_url, data_file) +} +data = read.csv(data_file, sep = ";") +head(data) + +--- +title: "Analyse de l'évolution du chômage en France" +author: "Nadine Njeim" +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} +--- +library(readr) +data_url = "https://www.insee.fr/fr/statistiques/fichier/series_longues/sl_trchom.csv" +data_file = "chomage.csv" +if (!file.exists(data_file)) { + download.file(data_url, data_file) +} +data = read_csv2(data_file, skip = 5) +head(data) +--- +title: "Évolution des températures mensuelles à Paris" +author: "Nadine Njeim" +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} +--- +library(lubridate) +library(ggplot2) + +data_url = "https://data.meteofrance.com/donnees-libres/BulletinsMensuels/Paris.csv" +data_file = "paris_temp.csv" +if (!file.exists(data_file)) { + download.file(data_url, data_file) +} +data = read.csv(data_file) +data$Date = as.Date(paste0(data$Annee, "-", data$Mois, "-01")) +ggplot(data, aes(x = Date, y = TemperatureMoyenne)) + + geom_line() + labs(title = "Température moyenne mensuelle à Paris")