Skip to content
Snippets Groups Projects
Commit f462e957 authored by Daniel.Kalioudjoglou's avatar Daniel.Kalioudjoglou
Browse files

mise en page de la publication

modification des cartes 2_2 et 2_7
mis cote a cote les graphes 1_4 et 1_5
rectification de la taille des cartes et graphiques et de la taille des titres des graphs
parent 239f8064
No related branches found
No related tags found
2 merge requests!65maj_avant_transfert_vers_gitlabforge,!56mise en page de la publication
Pipeline #185444 failed
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#' @importFrom glue glue #' @importFrom glue glue
#' @importFrom sf read_sf st_bbox st_buffer st_crs #' @importFrom sf read_sf st_bbox st_buffer st_crs
#' @importFrom attempt stop_if stop_if_not #' @importFrom attempt stop_if stop_if_not
#' @importFrom mapfactory format_fr
#' #'
#' @export #' @export
#' #'
...@@ -52,28 +53,41 @@ creer_carte_2_2 <- function(millesime_obs_artif) { ...@@ -52,28 +53,41 @@ creer_carte_2_2 <- function(millesime_obs_artif) {
carte_2_2 <- ggplot2::ggplot(data) + carte_2_2 <- ggplot2::ggplot(data) +
ggplot2::geom_sf(data = monde, fill = "light grey") + ggplot2::geom_sf(data = monde, fill = "light grey") +
ggplot2::geom_sf(fill = "white") + # carte modifiee
ggplot2::stat_sf_coordinates(ggplot2::aes( # ggplot2::geom_sf(ggplot2::aes(fill= .data$`total en hectares`),
size = .data$`total en hectares`, # color = "black")+
fill = .data$`total en hectares` ggplot2::geom_sf(ggplot2::aes(fill= .data$`total en hectares`))+
), ggplot2::coord_sf(
color = "black", xlim = c(x_min, x_max),
shape = 21, ylim = c(y_min, y_max),
alpha = 0.8 expand = FALSE,
) + crs = sf::st_crs(data),
ggplot2::coord_sf( datum = NA
xlim = c(x_min, x_max), ) +
ylim = c(y_min, y_max),
expand = FALSE,
crs = sf::st_crs(data), # ggplot2::geom_sf(fill = "white") +
datum = NA # ggplot2::stat_sf_coordinates(ggplot2::aes(
) + # size = .data$`total en hectares`,
# fill = .data$`total en hectares`
# ),
# color = "black",
# shape = 21,
# alpha = 0.8
# ) +
# ggplot2::coord_sf(
# xlim = c(x_min, x_max),
# ylim = c(y_min, y_max),
# expand = FALSE,
# crs = sf::st_crs(data),
# datum = NA
# ) +
ggplot2::theme( ggplot2::theme(
panel.background = ggplot2::element_rect(fill = "light blue") panel.background = ggplot2::element_rect(fill = "light blue")
) + ) +
gouvdown::scale_fill_gouv_continuous(palette = "pal_gouv_h", reverse = TRUE, name = "", labels = function(x) format_fr(x, dec = 0)) + gouvdown::scale_fill_gouv_continuous(palette = "pal_gouv_h", reverse = TRUE, name = "", labels = function(x) mapfactory::format_fr(x, dec = 0)) +
# ggplot2::scale_size_area(name="")+ # ggplot2::scale_size_area(name="")+
ggplot2::scale_size_continuous(range = c(0, 20), labels = function(x) format_fr(x, dec = 0)) + ggplot2::scale_size_continuous(range = c(0, 20), labels = function(x) mapfactory::format_fr(x, dec = 0)) +
ggplot2::labs( ggplot2::labs(
title = glue::glue("Nouvelles surfaces consomm\u00e9es entre {millesime_debut} et {millesime_fin} (10 ans)"), title = glue::glue("Nouvelles surfaces consomm\u00e9es entre {millesime_debut} et {millesime_fin} (10 ans)"),
subtitle = "", subtitle = "",
......
...@@ -52,7 +52,9 @@ creer_carte_2_7 <- function(millesime_obs_artif= NULL, code_reg = NULL) { ...@@ -52,7 +52,9 @@ creer_carte_2_7 <- function(millesime_obs_artif= NULL, code_reg = NULL) {
dplyr::pull(.data$NCCENR) dplyr::pull(.data$NCCENR)
fond_cartographique <- mapfactory::fond_carto(nom_reg = nom_region) fond_cartographique <- mapfactory::fond_carto(nom_reg = nom_region)
bins <- stats::quantile(data$valeur,probs = c(0,0.1, 0.25, 0.5,0.75,0.9,1),na.rm=TRUE) # bins <- stats::quantile(data$valeur,probs = c(0,0.1, 0.25, 0.5,0.75,0.9,1),na.rm=TRUE)
bins <- stats::quantile(data$valeur,probs = c(0,0.2, 0.4, 0.6,0.8,1),na.rm=TRUE)
carte_2_7 <- mapfactory::creer_carte_communes(data = data, carte_2_7 <- mapfactory::creer_carte_communes(data = data,
code_region=code_reg, code_region=code_reg,
......
...@@ -42,6 +42,7 @@ creer_graphe_1_4 <- function(millesime_teruti, code_reg){ ...@@ -42,6 +42,7 @@ creer_graphe_1_4 <- function(millesime_teruti, code_reg){
COGiter::filtrer_cog(reg = code_reg) %>% COGiter::filtrer_cog(reg = code_reg) %>%
dplyr::filter(.data$TypeZone == "D\u00e9partements", dplyr::filter(.data$TypeZone == "D\u00e9partements",
.data$date == lubridate::make_date(millesime_teruti,"01","01")) %>% .data$date == lubridate::make_date(millesime_teruti,"01","01")) %>%
# dplyr::filter(.data$date == lubridate::make_date(millesime_teruti,"01","01")) %>%
tidyr::spread(key=.data$variable,value=.data$valeur,fill=0) %>% tidyr::spread(key=.data$variable,value=.data$valeur,fill=0) %>%
tricky::set_standard_names() %>% tricky::set_standard_names() %>%
dplyr::arrange(.data$typezone,.data$zone) %>% dplyr::arrange(.data$typezone,.data$zone) %>%
......
...@@ -34,6 +34,10 @@ texte d'introduction... ...@@ -34,6 +34,10 @@ texte d'introduction...
texte...... texte......
```{r diag barres taux artificialisation par region} ```{r diag barres taux artificialisation par region}
ggplot2::theme_set(ggplot2::theme_minimal() +
ggplot2::theme(plot.caption.position = "plot",
plot.title.position = "plot",
plot.title = ggplot2::element_text(size = 14)))
creer_graphe_1_1(millesime_teruti = params$millesime_teruti, creer_graphe_1_1(millesime_teruti = params$millesime_teruti,
code_reg = params$code_reg ) code_reg = params$code_reg )
``` ```
...@@ -54,18 +58,25 @@ creer_carte_1_3(millesime_ocsge = params$millesime_ocsge, ...@@ -54,18 +58,25 @@ creer_carte_1_3(millesime_ocsge = params$millesime_ocsge,
texte...... texte......
<div class = "row">
<div class = "col-md-6">
```{r graph surfaces artificialisees en volume} ```{r graph surfaces artificialisees en volume}
creer_graphe_1_4(millesime_teruti = params$millesime_teruti, creer_graphe_1_4(millesime_teruti = params$millesime_teruti,
code_reg = params$code_reg) code_reg = params$code_reg)
``` ```
texte... </div>
<div class = "col-md-6">
```{r graph part surfaces artificialisees} ```{r graph part surfaces artificialisees}
creer_graphe_1_5(millesime_teruti = params$millesime_teruti, creer_graphe_1_5(millesime_teruti = params$millesime_teruti,
code_reg = params$code_reg) code_reg = params$code_reg)
``` ```
</div>
</div>
texte... texte...
...@@ -75,6 +86,7 @@ creer_graphe_1_6(millesime_ocsge = params$millesime_ocsge, ...@@ -75,6 +86,7 @@ creer_graphe_1_6(millesime_ocsge = params$millesime_ocsge,
millesime_population = params$millesime_population, millesime_population = params$millesime_population,
code_reg = params$code_reg) code_reg = params$code_reg)
``` ```
texte... texte...
```{r tableau artificialisation OCSGE} ```{r tableau artificialisation OCSGE}
...@@ -103,7 +115,7 @@ creer_graphe_2_3(millesime_obs_artif = params$millesime_obs_artif, ...@@ -103,7 +115,7 @@ creer_graphe_2_3(millesime_obs_artif = params$millesime_obs_artif,
``` ```
```{r graph conso espace departements 10 ans,fig.width=5,fig.height=7} ```{r graph conso espace departements 10 ans,fig.width=7,fig.height=7}
creer_graphe_2_4(millesime_obs_artif = params$millesime_obs_artif, creer_graphe_2_4(millesime_obs_artif = params$millesime_obs_artif,
code_reg = params$code_reg ) code_reg = params$code_reg )
``` ```
...@@ -139,7 +151,11 @@ creer_graphe_3_1(millesime_stock_artif = params$millesime_stock_artif, ...@@ -139,7 +151,11 @@ creer_graphe_3_1(millesime_stock_artif = params$millesime_stock_artif,
millesime_population = params$millesime_population, millesime_population = params$millesime_population,
code_reg = params$code_reg) code_reg = params$code_reg)
``` ```
```{r carte communale de l etalement urbain,fig.width=12,fig.height=8} ```{r carte communale de l etalement urbain,fig.width=9,fig.height=7}
ggplot2::theme_set(ggplot2::theme_minimal() +
ggplot2::theme(plot.caption.position = "plot",
plot.title.position = "plot",
plot.title = ggplot2::element_text(size = 14)))
creer_carte_3_2(millesime_etalement_urbain = params$millesime_etalement_urbain, creer_carte_3_2(millesime_etalement_urbain = params$millesime_etalement_urbain,
police_annotation = "Marianne", police_annotation = "Marianne",
code_reg = params$code_reg ) code_reg = params$code_reg )
...@@ -147,6 +163,10 @@ creer_carte_3_2(millesime_etalement_urbain = params$millesime_etalement_urbain, ...@@ -147,6 +163,10 @@ creer_carte_3_2(millesime_etalement_urbain = params$millesime_etalement_urbain,
```{r graph croissance comparee population artificialisation,fig.width=9,fig.height=7} ```{r graph croissance comparee population artificialisation,fig.width=9,fig.height=7}
ggplot2::theme_set(ggplot2::theme_minimal() +
ggplot2::theme(plot.caption.position = "plot",
plot.title.position = "plot",
plot.title = ggplot2::element_text(size = 14)))
creer_graphe_3_3(millesime_stock_artif = params$millesime_stock_artif, creer_graphe_3_3(millesime_stock_artif = params$millesime_stock_artif,
millesime_population = params$millesime_population, millesime_population = params$millesime_population,
code_reg = params$code_reg) code_reg = params$code_reg)
...@@ -156,12 +176,20 @@ creer_graphe_3_3(millesime_stock_artif = params$millesime_stock_artif, ...@@ -156,12 +176,20 @@ creer_graphe_3_3(millesime_stock_artif = params$millesime_stock_artif,
```{r graph surfaces artificialisees par habitant,fig.width=9,fig.height=7} ```{r graph surfaces artificialisees par habitant,fig.width=9,fig.height=7}
ggplot2::theme_set(ggplot2::theme_minimal() +
ggplot2::theme(plot.caption.position = "plot",
plot.title.position = "plot",
plot.title = ggplot2::element_text(size = 14)))
creer_graphe_3_4(millesime_stock_artif = params$millesime_stock_artif, creer_graphe_3_4(millesime_stock_artif = params$millesime_stock_artif,
millesime_population = params$millesime_population, millesime_population = params$millesime_population,
code_reg = params$code_reg) code_reg = params$code_reg)
``` ```
```{r graph surfaces artificialisees par habitant par type territoire,fig.width=9,fig.height=7} ```{r graph surfaces artificialisees par habitant par type territoire,fig.width=9,fig.height=7}
ggplot2::theme_set(ggplot2::theme_minimal() +
ggplot2::theme(plot.caption.position = "plot",
plot.title.position = "plot",
plot.title = ggplot2::element_text(size = 14)))
creer_graphe_4_2(millesime_stock_artif = params$millesime_stock_artif, creer_graphe_4_2(millesime_stock_artif = params$millesime_stock_artif,
millesime_population = params$millesime_population, millesime_population = params$millesime_population,
code_reg = params$code_reg) code_reg = params$code_reg)
...@@ -174,8 +202,8 @@ creer_graphe_4_2(millesime_stock_artif = params$millesime_stock_artif, ...@@ -174,8 +202,8 @@ creer_graphe_4_2(millesime_stock_artif = params$millesime_stock_artif,
#### Et si l'artificialisation se poursuivait... #### Et si l'artificialisation se poursuivait...
```{r creer_graphe_5_1, fig.height=2.5,fig.width=8} ```{r creer_graphe_5_1, fig.height=2.5,fig.width=8}
creer_graphe_5_1(millesime_stock_artif = params$millesime_stock_artif, # creer_graphe_5_1(millesime_stock_artif = params$millesime_stock_artif,
code_reg = params$code_reg) # code_reg = params$code_reg)
``` ```
#### Quel développement sans objectif de réduction de la consommation d'espace ? #### Quel développement sans objectif de réduction de la consommation d'espace ?
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment