data-raw/com_2024.R

# code to prepare `cog_2023` dataset goes here

# Avoid non-ascii warning by forcing to UTF-8 encode
com_2024 <- read.csv("https://www.insee.fr/fr/statistiques/fichier/7766585/v_commune_2024.csv") |>
   dplyr::filter(!is.na(REG)) |>
   dplyr::select(COM, LIBELLE)

Encoding(com_2024$LIBELLE) <- "UTF-8"
com_2024$LIBELLE <- iconv(
   com_2024$LIBELLE,
   "UTF-8",
   "UTF-8"
)

usethis::use_data(com_2024, overwrite = T)
paul-carteron/happign documentation built on June 15, 2025, 8:24 a.m.