knitr::opts_chunk$set(echo = TRUE)
Il ya quelques temps j’ai mis un pluviomètre dans le jardin. L’idée est de voir à quoi ça ressemble une fois mis en forme.
toto <- read.csv("C:/Users/hilaire.martin/mooc-rr/module2/exo4/PRECIPITATIONS.csv", header = TRUE, sep = ';', dec = ",")
#as.data.frame(toto)
summary(toto)
## DATE MOIS ANNEE MM
## Length:55 Min. : 1.000 Min. :2022 Min. : 1.000
## Class :character 1st Qu.: 5.500 1st Qu.:2022 1st Qu.: 3.750
## Mode :character Median :10.000 Median :2022 Median : 8.500
## Mean : 8.036 Mean :2022 Mean : 8.645
## 3rd Qu.:11.000 3rd Qu.:2022 3rd Qu.:12.500
## Max. :12.000 Max. :2023 Max. :25.000
head(toto)
## DATE MOIS ANNEE MM
## 1 02/09/2022 9 2022 22.0
## 2 03/09/2022 9 2022 14.5
## 3 05/09/2022 9 2022 12.0
## 4 06/09/2022 9 2022 2.0
## 5 07/09/2022 9 2022 9.0
## 6 08/09/2022 9 2022 1.0
library(ggplot2)
ggplot(toto, aes(x=MOIS, y=MM), width=0.2, fill= as.factor (MOIS)) +
geom_bar(stat = "identity")+
facet_grid(ANNEE~MOIS)