Commit 441eab38 authored by David Nortes Martínez's avatar David Nortes Martínez
Browse files

new map theme based on gaspar ddbb

parent 7d7f5a7b
1 merge request!2Resolve "add gaspar data"
Showing with 19 additions and 2 deletions
+19 -2
......@@ -20,7 +20,7 @@
#' # To be added (soon)
#' }
map_so_ii = function(dataset, dataset_legend = NULL, theme = "clc", bar = TRUE, path = NULL, ...) {
map_so_ii = function(dataset, dataset_legend = NULL, theme = c("clc", "gaspar"), bar = TRUE, path = NULL, gaspar_year, ...) {
if (!is.null(path)) {
switch(
......@@ -45,6 +45,23 @@ map_so_ii = function(dataset, dataset_legend = NULL, theme = "clc", bar = TRUE,
)
}
if ("gaspar" %in% theme) {
if (!missing(gaspar_year)) {
border = "grey80"
color = ifelse(geau::so_ii_gaspar[ , gaspar_year] > 0, scales::alpha("grey80", .5), NA)
} else {
border = NA
color = NA
}
plot(
geau::so_ii_commune[["geometry"]],
border = border,
col = color,
add = TRUE
)
}
plot(dataset[["geometry"]], add = TRUE, ...)
if (bar == TRUE) {
......@@ -62,4 +79,4 @@ map_so_ii = function(dataset, dataset_legend = NULL, theme = "clc", bar = TRUE,
}
if (!is.null(path)) invisible(grDevices::dev.off())
}
\ No newline at end of file
}
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