Skip to content

Commit

Permalink
Adapt to SIANE 2024
Browse files Browse the repository at this point in the history
  • Loading branch information
dieghernan committed Aug 2, 2024
1 parent 551cb7b commit 1a7867d
Show file tree
Hide file tree
Showing 15 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: mapSpain
Title: Administrative Boundaries of Spain
Version: 0.9.1
Version: 0.9.1.9000
Authors@R:
person("Diego", "Hernangómez", , "[email protected]", role = c("aut", "cre", "cph"),
comment = c(ORCID = "0000-0001-8457-4658", affiliation = "rOpenSpain"))
Expand Down
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# mapSpain (development version)

# mapSpain 0.9.1

- Update actions and docs.
Expand Down
2 changes: 1 addition & 1 deletion R/esp_get_ccaa.R
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ esp_get_ccaa_siane <- function(ccaa = NULL, year = Sys.Date(), epsg = "4258",
initcols <- colnames(sf::st_drop_geometry(data_sf))

# Add codauto
data_sf$lab <- data_sf$nombres_f
data_sf$lab <- data_sf$rotulo

data_sf$lab <- gsub("Ciudad de ", "", data_sf$lab, fixed = TRUE)
data_sf$lab <- gsub("/Catalunya", "", data_sf$lab)
Expand Down
1 change: 1 addition & 0 deletions R/esp_get_hypsobath.R
Original file line number Diff line number Diff line change
Expand Up @@ -154,4 +154,5 @@ esp_get_hypsobath <- function(epsg = "4258", cache = TRUE, update_cache = FALSE,
)

data_sf <- sf::st_transform(data_sf, as.double(init_epsg))
data_sf
}
13 changes: 13 additions & 0 deletions R/utils_siane.R
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,11 @@ esp_hlp_get_siane <- function(type,
# Transform and bind
data_sf2 <- sf::st_transform(data_sf2, sf::st_crs(data_sf1))

if (ncol(data_sf1) != ncol(data_sf2)) {
data_sf2[, setdiff(names(data_sf1), names(data_sf2))] <- NA
}


data_sf <- rbind(data_sf1, data_sf2)
} else {
if (verbose) {
Expand All @@ -243,6 +248,14 @@ esp_hlp_get_siane <- function(type,
data_sf <- data_sf1
}
# Date management
# Need to adjust on 2024 dist
if (type %in% c(
"roads", "riverline", "riverarea",
"orogarea", "orogline"
)) {
data_sf$fecha_baja <- NA
}

mindate <- min(data_sf$fecha_alta)
maxdate <- Sys.Date()
year <- as.character(year)
Expand Down
Binary file modified data/esp_codelist.rda
Binary file not shown.
Binary file modified data/esp_tiles_providers.rda
Binary file not shown.
Binary file modified data/leaflet.providersESP.df.rda
Binary file not shown.
Binary file modified img/README-static-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified vignettes/basic-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified vignettes/basic2-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified vignettes/basic3-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified vignettes/choro-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified vignettes/giscoR-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified vignettes/thematic-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 1a7867d

Please sign in to comment.