mapme-initiative / mapme.biodiversity

Efficient analysis of spatial biodiversity datasets for global portfolios
https://mapme-initiative.github.io/mapme.biodiversity/
GNU General Public License v3.0
24 stars 7 forks source link

fixes issue with url generation for gfw emissions layers (#274) #275

Closed goergen95 closed 1 month ago

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 83.81%. Comparing base (7a6491f) to head (7d01e44). Report is 9 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #275 +/- ## ========================================== - Coverage 84.46% 83.81% -0.65% ========================================== Files 49 49 Lines 2247 2262 +15 ========================================== - Hits 1898 1896 -2 - Misses 349 366 +17 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

fBedecarrats commented 1 month ago

Great, thanks! Do you need me to review and validate?

fBedecarrats commented 1 month ago

Great, thanks! Do you need me to review and validate?

Ah, I just saw that you merged it. Thanks!

fBedecarrats commented 1 month ago

For the record, it works!

detach("package:mapme.biodiversity", unload = TRUE)
devtools::install_github("https://github.com/mapme-initiative/mapme.biodiversity")
library(mapme.biodiversity)
aoi_path <- system.file("extdata", "sierra_de_neiba_478140.gpkg", package = "mapme.biodiversity")
aoi2 <- st_read(aoi_path, quiet = TRUE) %>%
  st_cast("POLYGON")
aoi2

outdir2 <- "my_test2"
dir.create(outdir2, showWarnings = FALSE)

mapme_options(
  outdir = outdir2,
  verbose = TRUE
)

aoi2 <- get_resources(
  x = aoi2,
  get_gfw_emissions())
file.exists("my_test2/gfw_emissions/gfw_forest_carbon_gross_emissions_Mg_CO2e_px_20N_080W.tif")
# [1] TRUE