so_ii_catchment.R 544 Bytes
Newer Older
1
# code to prepare `so_ii_catchment` dataset goes here
David Nortes-Martinez's avatar
David Nortes-Martinez committed
2

3
file_dir = geau::current_version(
David Nortes-Martinez's avatar
David Nortes-Martinez committed
4
5
6
    "data-common/so-ii/topage",
    pattern = "^[0-9-]+$"
)
Grelot Frederic's avatar
Grelot Frederic committed
7
8
9
10
so_ii_catchment = sf::st_read(file.path(file_dir, "bassin_versant.shp"))
names(so_ii_catchment) = c("id", "catchment_name", "degre", "geometry")
Encoding(so_ii_catchment[["catchment_name"]]) = "UTF-8"
so_ii_catchment[["degre"]] = factor(so_ii_catchment[["degre"]])
David Nortes-Martinez's avatar
David Nortes-Martinez committed
11
12
13
14
15
16

# updating datasets

actual = setwd("geau")
usethis::use_data(so_ii_catchment, internal = FALSE, overwrite = TRUE)
setwd(actual)