From b66f037639fecfae2c0f842ddda57377ec1d28b8 Mon Sep 17 00:00:00 2001 From: Juliette Engelaere-Lefebvre <37416795+jengelaere@users.noreply.github.com> Date: Wed, 20 Oct 2021 17:22:31 +0200 Subject: [PATCH] =?UTF-8?q?Ajout=20dans=20raw=5Fdata=5F2021.R=20d'un=20blo?= =?UTF-8?q?c=20pour=20charger=20les=20couches=20nouvellement=20cr=C3=A9?= =?UTF-8?q?=C3=A9es=20dans=20le=20SGBD=20de=20la=20DREAL=20(#36)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Mise à jour de la documentation à l'occasion des checks ou de repérage de coquilles --- data-raw/raw_data_2021.R | 13 +++++++++++++ man/communes_cog.Rd | 2 +- man/departements_geo_xx.Rd | 4 ++-- man/regions_geo_xx.Rd | 2 +- man/zonage_abc.Rd | 2 +- 5 files changed, 18 insertions(+), 5 deletions(-) diff --git a/data-raw/raw_data_2021.R b/data-raw/raw_data_2021.R index 08cc29d..0542c1f 100644 --- a/data-raw/raw_data_2021.R +++ b/data-raw/raw_data_2021.R @@ -250,3 +250,16 @@ usethis::use_data(table_passage_com_historique,internal=F,overwrite = T) usethis::use_data(arn_plm,internal=F,overwrite = T) +## Chargement des couches communes et table_passage_com_historique dans production.cogiter +library(datalibaba) +communes2 <- rowwise(communes) %>% + mutate(across(where(is.list), ~paste0(.x, collapse = ", ") %>% as.factor), + across(where(is.factor), as.character)) %>% + ungroup() +poster_data(data = communes2, table = "r_communes_000", schema = "cogiter", pk = "DEPCOM", post_row_name = FALSE, droits_schema = TRUE, db = "production", overwrite = TRUE) +poster_data(data = communes2, table = "r_communes_000_2021", schema = "cogiter", pk = "DEPCOM", post_row_name = FALSE, droits_schema = TRUE, db = "production", overwrite = TRUE) + +table_passage_com_historique2 <- table_passage_com_historique %>% + mutate(across(where(is.factor), as.character)) +poster_data(data = table_passage_com_historique2, table = "r_tb_passage_com_hist_000", schema = "cogiter", pk = "DEPCOM_HIST", post_row_name = FALSE, droits_schema = TRUE, db = "production", overwrite = TRUE) +poster_data(data = table_passage_com_historique2, table = "r_tb_passage_com_hist_000_2021", schema = "cogiter", pk = "DEPCOM_HIST", post_row_name = FALSE, droits_schema = TRUE, db = "production", overwrite = TRUE) diff --git a/man/communes_cog.Rd b/man/communes_cog.Rd index 1ecec04..d673d82 100644 --- a/man/communes_cog.Rd +++ b/man/communes_cog.Rd @@ -19,7 +19,7 @@ A data frame with 37742 rows and 12 variables: \item{NCCENR}{Nom en clair (typographie riche)} \item{CAN}{Code canton. Pour les communes « multi-cantonales » code décliné de 99 à 90 (pseudo-canton) ou de 89 à 80 (communes nouvelles) } \item{COMPARENT}{Code de la commune parente pour les arrondissements municipaux et les communes associées ou déléguées. } -}\if{html}{\out{
}}\preformatted{head(communes_cog) +}\if{html}{\out{
}}\preformatted{head(communes_cog) }\if{html}{\out{
}}\preformatted{## # A tibble: 6 x 12 ## TYPECOM DEPCOM REG DEP CTCD ARR TNCC NCC NCCENR NOM_DEPCOM CAN ## diff --git a/man/departements_geo_xx.Rd b/man/departements_geo_xx.Rd index 67b72af..f758f4a 100644 --- a/man/departements_geo_xx.Rd +++ b/man/departements_geo_xx.Rd @@ -11,11 +11,11 @@ \alias{departements_976_geo} \title{Contour des départements pour le dernier millésime connu} \format{ -Un dataframe avec une ligne par départements et 3 variables. +Un dataframe avec une ligne par departement et 3 variables. \describe{ \item{DEP}{Code Insee} \item{geometry}{géométrie} -\item{AREA}{Aire du département} +\item{AREA}{Aire du departement} } } \usage{ diff --git a/man/regions_geo_xx.Rd b/man/regions_geo_xx.Rd index 4571f3d..9bbac45 100644 --- a/man/regions_geo_xx.Rd +++ b/man/regions_geo_xx.Rd @@ -15,7 +15,7 @@ Un dataframe avec une ligne par régions et 3 variables. \describe{ \item{REG}{Code Insee} \item{geometry}{géométrie} -\item{AREA}{Aire du département} +\item{AREA}{Aire de la region} } } \usage{ diff --git a/man/zonage_abc.Rd b/man/zonage_abc.Rd index fd9a86f..b6253b5 100644 --- a/man/zonage_abc.Rd +++ b/man/zonage_abc.Rd @@ -15,6 +15,6 @@ A data frame with 34970 rows and 2 variables: zonage_abc } \description{ -Un dataset contenant pour chaque commune du GOG 2019 le zonage ABC 2014 révisé en 2019 correspondant +Un dataset contenant pour chaque commune du COG 2019 le zonage ABC 2014 révisé en 2019 correspondant } \keyword{datasets}