diff --git a/dev/commit-message b/dev/commit-message index 0f898ef60116bb1e0005cd106e6b1afc5b3e3cbf..a439e92a00c723302f32555cd2bb873bd878ae75 100644 --- a/dev/commit-message +++ b/dev/commit-message @@ -1,39 +1,23 @@ -geau Version: 1.0.0.0 +geau Version: 1.0.19.0 0 errors ✔ | 0 warnings ✔ | 0 notes ✔ Note de version : - * NEW add.inset : ajout d'un encart dans une carte - * NEW kable_units : faire un kable en gérant les unités + * COORECTION so_ii_clc avec le bon scope DESCRIPTION - * Version: 1.0.0.0 - -R/add.inset.R - * Première version de la fonction - -R/kable_units.R - * Première version de la fonction + * Version: 1.0.19.0 data - * RAS + * correction de so_ii_clc Documentation mise à jour - * add.inset.Rd - * kable_units.Rd Vignettes * RAS dev - * package.development.R - * commit-message - -presentation - -MISC - * .Rbuildignore - * LICENSE.md: automatique - * NAMESPACE: automatique + * RAS + diff --git a/so.ii/DESCRIPTION b/so.ii/DESCRIPTION index 7a4d6e16fe4730286a82e97a5c6774aa7ab0d8bd..1e73d016fee507857e1ae8f9b81a59a4ca91f679 100644 --- a/so.ii/DESCRIPTION +++ b/so.ii/DESCRIPTION @@ -1,6 +1,6 @@ Package: so.ii Title: Utilities very useful to share within so_ii team -Version: 1.0.18.0 +Version: 1.0.19.0 Authors@R: c( person(given = "Frédéric", diff --git a/so.ii/data-raw/so_ii_clc.R b/so.ii/data-raw/so_ii_clc.R new file mode 100644 index 0000000000000000000000000000000000000000..09fbc34a328105933dacd4c0eed987c8fa2d53b7 --- /dev/null +++ b/so.ii/data-raw/so_ii_clc.R @@ -0,0 +1,45 @@ +# code to prepare `so_ii_clc` dataset goes here +library(sf) +so_ii_clc = readRDS("data-common/data/so-ii/so-ii_clc.rds") +so_ii_clc = so_ii_clc["clc_2018"] + +clc_color = data.frame( + color = scales::alpha( + c( + "red3", + "darkolivegreen3", + "darkgreen", + "#4C90B4", + "lightblue" + ), + .2 + ), + label_fr = c( + "Zone urbaine", + "Zone agricole", + "Forêt, zone naturelle", + "Zone humide", + "Surface d'eau" + ), + label_uk = c( + "Urban area", + "Agricultural area", + "Forest, natural area", + "Humid area", + "Water surface" + ) +) +so_ii_clc[["color"]] = as.character( + cut( + as.integer(substr(so_ii_clc[["clc_2018"]], 1, 1)), + breaks = 5, + labels = clc_color[["color"]] + ) +) + +# updating datasets + +actual = setwd("so.ii") +usethis::use_data(so_ii_clc, internal = FALSE, overwrite = TRUE) +usethis::use_data(clc_color, internal = FALSE, overwrite = TRUE) +setwd(actual) diff --git a/so.ii/data-raw/so_ii_scope.R b/so.ii/data-raw/so_ii_scope.R index 98da0ed186d3790f660e63faf05b4f10260cec08..245a191a99a81d9a6ef1c0c660033dc431d7560a 100644 --- a/so.ii/data-raw/so_ii_scope.R +++ b/so.ii/data-raw/so_ii_scope.R @@ -6,50 +6,8 @@ so_ii_scope = read.csv2( )[["code"]] so_ii_scope = sort(so_ii_scope) -# 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") -clc_color = data.frame( - color = scales::alpha( - c( - "red3", - "darkolivegreen3", - "darkgreen", - "#4C90B4", - "lightblue" - ), - .2 - ), - label_fr = c( - "Zone urbaine", - "Zone agricole", - "Forêt, zone naturelle", - "Zone humide", - "Surface d'eau" - ), - label_uk = c( - "Urban area", - "Agricultural area", - "Forest, natural area", - "Humid area", - "Water surface" - ) -) -so_ii_clc[["color"]] = as.character( - cut( - as.integer(substr(so_ii_clc[["clc_2018"]], 1, 1)), - breaks = 5, - labels = clc_color[["color"]] - ) -) - # updating datasets -# actual = setwd(file.path(system.file(package = "so.ii"), "..")) actual = setwd("so.ii") usethis::use_data(so_ii_scope, internal = FALSE, overwrite = TRUE) -usethis::use_data(so_ii_clc, internal = FALSE, overwrite = TRUE) -usethis::use_data(clc_color, internal = FALSE, overwrite = TRUE) setwd(actual) diff --git a/so.ii/data/clc_color.rda b/so.ii/data/clc_color.rda index 468f6fb9fd841f01298b3298699aa43ff82fe708..95d0997e398275094a4b1abf0e2f2befda2a27cd 100644 Binary files a/so.ii/data/clc_color.rda and b/so.ii/data/clc_color.rda differ diff --git a/so.ii/data/so_ii_clc.rda b/so.ii/data/so_ii_clc.rda index 74deedb83b677f0ca2f3e06f996efde96a945851..34ba87220a804940c65e262925e140fe69b91ced 100644 Binary files a/so.ii/data/so_ii_clc.rda and b/so.ii/data/so_ii_clc.rda differ