Skip to content

Commit cf42542

Browse files
committed
NAPS processing
1 parent 0a3a77a commit cf42542

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

R/dwf_naps_plot.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ naps_plot <- function(species = NULL, env_file = ".env") {
101101
magrittr::extract2("L_10")
102102
last_update <- paste0("Last update: ", format(Sys.Date(), "%d %B %Y"))
103103

104-
grid_100_sf <- fs::path(path_grid_ref, "grid_100_sf.RData") %>%
104+
grid_100_sf <- fs::path(path_grid_ref, "Grid_100_sf.RData") %>%
105105
ecokit::load_as() %>%
106106
magrittr::extract2("Grid_100_sf_s")
107107

R/dwf_naps_process.R

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -282,8 +282,7 @@ naps_process <- function(
282282
# Run the distribution function
283283
species_data <- tryCatch(
284284
expr = {
285-
# IASDT.R::
286-
naps_distribution(
285+
IASDT.R::naps_distribution(
287286
species = sp_name, env_file = env_file, verbose = FALSE)
288287
},
289288
error = function(e) {
@@ -340,8 +339,7 @@ naps_process <- function(
340339
future.scheduling = Inf, future.seed = TRUE,
341340
future.packages = pkg_to_export,
342341
future.globals = c(
343-
"env_file", "paths_all", "species_taxa", "update_citizen",
344-
"naps_distribution"))
342+
"env_file", "paths_all", "species_taxa", "update_citizen"))
345343

346344
invisible(gc())
347345

@@ -778,8 +776,7 @@ naps_process <- function(
778776
sort(unique(species_pa_data$n_cells_all)),
779777
~ tibble::tibble(
780778
hab = hab, threshold = .x,
781-
n_sp = sum(curr_data$n_cells_all >= .x, na.rm = TRUE)))
782-
}) %>%
779+
n_sp = sum(curr_data$n_cells_all >= .x, na.rm = TRUE)))}) %>%
783780
dplyr::mutate(
784781
hab = stringr::str_remove(hab, "^hab_"),
785782
hab = stringr::str_replace(hab, "_", " - "),
@@ -941,7 +938,7 @@ naps_process <- function(
941938
},
942939
future.scheduling = Inf, future.seed = TRUE,
943940
future.packages = pkg_to_export,
944-
future.globals = c("env_file", "paths_all", "species_taxa"))
941+
future.globals = c("env_file", "species_taxa"))
945942

946943

947944
# validate that all plots were created

0 commit comments

Comments
 (0)