Skip to content
Snippets Groups Projects
Commit 63e33a13 authored by SMAH Lisa's avatar SMAH Lisa
Browse files

#5

- Ordre des filieres 5PV/éolien/biométhane/biomasse/géothermie/solaire thermique/hydroélectricité )
- Ordre des sous-filiere (toiture/ombrière/sol)
- Dégradé de couleur pour les ss filière de même thème (TOIT, OMBRIERE et SOL et AUTRE), choix suivant palette de gouvdown
parent e6a68f6c
No related branches found
No related tags found
1 merge request!1merge de la dev vers main
...@@ -541,9 +541,15 @@ filiere_couleur <- c("HYDROELECTRICITE" = "#0371c1", ...@@ -541,9 +541,15 @@ filiere_couleur <- c("HYDROELECTRICITE" = "#0371c1",
"SOLAIRE_PV" = "#e26d0d", "SOLAIRE_PV" = "#e26d0d",
"SOLAIRE_THERMIQUE" = "#f2dcdb") "SOLAIRE_THERMIQUE" = "#f2dcdb")
# Définir l'ordre souhaité des filières
order_filiere <- c("SOLAIRE_PV", "EOLIEN", "BIOMETHANE", "BIOMASSE","GEOTHERMIE", "SOLAIRE_THERMIQUE", "HYDROELECTRICITE")
reg_filiere_zaer$filiere <- factor(reg_filiere_zaer$filiere, levels = order_filiere)
# Tracer le graphique en barres verticales # Tracer le graphique en barres verticales
ggplot(reg_filiere_zaer, aes(x = reorder(filiere, -reg_txcom_zaer_fil), y = reg_txcom_zaer_fil, fill = filiere)) + ggplot(reg_filiere_zaer, aes(x = filiere, y = reg_txcom_zaer_fil, fill = filiere)) +
geom_bar(stat = "identity", width = 0.5, position = position_dodge()) + geom_bar(stat = "identity", width = 0.5, position = position_dodge()) +
scale_fill_manual(values = filiere_couleur) + # Utilisation des couleurs définies scale_fill_manual(values = filiere_couleur) + # Utilisation des couleurs définies
geom_text(aes(label = paste0(round(reg_txcom_zaer_fil,1), "%")), position = position_dodge(width = 0.9), vjust = -0.5, size = 4, color = "black") + geom_text(aes(label = paste0(round(reg_txcom_zaer_fil,1), "%")), position = position_dodge(width = 0.9), vjust = -0.5, size = 4, color = "black") +
...@@ -570,6 +576,12 @@ toutes_filieres <- data.frame(filiere = c("HYDROELECTRICITE", "BIOMASSE", "EOLIE ...@@ -570,6 +576,12 @@ toutes_filieres <- data.frame(filiere = c("HYDROELECTRICITE", "BIOMASSE", "EOLIE
# Fusionner avec votre table existante # Fusionner avec votre table existante
dep_filiere_zaer_44 <- full_join(dep_filiere_zaer_44, toutes_filieres, by = "filiere") dep_filiere_zaer_44 <- full_join(dep_filiere_zaer_44, toutes_filieres, by = "filiere")
# Définir l'ordre souhaité des filières
order_filiere <- c("SOLAIRE_PV", "EOLIEN", "BIOMETHANE", "BIOMASSE","GEOTHERMIE", "SOLAIRE_THERMIQUE", "HYDROELECTRICITE")
dep_filiere_zaer_44$filiere <- factor(dep_filiere_zaer_44$filiere, levels = order_filiere)
# Correspondance entre les filières et les couleurs # Correspondance entre les filières et les couleurs
filiere_couleur <- c("HYDROELECTRICITE" = "#0371c1", filiere_couleur <- c("HYDROELECTRICITE" = "#0371c1",
"BIOMASSE" = "#9cbc5b", "BIOMASSE" = "#9cbc5b",
...@@ -580,7 +592,7 @@ filiere_couleur <- c("HYDROELECTRICITE" = "#0371c1", ...@@ -580,7 +592,7 @@ filiere_couleur <- c("HYDROELECTRICITE" = "#0371c1",
"SOLAIRE_THERMIQUE" = "#f2dcdb") "SOLAIRE_THERMIQUE" = "#f2dcdb")
# Tracer le graphique en barres verticales # Tracer le graphique en barres verticales
ggplot(dep_filiere_zaer_44, aes(x = reorder(filiere, -dep_txcom_zaer_fil) , y = dep_txcom_zaer_fil, fill = filiere)) + ggplot(dep_filiere_zaer_44, aes(x = filiere, y = dep_txcom_zaer_fil, fill = filiere)) +
geom_bar(stat = "identity", width = 0.5 , position = position_dodge()) + geom_bar(stat = "identity", width = 0.5 , position = position_dodge()) +
scale_fill_manual(values = filiere_couleur) + scale_fill_manual(values = filiere_couleur) +
geom_text(aes(label = paste0(round(dep_txcom_zaer_fil,1), "%")), position = position_dodge(width = 0.9), vjust = -0.5, size = 4, color = "black") + geom_text(aes(label = paste0(round(dep_txcom_zaer_fil,1), "%")), position = position_dodge(width = 0.9), vjust = -0.5, size = 4, color = "black") +
...@@ -605,6 +617,10 @@ toutes_filieres <- data.frame(filiere = c("HYDROELECTRICITE", "BIOMASSE", "EOLIE ...@@ -605,6 +617,10 @@ toutes_filieres <- data.frame(filiere = c("HYDROELECTRICITE", "BIOMASSE", "EOLIE
# Fusionner avec votre table existante # Fusionner avec votre table existante
dep_filiere_zaer_49 <- full_join(dep_filiere_zaer_49, toutes_filieres, by = "filiere") dep_filiere_zaer_49 <- full_join(dep_filiere_zaer_49, toutes_filieres, by = "filiere")
# Définir l'ordre souhaité des filières
order_filiere <- c("SOLAIRE_PV", "EOLIEN", "BIOMETHANE", "BIOMASSE","GEOTHERMIE", "SOLAIRE_THERMIQUE", "HYDROELECTRICITE")
dep_filiere_zaer_49$filiere <- factor(dep_filiere_zaer_49$filiere, levels = order_filiere)
# Correspondance entre les filières et les couleurs # Correspondance entre les filières et les couleurs
filiere_couleur <- c("HYDROELECTRICITE" = "#0371c1", filiere_couleur <- c("HYDROELECTRICITE" = "#0371c1",
...@@ -616,7 +632,7 @@ filiere_couleur <- c("HYDROELECTRICITE" = "#0371c1", ...@@ -616,7 +632,7 @@ filiere_couleur <- c("HYDROELECTRICITE" = "#0371c1",
"SOLAIRE_THERMIQUE" = "#f2dcdb") "SOLAIRE_THERMIQUE" = "#f2dcdb")
# Tracer le graphique en barres verticales # Tracer le graphique en barres verticales
ggplot(dep_filiere_zaer_49, aes(x = reorder(filiere, -dep_txcom_zaer_fil) , y = dep_txcom_zaer_fil, fill = filiere)) + ggplot(dep_filiere_zaer_49, aes(x = filiere, y = dep_txcom_zaer_fil, fill = filiere)) +
geom_bar(stat = "identity", width = 0.5 , position = position_dodge()) + geom_bar(stat = "identity", width = 0.5 , position = position_dodge()) +
scale_fill_manual(values = filiere_couleur) + scale_fill_manual(values = filiere_couleur) +
geom_text(aes(label = paste0(round(dep_txcom_zaer_fil,1), "%")), position = position_dodge(width = 0.9), vjust = -0.5, size = 4, color = "black") + geom_text(aes(label = paste0(round(dep_txcom_zaer_fil,1), "%")), position = position_dodge(width = 0.9), vjust = -0.5, size = 4, color = "black") +
...@@ -641,6 +657,12 @@ toutes_filieres <- data.frame(filiere = c("HYDROELECTRICITE", "BIOMASSE", "EOLIE ...@@ -641,6 +657,12 @@ toutes_filieres <- data.frame(filiere = c("HYDROELECTRICITE", "BIOMASSE", "EOLIE
# Fusionner avec votre table existante # Fusionner avec votre table existante
dep_filiere_zaer_53 <- full_join(dep_filiere_zaer_53, toutes_filieres, by = "filiere") dep_filiere_zaer_53 <- full_join(dep_filiere_zaer_53, toutes_filieres, by = "filiere")
# Définir l'ordre souhaité des filières
order_filiere <- c("SOLAIRE_PV", "EOLIEN", "BIOMETHANE", "BIOMASSE","GEOTHERMIE", "SOLAIRE_THERMIQUE", "HYDROELECTRICITE")
dep_filiere_zaer_53$filiere <- factor(dep_filiere_zaer_53$filiere, levels = order_filiere)
#Définition des couleurs #Définition des couleurs
# Correspondance entre les filières et les couleurs # Correspondance entre les filières et les couleurs
filiere_couleur <- c("HYDROELECTRICITE" = "#0371c1", filiere_couleur <- c("HYDROELECTRICITE" = "#0371c1",
...@@ -653,7 +675,7 @@ filiere_couleur <- c("HYDROELECTRICITE" = "#0371c1", ...@@ -653,7 +675,7 @@ filiere_couleur <- c("HYDROELECTRICITE" = "#0371c1",
# Tracer le graphique en barres verticales # Tracer le graphique en barres verticales
ggplot(dep_filiere_zaer_53, aes(x = reorder(filiere, -dep_txcom_zaer_fil), y = dep_txcom_zaer_fil, fill = filiere)) + ggplot(dep_filiere_zaer_53, aes(x = filiere, y = dep_txcom_zaer_fil, fill = filiere)) +
geom_bar(stat = "identity", width = 0.5, position = position_dodge()) + geom_bar(stat = "identity", width = 0.5, position = position_dodge()) +
scale_fill_manual(values = filiere_couleur) + # Utilisation des couleurs définies scale_fill_manual(values = filiere_couleur) + # Utilisation des couleurs définies
geom_text(aes(label = paste0(round(dep_txcom_zaer_fil,1), "%")), position = position_dodge(width = 0.9), vjust = -0.5, size = 4, color = "black") + geom_text(aes(label = paste0(round(dep_txcom_zaer_fil,1), "%")), position = position_dodge(width = 0.9), vjust = -0.5, size = 4, color = "black") +
...@@ -677,6 +699,11 @@ toutes_filieres <- data.frame(filiere = c("HYDROELECTRICITE", "BIOMASSE", "EOLIE ...@@ -677,6 +699,11 @@ toutes_filieres <- data.frame(filiere = c("HYDROELECTRICITE", "BIOMASSE", "EOLIE
# Fusionner avec votre table existante # Fusionner avec votre table existante
dep_filiere_zaer_72 <- full_join(dep_filiere_zaer_72, toutes_filieres, by = "filiere") dep_filiere_zaer_72 <- full_join(dep_filiere_zaer_72, toutes_filieres, by = "filiere")
# Définir l'ordre souhaité des filières
order_filiere <- c("SOLAIRE_PV", "EOLIEN", "BIOMETHANE", "BIOMASSE","GEOTHERMIE", "SOLAIRE_THERMIQUE", "HYDROELECTRICITE")
dep_filiere_zaer_72$filiere <- factor(dep_filiere_zaer_72$filiere, levels = order_filiere)
#Définition des couleurs #Définition des couleurs
# Correspondance entre les filières et les couleurs # Correspondance entre les filières et les couleurs
...@@ -690,7 +717,7 @@ filiere_couleur <- c("HYDROELECTRICITE" = "#0371c1", ...@@ -690,7 +717,7 @@ filiere_couleur <- c("HYDROELECTRICITE" = "#0371c1",
# Tracer le graphique en barres verticales # Tracer le graphique en barres verticales
ggplot(dep_filiere_zaer_72, aes(x = reorder(filiere, -dep_txcom_zaer_fil), y = dep_txcom_zaer_fil, fill = filiere)) + ggplot(dep_filiere_zaer_72, aes(x = filiere, y = dep_txcom_zaer_fil, fill = filiere)) +
geom_bar(stat = "identity", width = 0.5, position = position_dodge()) + geom_bar(stat = "identity", width = 0.5, position = position_dodge()) +
scale_fill_manual(values = filiere_couleur) + # Utilisation des couleurs définies scale_fill_manual(values = filiere_couleur) + # Utilisation des couleurs définies
geom_text(aes(label = paste0(round(dep_txcom_zaer_fil,1), "%")), position = position_dodge(width = 0.9), vjust = -0.5, size = 4, color = "black") + geom_text(aes(label = paste0(round(dep_txcom_zaer_fil,1), "%")), position = position_dodge(width = 0.9), vjust = -0.5, size = 4, color = "black") +
...@@ -715,6 +742,12 @@ toutes_filieres <- data.frame(filiere = c("HYDROELECTRICITE", "BIOMASSE", "EOLIE ...@@ -715,6 +742,12 @@ toutes_filieres <- data.frame(filiere = c("HYDROELECTRICITE", "BIOMASSE", "EOLIE
# Fusionner avec votre table existante # Fusionner avec votre table existante
dep_filiere_zaer_85 <- full_join(dep_filiere_zaer_85, toutes_filieres, by = "filiere") dep_filiere_zaer_85 <- full_join(dep_filiere_zaer_85, toutes_filieres, by = "filiere")
# Définir l'ordre souhaité des filières
order_filiere <- c("SOLAIRE_PV", "EOLIEN", "BIOMETHANE", "BIOMASSE","GEOTHERMIE", "SOLAIRE_THERMIQUE", "HYDROELECTRICITE")
dep_filiere_zaer_85$filiere <- factor(dep_filiere_zaer_85$filiere, levels = order_filiere)
#Définition des couleurs #Définition des couleurs
# Correspondance entre les filières et les couleurs # Correspondance entre les filières et les couleurs
filiere_couleur <- c("HYDROELECTRICITE" = "#0371c1", filiere_couleur <- c("HYDROELECTRICITE" = "#0371c1",
...@@ -727,7 +760,7 @@ filiere_couleur <- c("HYDROELECTRICITE" = "#0371c1", ...@@ -727,7 +760,7 @@ filiere_couleur <- c("HYDROELECTRICITE" = "#0371c1",
# Tracer le graphique en barres verticales # Tracer le graphique en barres verticales
ggplot(dep_filiere_zaer_85, aes(x = reorder(filiere, -dep_txcom_zaer_fil), y = dep_txcom_zaer_fil, fill = filiere)) + ggplot(dep_filiere_zaer_85, aes(x = filiere, y = dep_txcom_zaer_fil, fill = filiere)) +
geom_bar(stat = "identity", width = 0.5, position = position_dodge()) + geom_bar(stat = "identity", width = 0.5, position = position_dodge()) +
scale_fill_manual(values = filiere_couleur) + # Utilisation des couleurs définies scale_fill_manual(values = filiere_couleur) + # Utilisation des couleurs définies
geom_text(aes(label = paste0(round(dep_txcom_zaer_fil,1), "%")), position = position_dodge(width = 0.9), vjust = -0.5, size = 4, color = "black") + geom_text(aes(label = paste0(round(dep_txcom_zaer_fil,1), "%")), position = position_dodge(width = 0.9), vjust = -0.5, size = 4, color = "black") +
...@@ -750,20 +783,27 @@ ggplot(dep_filiere_zaer_85, aes(x = reorder(filiere, -dep_txcom_zaer_fil), y = d ...@@ -750,20 +783,27 @@ ggplot(dep_filiere_zaer_85, aes(x = reorder(filiere, -dep_txcom_zaer_fil), y = d
dep_filiere_zaer_sf_44 <- dep_filiere_ssfiliere_zaer[dep_filiere_ssfiliere_zaer$insee_dep == 44,] dep_filiere_zaer_sf_44 <- dep_filiere_ssfiliere_zaer[dep_filiere_ssfiliere_zaer$insee_dep == 44,]
dep_filiere_zaer_sf_44 <- dep_filiere_zaer_sf_44[dep_filiere_zaer_sf_44$filiere == "SOLAIRE_PV",] dep_filiere_zaer_sf_44 <- dep_filiere_zaer_sf_44[dep_filiere_zaer_sf_44$filiere == "SOLAIRE_PV",]
# Définir l'ordre souhaité des sous-filières
order_levels <- c("SOLAIRE_PV_NV_TOIT", "SOLAIRE_PV_RNV_TOIT", "SOLAIRE_PV_NV_OMBRIERE", "SOLAIRE_PV_RNV_OMBRIERE","SOLAIRE_PV_NV_SOL", "SOLAIRE_PV_RNV_SOL", "SOLAIRE_PV_NV_AUTRE", "SOLAIRE_PV_RNV_AUTRE")
# Convertir detail_filiere en un facteur avec les niveaux spécifiés dans l'ordre souhaité
dep_filiere_zaer_sf_44$detail_filiere <- factor(dep_filiere_zaer_sf_44$detail_filiere, levels = order_levels)
couleur <- c(gouvdown::gouv_palettes$pal_gouv_qual1[1], # Correspondance entre les filières et les couleurs
gouvdown::gouv_palettes$pal_gouv_qual1[2], ssfiliere_couleur <- c("SOLAIRE_PV_NV_TOIT" = gouvdown::gouv_palettes$pal_gouv_l[1],
gouvdown::gouv_palettes$pal_gouv_qual1[3], "SOLAIRE_PV_RNV_TOIT" = gouvdown::gouv_palettes$pal_gouv_l[2],
gouvdown::gouv_palettes$pal_gouv_qual1[4], "SOLAIRE_PV_NV_OMBRIERE" = gouvdown::gouv_palettes$pal_gouv_m[1],
gouvdown::gouv_palettes$pal_gouv_qual1[5], "SOLAIRE_PV_RNV_OMBRIERE" = gouvdown::gouv_palettes$pal_gouv_m[2],
gouvdown::gouv_palettes$pal_gouv_qual1[6], "SOLAIRE_PV_NV_SOL" = gouvdown::gouv_palettes$pal_gouv_o[1],
gouvdown::gouv_palettes$pal_gouv_qual1[7], "SOLAIRE_PV_RNV_SOL" = gouvdown::gouv_palettes$pal_gouv_o[2],
gouvdown::gouv_palettes$pal_gouv_qual1[8]) "SOLAIRE_PV_NV_AUTRE" = gouvdown::gouv_palettes$pal_gouv_n[1],
"SOLAIRE_PV_RNV_AUTRE" = gouvdown::gouv_palettes$pal_gouv_n[2])
# Tracer le graphique en barres verticales # Tracer le graphique en barres verticales
ggplot(dep_filiere_zaer_sf_44, aes(x = reorder(detail_filiere, -dep_txcom_zaer_ssfil), y = dep_txcom_zaer_ssfil, fill = detail_filiere)) + ggplot(dep_filiere_zaer_sf_44,aes(x = detail_filiere, y = dep_txcom_zaer_ssfil, fill = detail_filiere)) +
geom_bar(stat = "identity", width = 0.5, position = position_dodge()) + geom_bar(stat = "identity", width = 0.5, position = position_dodge()) +
scale_fill_manual(values = couleur) + # Utilisation des couleurs définies scale_fill_manual(values = ssfiliere_couleur) + # Utilisation des couleurs définies
geom_text(aes(label = paste0(round(dep_txcom_zaer_ssfil,1), "%")), position = position_dodge(width = 0.9), vjust = -0.5, size = 4, color = "black") + geom_text(aes(label = paste0(round(dep_txcom_zaer_ssfil,1), "%")), position = position_dodge(width = 0.9), vjust = -0.5, size = 4, color = "black") +
labs(title = "Proportion et nombre de communes ayant des zones définies dans chaque sous-filière existante dans le département 44", labs(title = "Proportion et nombre de communes ayant des zones définies dans chaque sous-filière existante dans le département 44",
x = "Filière", x = "Filière",
...@@ -784,19 +824,27 @@ dep_filiere_zaer_sf_49 <- dep_filiere_ssfiliere_zaer[dep_filiere_ssfiliere_zaer$ ...@@ -784,19 +824,27 @@ dep_filiere_zaer_sf_49 <- dep_filiere_ssfiliere_zaer[dep_filiere_ssfiliere_zaer$
dep_filiere_zaer_sf_49 <- dep_filiere_zaer_sf_49[dep_filiere_zaer_sf_49$filiere == "SOLAIRE_PV",] dep_filiere_zaer_sf_49 <- dep_filiere_zaer_sf_49[dep_filiere_zaer_sf_49$filiere == "SOLAIRE_PV",]
couleur <- c(gouvdown::gouv_palettes$pal_gouv_qual1[1], # Définir l'ordre souhaité des sous-filières
gouvdown::gouv_palettes$pal_gouv_qual1[2], order_levels <- c("SOLAIRE_PV_NV_TOIT", "SOLAIRE_PV_RNV_TOIT", "SOLAIRE_PV_NV_OMBRIERE", "SOLAIRE_PV_RNV_OMBRIERE","SOLAIRE_PV_NV_SOL", "SOLAIRE_PV_RNV_SOL", "SOLAIRE_PV_NV_AUTRE", "SOLAIRE_PV_RNV_AUTRE")
gouvdown::gouv_palettes$pal_gouv_qual1[3],
gouvdown::gouv_palettes$pal_gouv_qual1[4], # Convertir detail_filiere en un facteur avec les niveaux spécifiés dans l'ordre souhaité
gouvdown::gouv_palettes$pal_gouv_qual1[5], dep_filiere_zaer_sf_49$detail_filiere <- factor(dep_filiere_zaer_sf_49$detail_filiere, levels = order_levels)
gouvdown::gouv_palettes$pal_gouv_qual1[6],
gouvdown::gouv_palettes$pal_gouv_qual1[7],
gouvdown::gouv_palettes$pal_gouv_qual1[8]) # Correspondance entre les filières et les couleurs
ssfiliere_couleur <- c("SOLAIRE_PV_NV_TOIT" = gouvdown::gouv_palettes$pal_gouv_l[1],
"SOLAIRE_PV_RNV_TOIT" = gouvdown::gouv_palettes$pal_gouv_l[2],
"SOLAIRE_PV_NV_OMBRIERE" = gouvdown::gouv_palettes$pal_gouv_m[1],
"SOLAIRE_PV_RNV_OMBRIERE" = gouvdown::gouv_palettes$pal_gouv_m[2],
"SOLAIRE_PV_NV_SOL" = gouvdown::gouv_palettes$pal_gouv_o[1],
"SOLAIRE_PV_RNV_SOL" = gouvdown::gouv_palettes$pal_gouv_o[2],
"SOLAIRE_PV_NV_AUTRE" = gouvdown::gouv_palettes$pal_gouv_n[1],
"SOLAIRE_PV_RNV_AUTRE" = gouvdown::gouv_palettes$pal_gouv_n[2])
# Tracer le graphique en barres verticales # Tracer le graphique en barres verticales
ggplot(dep_filiere_zaer_sf_49, aes(x = reorder(detail_filiere, -dep_txcom_zaer_ssfil), y = dep_txcom_zaer_ssfil, fill = detail_filiere)) + ggplot(dep_filiere_zaer_sf_49,aes(x = detail_filiere, y = dep_txcom_zaer_ssfil, fill = detail_filiere)) +
geom_bar(stat = "identity", width = 0.5, position = position_dodge()) + geom_bar(stat = "identity", width = 0.5, position = position_dodge()) +
scale_fill_manual(values = couleur) + # Utilisation des couleurs définies scale_fill_manual(values = ssfiliere_couleur) + # Utilisation des couleurs définies
geom_text(aes(label = paste0(round(dep_txcom_zaer_ssfil,1), "%")), position = position_dodge(width = 0.9), vjust = -0.5, size = 4, color = "black") + geom_text(aes(label = paste0(round(dep_txcom_zaer_ssfil,1), "%")), position = position_dodge(width = 0.9), vjust = -0.5, size = 4, color = "black") +
labs(title = "Proportion et nombre de communes ayant des zones définies dans chaque sous-filière existante dans le département 49", labs(title = "Proportion et nombre de communes ayant des zones définies dans chaque sous-filière existante dans le département 49",
x = "Filière", x = "Filière",
...@@ -819,19 +867,27 @@ dep_filiere_zaer_sf_53 <- dep_filiere_ssfiliere_zaer[dep_filiere_ssfiliere_zaer$ ...@@ -819,19 +867,27 @@ dep_filiere_zaer_sf_53 <- dep_filiere_ssfiliere_zaer[dep_filiere_ssfiliere_zaer$
dep_filiere_zaer_sf_53 <- dep_filiere_zaer_sf_53[dep_filiere_zaer_sf_53$filiere == "SOLAIRE_PV",] dep_filiere_zaer_sf_53 <- dep_filiere_zaer_sf_53[dep_filiere_zaer_sf_53$filiere == "SOLAIRE_PV",]
couleur <- c(gouvdown::gouv_palettes$pal_gouv_qual1[1], # Définir l'ordre souhaité des sous-filières
gouvdown::gouv_palettes$pal_gouv_qual1[2], order_levels <- c("SOLAIRE_PV_NV_TOIT", "SOLAIRE_PV_RNV_TOIT", "SOLAIRE_PV_NV_OMBRIERE", "SOLAIRE_PV_RNV_OMBRIERE","SOLAIRE_PV_NV_SOL", "SOLAIRE_PV_RNV_SOL", "SOLAIRE_PV_NV_AUTRE", "SOLAIRE_PV_RNV_AUTRE")
gouvdown::gouv_palettes$pal_gouv_qual1[3],
gouvdown::gouv_palettes$pal_gouv_qual1[4], # Convertir detail_filiere en un facteur avec les niveaux spécifiés dans l'ordre souhaité
gouvdown::gouv_palettes$pal_gouv_qual1[5], dep_filiere_zaer_sf_53$detail_filiere <- factor(dep_filiere_zaer_sf_53$detail_filiere, levels = order_levels)
gouvdown::gouv_palettes$pal_gouv_qual1[6],
gouvdown::gouv_palettes$pal_gouv_qual1[7],
gouvdown::gouv_palettes$pal_gouv_qual1[8]) # Correspondance entre les filières et les couleurs
ssfiliere_couleur <- c("SOLAIRE_PV_NV_TOIT" = gouvdown::gouv_palettes$pal_gouv_l[1],
"SOLAIRE_PV_RNV_TOIT" = gouvdown::gouv_palettes$pal_gouv_l[2],
"SOLAIRE_PV_NV_OMBRIERE" = gouvdown::gouv_palettes$pal_gouv_m[1],
"SOLAIRE_PV_RNV_OMBRIERE" = gouvdown::gouv_palettes$pal_gouv_m[2],
"SOLAIRE_PV_NV_SOL" = gouvdown::gouv_palettes$pal_gouv_o[1],
"SOLAIRE_PV_RNV_SOL" = gouvdown::gouv_palettes$pal_gouv_o[2],
"SOLAIRE_PV_NV_AUTRE" = gouvdown::gouv_palettes$pal_gouv_n[1],
"SOLAIRE_PV_RNV_AUTRE" = gouvdown::gouv_palettes$pal_gouv_n[2])
# Tracer le graphique en barres verticales # Tracer le graphique en barres verticales
ggplot(dep_filiere_zaer_sf_53, aes(x = reorder(detail_filiere, -dep_txcom_zaer_ssfil), y = dep_txcom_zaer_ssfil, fill = detail_filiere)) + ggplot(dep_filiere_zaer_sf_53,aes(x = detail_filiere, y = dep_txcom_zaer_ssfil, fill = detail_filiere)) +
geom_bar(stat = "identity", width = 0.5, position = position_dodge()) + geom_bar(stat = "identity", width = 0.5, position = position_dodge()) +
scale_fill_manual(values = couleur) + # Utilisation des couleurs définies scale_fill_manual(values = ssfiliere_couleur) + # Utilisation des couleurs définies
geom_text(aes(label = paste0(round(dep_txcom_zaer_ssfil,1), "%")), position = position_dodge(width = 0.9), vjust = -0.5, size = 4, color = "black") + geom_text(aes(label = paste0(round(dep_txcom_zaer_ssfil,1), "%")), position = position_dodge(width = 0.9), vjust = -0.5, size = 4, color = "black") +
labs(title = "Proportion et nombre de communes ayant des zones définies dans chaque sous-filière existante dans le département 53", labs(title = "Proportion et nombre de communes ayant des zones définies dans chaque sous-filière existante dans le département 53",
x = "Filière", x = "Filière",
...@@ -853,19 +909,27 @@ dep_filiere_zaer_sf_72 <- dep_filiere_ssfiliere_zaer[dep_filiere_ssfiliere_zaer$ ...@@ -853,19 +909,27 @@ dep_filiere_zaer_sf_72 <- dep_filiere_ssfiliere_zaer[dep_filiere_ssfiliere_zaer$
dep_filiere_zaer_sf_72 <- dep_filiere_zaer_sf_72[dep_filiere_zaer_sf_72$filiere == "SOLAIRE_PV",] dep_filiere_zaer_sf_72 <- dep_filiere_zaer_sf_72[dep_filiere_zaer_sf_72$filiere == "SOLAIRE_PV",]
couleur <- c(gouvdown::gouv_palettes$pal_gouv_qual1[1], # Définir l'ordre souhaité des sous-filières
gouvdown::gouv_palettes$pal_gouv_qual1[2], order_levels <- c("SOLAIRE_PV_NV_TOIT", "SOLAIRE_PV_RNV_TOIT", "SOLAIRE_PV_NV_OMBRIERE", "SOLAIRE_PV_RNV_OMBRIERE","SOLAIRE_PV_NV_SOL", "SOLAIRE_PV_RNV_SOL", "SOLAIRE_PV_NV_AUTRE", "SOLAIRE_PV_RNV_AUTRE")
gouvdown::gouv_palettes$pal_gouv_qual1[3],
gouvdown::gouv_palettes$pal_gouv_qual1[4], # Convertir detail_filiere en un facteur avec les niveaux spécifiés dans l'ordre souhaité
gouvdown::gouv_palettes$pal_gouv_qual1[5], dep_filiere_zaer_sf_72$detail_filiere <- factor(dep_filiere_zaer_sf_72$detail_filiere, levels = order_levels)
gouvdown::gouv_palettes$pal_gouv_qual1[6],
gouvdown::gouv_palettes$pal_gouv_qual1[7],
gouvdown::gouv_palettes$pal_gouv_qual1[8]) # Correspondance entre les filières et les couleurs
ssfiliere_couleur <- c("SOLAIRE_PV_NV_TOIT" = gouvdown::gouv_palettes$pal_gouv_l[1],
"SOLAIRE_PV_RNV_TOIT" = gouvdown::gouv_palettes$pal_gouv_l[2],
"SOLAIRE_PV_NV_OMBRIERE" = gouvdown::gouv_palettes$pal_gouv_m[1],
"SOLAIRE_PV_RNV_OMBRIERE" = gouvdown::gouv_palettes$pal_gouv_m[2],
"SOLAIRE_PV_NV_SOL" = gouvdown::gouv_palettes$pal_gouv_o[1],
"SOLAIRE_PV_RNV_SOL" = gouvdown::gouv_palettes$pal_gouv_o[2],
"SOLAIRE_PV_NV_AUTRE" = gouvdown::gouv_palettes$pal_gouv_n[1],
"SOLAIRE_PV_RNV_AUTRE" = gouvdown::gouv_palettes$pal_gouv_n[2])
# Tracer le graphique en barres verticales # Tracer le graphique en barres verticales
ggplot(dep_filiere_zaer_sf_72, aes(x = reorder(detail_filiere, -dep_txcom_zaer_ssfil), y = dep_txcom_zaer_ssfil, fill = detail_filiere)) + ggplot(dep_filiere_zaer_sf_72,aes(x = detail_filiere, y = dep_txcom_zaer_ssfil, fill = detail_filiere)) +
geom_bar(stat = "identity", width = 0.5, position = position_dodge()) + geom_bar(stat = "identity", width = 0.5, position = position_dodge()) +
scale_fill_manual(values = couleur) + # Utilisation des couleurs définies scale_fill_manual(values = ssfiliere_couleur) + # Utilisation des couleurs définies
geom_text(aes(label = paste0(round(dep_txcom_zaer_ssfil,1), "%")), position = position_dodge(width = 0.9), vjust = -0.5, size = 4, color = "black") + geom_text(aes(label = paste0(round(dep_txcom_zaer_ssfil,1), "%")), position = position_dodge(width = 0.9), vjust = -0.5, size = 4, color = "black") +
labs(title = "Proportion et nombre de communes ayant des zones définies dans chaque sous-filière existante dans le département 72", labs(title = "Proportion et nombre de communes ayant des zones définies dans chaque sous-filière existante dans le département 72",
x = "Filière", x = "Filière",
...@@ -886,19 +950,27 @@ dep_filiere_zaer_sf_85 <- dep_filiere_ssfiliere_zaer[dep_filiere_ssfiliere_zaer$ ...@@ -886,19 +950,27 @@ dep_filiere_zaer_sf_85 <- dep_filiere_ssfiliere_zaer[dep_filiere_ssfiliere_zaer$
dep_filiere_zaer_sf_85 <- dep_filiere_zaer_sf_85[dep_filiere_zaer_sf_85$filiere == "SOLAIRE_PV",] dep_filiere_zaer_sf_85 <- dep_filiere_zaer_sf_85[dep_filiere_zaer_sf_85$filiere == "SOLAIRE_PV",]
couleur <- c(gouvdown::gouv_palettes$pal_gouv_qual1[1], # Définir l'ordre souhaité des sous-filières
gouvdown::gouv_palettes$pal_gouv_qual1[2], order_levels <- c("SOLAIRE_PV_NV_TOIT", "SOLAIRE_PV_RNV_TOIT", "SOLAIRE_PV_NV_OMBRIERE", "SOLAIRE_PV_RNV_OMBRIERE","SOLAIRE_PV_NV_SOL", "SOLAIRE_PV_RNV_SOL", "SOLAIRE_PV_NV_AUTRE", "SOLAIRE_PV_RNV_AUTRE")
gouvdown::gouv_palettes$pal_gouv_qual1[3],
gouvdown::gouv_palettes$pal_gouv_qual1[4], # Convertir detail_filiere en un facteur avec les niveaux spécifiés dans l'ordre souhaité
gouvdown::gouv_palettes$pal_gouv_qual1[5], dep_filiere_zaer_sf_85$detail_filiere <- factor(dep_filiere_zaer_sf_85$detail_filiere, levels = order_levels)
gouvdown::gouv_palettes$pal_gouv_qual1[6],
gouvdown::gouv_palettes$pal_gouv_qual1[7],
gouvdown::gouv_palettes$pal_gouv_qual1[8]) # Correspondance entre les filières et les couleurs
ssfiliere_couleur <- c("SOLAIRE_PV_NV_TOIT" = gouvdown::gouv_palettes$pal_gouv_l[1],
"SOLAIRE_PV_RNV_TOIT" = gouvdown::gouv_palettes$pal_gouv_l[2],
"SOLAIRE_PV_NV_OMBRIERE" = gouvdown::gouv_palettes$pal_gouv_m[1],
"SOLAIRE_PV_RNV_OMBRIERE" = gouvdown::gouv_palettes$pal_gouv_m[2],
"SOLAIRE_PV_NV_SOL" = gouvdown::gouv_palettes$pal_gouv_o[1],
"SOLAIRE_PV_RNV_SOL" = gouvdown::gouv_palettes$pal_gouv_o[2],
"SOLAIRE_PV_NV_AUTRE" = gouvdown::gouv_palettes$pal_gouv_n[1],
"SOLAIRE_PV_RNV_AUTRE" = gouvdown::gouv_palettes$pal_gouv_n[2])
# Tracer le graphique en barres verticales # Tracer le graphique en barres verticales
ggplot(dep_filiere_zaer_sf_85, aes(x = reorder(detail_filiere, -dep_txcom_zaer_ssfil), y = dep_txcom_zaer_ssfil, fill = detail_filiere)) + ggplot(dep_filiere_zaer_sf_85,aes(x = detail_filiere, y = dep_txcom_zaer_ssfil, fill = detail_filiere)) +
geom_bar(stat = "identity", width = 0.5, position = position_dodge()) + geom_bar(stat = "identity", width = 0.5, position = position_dodge()) +
scale_fill_manual(values = couleur) + # Utilisation des couleurs définies scale_fill_manual(values = ssfiliere_couleur) + # Utilisation des couleurs définies
geom_text(aes(label = paste0(round(dep_txcom_zaer_ssfil,1), "%")), position = position_dodge(width = 0.9), vjust = -0.5, size = 4, color = "black") + geom_text(aes(label = paste0(round(dep_txcom_zaer_ssfil,1), "%")), position = position_dodge(width = 0.9), vjust = -0.5, size = 4, color = "black") +
labs(title = "Proportion et nombre de communes ayant des zones définies dans chaque sous-filière existante dans le département 85", labs(title = "Proportion et nombre de communes ayant des zones définies dans chaque sous-filière existante dans le département 85",
x = "Filière", x = "Filière",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment