Commit 51e67021 authored by Grelot Frederic's avatar Grelot Frederic :swimmer_tone5:
Browse files

Ajout de variables pour so-ii

Showing with 56 additions and 2 deletions
+56 -2
......@@ -13,5 +13,20 @@
*.toc
*~
*#
*.code-workspace
.vscode/
output/
inst/doc
doc
Meta
old/**/output
# Add csv or ods file specifically by hand!
*.csv
*.ods
# Visual Studio Code
settings.json
# local symbolic links
data-personnal
data-confidential
data-common
\ No newline at end of file
# code to prepare `so_ii_scope` dataset goes here
so_ii_scope = read.csv2(current_version("data-common/so-ii/scope"), colClasses = "character")[["code"]]
# code to prepare `so_ii_commune` dataset goes here
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, ]
# code to prepare `so_ii_limit` dataset goes here
so_ii_limit = sf::st_union(so_ii_commune)
# code to prepare `so_ii_clc` dataset goes here
so_ii_clc = readRDS("data-common/data/so-ii/so-ii_clc.rds")
so_ii_clc = so_ii_clc["code_18"]
names(so_ii_clc) = c("clc_2018", "geometry")
color = scales::alpha(c("red3", "darkolivegreen3", "darkgreen", "#4C90B4", "lightblue"), .2)
so_ii_clc[["color"]] = as.character(
cut(
as.integer(substr(so_ii_clc[["clc_2018"]], 1, 1)),
breaks = 5,
labels = color
)
)
# updating datasets
# actual = setwd(file.path(system.file(package = "geau"), ".."))
actual = setwd("geau")
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)
setwd(actual)
File added
File added
File added
File added
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