diff --git a/R/creer_tableau_synthese_annuelle.R b/R/creer_tableau_synthese_annuelle.R index 954b7a5e0fa6a89ab56300e7b769fafc636d48b2..79e9280d2bbbe567d3c9b5f8cf853fbf1ec0c9eb 100644 --- a/R/creer_tableau_synthese_annuelle.R +++ b/R/creer_tableau_synthese_annuelle.R @@ -35,6 +35,7 @@ creer_tableau_synthese_annuel <- function(data = indic_ecln, "PrixM2 - Appartements" ) } + input <- indic_ecln %>% dplyr::filter( .data$Indicateur %in% indic, @@ -71,7 +72,7 @@ creer_tableau_synthese_annuel <- function(data = indic_ecln, kableExtra::row_spec(1:2, bold = T, background = "#f0f0f5") %>% kableExtra::add_header_above(c(" " = 1, "Ventes" = 2, "Mises en vente" = 2, "Encours" = 2, "Prix au m2" = 2)) %>% kableExtra::add_indent(c(3:nombre_zone)) %>% - kableExtra::footnote(general_title="",general = "NA : donn\u00e9es non communiqu\u00e9es (secret statistique)") + kableExtra::footnote(general_title="",general = "NC : donn\u00e9es non communiqu\u00e9es (secret statistique)") if ("ABC" %in% type_zone) { res <- res %>% kableExtra::row_spec(nombre_fr_dep_reg:nombre_zone, bold = T, background = "#bebece") diff --git a/R/creer_tableau_synthese_trimestrielle.R b/R/creer_tableau_synthese_trimestrielle.R index be3226fe880aa03dbc88722d8fee05efdb5ef087..c8da32807a9fd30deaa7536c9ce10d8eec6a8100 100644 --- a/R/creer_tableau_synthese_trimestrielle.R +++ b/R/creer_tableau_synthese_trimestrielle.R @@ -34,6 +34,7 @@ creer_tableau_synthese_trimestrielle <- function(data = indic_ecln, "PrixM2 - Appartements" ) } + indic_ecln %>% dplyr::filter( .data$Indicateur %in% indic, @@ -58,7 +59,7 @@ creer_tableau_synthese_trimestrielle <- function(data = indic_ecln, by = c("TypeZone", "Zone") ) %>% dplyr::arrange(.data$Zone) %>% - dplyr::select(2, 6, 10, 4, 8, 3, 7, 5, 9) %>% + dplyr::select(2, 6, 10, 4, 8, 3, 7, 5, 9)%>% knitr::kable("html", col.names = c( "Zone", "Sur le dernier trimestre", "Evolution sur un an (en %)", @@ -72,6 +73,6 @@ creer_tableau_synthese_trimestrielle <- function(data = indic_ecln, kableExtra::kable_styling(font_size = 12) %>% kableExtra::row_spec(1:2, bold = T, background = "#f0f0f5") %>% kableExtra::add_header_above(c(" " = 1, "Ventes" = 2, "Mises en vente" = 2, "Encours" = 2, "Prix au m2" = 2)) %>% - kableExtra::footnote(general_title="",general = "NA : donn\u00e9es non communiqu\u00e9es (secret statistique)") + kableExtra::footnote(general_title="",general = "NC : donn\u00e9es non communiqu\u00e9es (secret statistique)") } diff --git a/inst/rmarkdown/templates/ecln_conjoncture/skeleton/skeleton.Rmd b/inst/rmarkdown/templates/ecln_conjoncture/skeleton/skeleton.Rmd index b33bdc3984043ebd355e5599005e5029028705db..277d030976a89b04826a7afd4277922da7a305da 100644 --- a/inst/rmarkdown/templates/ecln_conjoncture/skeleton/skeleton.Rmd +++ b/inst/rmarkdown/templates/ecln_conjoncture/skeleton/skeleton.Rmd @@ -99,12 +99,14 @@ A COMPLETER #### Chiffres trimestriels ```{r logementstableautrim} +opts <- options(knitr.kable.NA = "NC") creer_tableau_synthese_trimestrielle(type_logement = "logement") ``` #### Chiffres cumulés sur les 4 derniers trimestres ```{r logementstableaucumul} +opts <- options(knitr.kable.NA = "NC") creer_tableau_synthese_annuel( type_logement = "logement", type_zone = typezone @@ -213,12 +215,14 @@ A COMPLETER #### Chiffres trimestriels ```{r collectiftableautrim} +opts <- options(knitr.kable.NA = "NC") creer_tableau_synthese_trimestrielle(type_logement = "collectif") ``` #### Chiffres cumulés sur les 4 derniers trimestres ```{r collectiftableaucumul} +opts <- options(knitr.kable.NA = "NC") creer_tableau_synthese_annuel( type_logement = "collectif", type_zone = typezone @@ -329,12 +333,14 @@ A COMPLETER #### Chiffres trimestriels ```{r individueltableautrim} +opts <- options(knitr.kable.NA = "NC") creer_tableau_synthese_trimestrielle(type_logement = "individuel") ``` #### Chiffres cumulés sur les 4 derniers trimestres ```{r individueltableaucumul} +opts <- options(knitr.kable.NA = "NC") creer_tableau_synthese_annuel( type_logement = "individuel", type_zone = typezone diff --git a/man/indic_ecln.Rd b/man/indic_ecln.Rd index b25a6d1f44f7383eb3739875f32c84bf2786c944..3a095584ef7de95373e076c393f8858aeececd19 100644 --- a/man/indic_ecln.Rd +++ b/man/indic_ecln.Rd @@ -6,7 +6,7 @@ \alias{indic_ecln} \title{Table contenant les différents indicateurs de la source ecln utiles pour la publication.} \format{ -Table de 2197156 lignes et 9 colonnes: +Table de 96720 lignes et 10 colonnes: \describe{ \item{TypeZone}{Type de territoire} \item{CodeZone}{Code du territoire}