Skip to content

Commit ab4b1a7

Browse files
committed
Fix prepare_data
1 parent 81f6e55 commit ab4b1a7

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

R/mod_prepare_hpc.R

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ mod_prepare_hpc <- function(
452452

453453
# Loading country boundary data
454454
eu_boundaries <- ecokit::load_as(eu_boundaries) %>%
455-
magrittr::extract2("Bound_sf_Eur_s") %>%
455+
magrittr::extract2("Bound_sf_Eur") %>%
456456
magrittr::extract2("L_03") %>%
457457
suppressWarnings()
458458

@@ -637,7 +637,8 @@ mod_prepare_hpc <- function(
637637
}
638638

639639
eu_boundaries_sub <- dplyr::filter(
640-
eu_boundaries, NAME_ENGL %in% model_country)
640+
eu_boundaries, NAME_ENGL %in% model_country) %>%
641+
dplyr::select(tidyselect::all_of("CNTR_NAME"))
641642

642643
plot_limits <- as.vector(terra::ext(n_sp_subset))
643644
# Relative JPEG height
@@ -838,7 +839,8 @@ mod_prepare_hpc <- function(
838839

839840
n_species_plot <- ggplot2::ggplot(environment = emptyenv()) +
840841
ggplot2::geom_sf(
841-
data = eu_boundaries, fill = "gray98", colour = "black", linewidth = 0.15) +
842+
data = eu_boundaries, fill = "gray98", colour = "black",
843+
linewidth = 0.15) +
842844
tidyterra::geom_spatraster(data = n_species_all) +
843845
ggplot2::facet_wrap(~lyr) +
844846
ggplot2::geom_sf(

0 commit comments

Comments
 (0)