Skip to content

Commit

Permalink
feat: add municipal data for Russia from 1990 to 2023
Browse files Browse the repository at this point in the history
  • Loading branch information
Nenuial authored Sep 15, 2024
1 parent ead608d commit 731a709
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 0 deletions.
16 changes: 16 additions & 0 deletions R/data_doc_oc_russie.R
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,22 @@
#' @source <https://showdata.gks.ru/>
"oc_russie_2020_population_municipale"

#' Population municipale en Russie
#'
#' Un tableau de la population municipale en Russie
#' de 1990 à 2023.
#'
#' @format Un tibble avec 5 colonnes et 2806 lignes
#' \describe{
#' \item{codes}{OKTMO Codes}
#' \item{region}{Nom de la région en russe}
#' \item{adm1_code}{Identifiant ADM1 (pour NaturalEarth)}
#' \item{year}{Année}
#' \item{pop}{Population}
#' }
#' @source <https://showdata.gks.ru/report/278930>
"oc_russie_2023_population"

#' Évolution de la population en Russie
#'
#' Un tableau de l'évolution de la population en Russie
Expand Down
31 changes: 31 additions & 0 deletions data-raw/oc_russie.R
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,37 @@ pop_evol_interm |>

usethis::use_data(oc_russie_2020_evolution_population, overwrite = TRUE)

readxl::read_excel(
here::here("inst/extdata/oc_russie/rosstat/population/2024_population.xlsx"),
skip = 4L,
col_names = c("region", "codes", 1990:2023),
) |>
dplyr::select(-region) |>
dplyr::mutate(
adm1_code = geotools::gtl_admin_code(
codes,
origin = "oktmo",
destination = "adm1",
warn = FALSE,
country = "Russia"
),
region = geotools::gtl_admin_code(
codes,
origin = "oktmo",
destination = "region.name.en",
warn = FALSE,
country = "Russia"
)
) |>
tidyr::drop_na(region) |>
tidyr::pivot_longer(
tidyselect::num_range("", 1990:2023),
names_to = "year",
values_to = "pop"
) |>
tidyr::drop_na(pop) -> oc_russie_2023_population

usethis::use_data(oc_russie_2023_population, overwrite = TRUE)

# Mariages ----------------------------------------------------------------

Expand Down
Binary file added data/oc_russie_2023_population.rda
Binary file not shown.
27 changes: 27 additions & 0 deletions man/oc_russie_2023_population.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 731a709

Please sign in to comment.