diff --git a/geau/DESCRIPTION b/geau/DESCRIPTION index fc1965323f3ad22acc2eac33ac40a706668f4a9b..a0062160655e736d1ad4c7dacb636d37c590ee14 100644 --- a/geau/DESCRIPTION +++ b/geau/DESCRIPTION @@ -1,6 +1,6 @@ Package: geau Title: Utilities very useful to share within geau-inondation team -Version: 1.0.11.2 +Version: 1.0.12.0 Authors@R: c( person(given = "Frédéric", diff --git a/geau/R/data.r b/geau/R/data.r index 0c159185b7c7fa469f84f4d2010d0c68b7f45c46..94ae97c47487e84bc83fa4a9277cef00d7fee496 100644 --- a/geau/R/data.r +++ b/geau/R/data.r @@ -111,6 +111,20 @@ #' @format sfc_POLYGON of length 1 "so_ii_limit" +#' Spatial definition of districts of Montpellier city +#' +#' A dataset containing the spatial definition of all districts +#' for Montpellier. +#' +#' @format sf data.frame 31 rows, 2 variables +#' \describe{ +#' \item{district_group}{integer, how districts are grouped in Montpellier} +#' \item{district_name}{character,name of each district} +#' } +#' +#' @source \url{https://data.montpellier3m.fr/dataset/sous-quartiers-de-montpellier} +"so_ii_montpellier" + #' Local collectivities included in so-ii #' #' A dataset containing the INSEE code of all local collectivities diff --git a/geau/data-raw/so_ii_montpellier.R b/geau/data-raw/so_ii_montpellier.R new file mode 100644 index 0000000000000000000000000000000000000000..ca8bd2b79b160c97969b8d4c9ecc9695ee2a959c --- /dev/null +++ b/geau/data-raw/so_ii_montpellier.R @@ -0,0 +1,19 @@ +# code to prepare `so_ii_onrn` dataset goes here + +so_ii_montpellier = sf::st_read( + geau::current_version("data-common/so-ii/montpellier", "shp") +) +so_ii_montpellier = sf::st_transform( + so_ii_montpellier, + crs = sf::st_crs(geau::so_ii_limit) +) +so_ii_montpellier = so_ii_montpellier[c("QUARTIER","LIBSQUART")] +names(so_ii_montpellier) = c("district_group", "district_name", "geometry") +Encoding(so_ii_montpellier[["district_name"]]) = "UTF-8" + +# updating datasets + +# actual = setwd(file.path(system.file(package = "geau"), "..")) +actual = setwd("geau") +usethis::use_data(so_ii_montpellier, internal = FALSE, overwrite = TRUE) +setwd(actual) diff --git a/geau/data/so_ii_montpellier.rda b/geau/data/so_ii_montpellier.rda new file mode 100644 index 0000000000000000000000000000000000000000..d0db8889be52c9360b85d71d7982e62a14e6d50e Binary files /dev/null and b/geau/data/so_ii_montpellier.rda differ diff --git a/geau/man/so_ii_montpellier.Rd b/geau/man/so_ii_montpellier.Rd new file mode 100644 index 0000000000000000000000000000000000000000..cbb5000671d8a7e7825e9930c557e666ee7d5d7f --- /dev/null +++ b/geau/man/so_ii_montpellier.Rd @@ -0,0 +1,24 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/data.r +\docType{data} +\name{so_ii_montpellier} +\alias{so_ii_montpellier} +\title{Spatial definition of districts of Montpellier city} +\format{ +sf data.frame 31 rows, 2 variables +\describe{ +\item{district_group}{integer, how districts are grouped in Montpellier} +\item{district_name}{character,name of each district} +} +} +\source{ +\url{https://data.montpellier3m.fr/dataset/sous-quartiers-de-montpellier} +} +\usage{ +so_ii_montpellier +} +\description{ +A dataset containing the spatial definition of all districts +for Montpellier. +} +\keyword{datasets}