Commit 7d7f5a7b authored by David Nortes Martínez's avatar David Nortes Martínez
Browse files

new database gaspar

Showing with 11 additions and 1 deletion
+11 -1
# code to prepare `so_ii_scope` dataset goes here
so_ii_scope = read.csv2(current_version("data-common/so-ii/scope"), colClasses = "character")[["code"]]
so_ii_scope = sort(so_ii_scope)
# code to prepare `so_ii_commune` dataset goes here
......@@ -8,7 +9,8 @@ admin_express = current_version("data-common/data/IGN/ADMIN-EXPRESS/version")
selection = c("ID", "NOM", "NOM_M", "INSEE_COM", "STATUT", "POPULATION", "SIREN_EPCI")
so_ii_commune = sf::st_read(file.path(admin_express, "COMMUNE.shp"))[selection]
names(so_ii_commune) = c("id", "commune", "commune_majuscule", "code", "statut", "pop_2021", "epci", "geometry")
so_ii_commune = so_ii_commune[so_ii_commune[["code"]] %in% so_ii_scope, ]
rownames(so_ii_commune) = so_ii_commune[["code"]]
so_ii_commune = so_ii_commune[so_ii_scope, ]
# code to prepare `so_ii_limit` dataset goes here
......@@ -28,6 +30,13 @@ so_ii_clc[["color"]] = as.character(
)
)
# code to prepare `so_ii_gaspar` dataset goes here
so_ii_gaspar = read.csv2(current_version("data-common/so-ii/gaspar", "catnat_year_n"), header = TRUE, row.names = 1)
so_ii_gaspar = as.matrix(so_ii_gaspar)
colnames(so_ii_gaspar) = gsub("^X", "", colnames(so_ii_gaspar))
so_ii_gaspar = so_ii_gaspar[so_ii_scope, ]
# updating datasets
# actual = setwd(file.path(system.file(package = "geau"), ".."))
......@@ -36,4 +45,5 @@ usethis::use_data(so_ii_scope, internal = FALSE, overwrite = TRUE)
usethis::use_data(so_ii_commune, internal = FALSE, overwrite = TRUE)
usethis::use_data(so_ii_limit, internal = FALSE, overwrite = TRUE)
usethis::use_data(so_ii_clc, internal = FALSE, overwrite = TRUE)
usethis::use_data(so_ii_gaspar, internal = FALSE, overwrite = TRUE)
setwd(actual)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment