Skip to content

Commit

Permalink
Merge pull request #22 from mapme-initiative/20-reconsider-using-dot-…
Browse files Browse the repository at this point in the history
…in-front-of-asset-ids

rename .assetid to assetid
  • Loading branch information
goergen95 authored Apr 27, 2022
2 parents 925c18c + 612b93f commit 9e0a62f
Show file tree
Hide file tree
Showing 56 changed files with 434 additions and 184 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: mapme.biodiversity
Title: Efficient Monitoring of Global Biodiversity Portfolios
Version: 0.0.1
Version: 0.1.0
Authors@R: c(
person("Darius A.", "Görgen", , "darius2402@web.de", role = c("aut", "cre")),
person("Om Prakash", "Bhandari", role = "aut")
Expand Down
28 changes: 26 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# mapme.biodiversity (development version)

## Breaking changes

## New features

## Internal

# mapme.biodiversity 0.1.0

## Breaking changes
* renamed '.assetid' to 'assetid' (#22)

## New features
* None

## Internal
* ensured that tests and examples adhere to CRAN policies of
only writing to the temporal directory (#22)

# mapme.biodiversity 0.0.1

## Initial release

* Added a `NEWS.md` file to track changes to the package.
* initial supported resources are:
- ecoregions
Expand Down Expand Up @@ -45,6 +67,8 @@
* on MacOS, the s2 engine for spherical geometric vector operations is disabled and
lwgeom is used instead.

* Introduced absolute URLS in userguide.Rmd pointing to the online documentation (#58)
* \value tags added to all exported functions explaining what is the output/sideffect (#58)
## Internal

* Introduced absolute URLS in userguide.Rmd pointing to the online documentation (#59)
* \value tags added to all exported functions explaining what is the output/sideffect (#59)
* using requireNamespace() instead of installed.packages() to check if packages listed in SUGGEST are loadable (#58)
12 changes: 10 additions & 2 deletions R/calc_accessibility.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,20 @@
#' @examples
#' library(sf)
#' library(mapme.biodiversity)
#'
#' temp_loc <- file.path(tempdir(), "mapme.biodiversity")
#' if(!file.exists(temp_loc)){
#' dir.create(temp_loc)
#' resource_dir <- system.file("res", package = "mapme.biodiversity")
#' file.copy(resource_dir, temp_loc, recursive = TRUE)
#' }
#'
#' (aoi <- system.file("extdata", "sierra_de_neiba_478140_2.gpkg", package = "mapme.biodiversity") %>%
#' read_sf() %>%
#' init_portfolio(
#' years = 2022,
#' outdir = system.file("res", package = "mapme.biodiversity"),
#' tmpdir = system.file("tmp", package = "mapme.biodiversity"),
#' outdir = file.path(temp_loc, "res"),
#' tmpdir = tempdir(),
#' add_resources = FALSE,
#' cores = 1,
#' verbose = FALSE
Expand Down
12 changes: 10 additions & 2 deletions R/calc_biome.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,20 @@
#' @examples
#' library(sf)
#' library(mapme.biodiversity)
#'
#' temp_loc <- file.path(tempdir(), "mapme.biodiversity")
#' if(!file.exists(temp_loc)){
#' dir.create(temp_loc)
#' resource_dir <- system.file("res", package = "mapme.biodiversity")
#' file.copy(resource_dir, temp_loc, recursive = TRUE)
#' }
#'
#' (aoi <- system.file("extdata", "sierra_de_neiba_478140_2.gpkg", package = "mapme.biodiversity") %>%
#' read_sf() %>%
#' init_portfolio(
#' years = 2001,
#' outdir = system.file("res", package = "mapme.biodiversity"),
#' tmpdir = system.file("tmp", package = "mapme.biodiversity"),
#' outdir = file.path(temp_loc, "res"),
#' tmpdir = tempdir(),
#' add_resources = FALSE,
#' cores = 1,
#' verbose = FALSE
Expand Down
12 changes: 10 additions & 2 deletions R/calc_chirpsprec.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,20 @@
#' if(Sys.getenv("NOT_CRAN") == "true"){
#' library(sf)
#' library(mapme.biodiversity)
#'
#' temp_loc <- file.path(tempdir(), "mapme.biodiversity")
#' if(!file.exists(temp_loc)){
#' dir.create(temp_loc)
#' resource_dir <- system.file("res", package = "mapme.biodiversity")
#' file.copy(resource_dir, temp_loc, recursive = TRUE)
#' }
#'
#' (aoi <- system.file("extdata", "sierra_de_neiba_478140_2.gpkg", package = "mapme.biodiversity") %>%
#' read_sf() %>%
#' init_portfolio(
#' years = 2010,
#' outdir = system.file("res", package = "mapme.biodiversity"),
#' tmpdir = system.file("tmp", package = "mapme.biodiversity"),
#' outdir = file.path(temp_loc, "res"),
#' tmpdir = tempdir(),
#' cores = 1,
#' verbose = FALSE
#' ) %>%
Expand Down
12 changes: 10 additions & 2 deletions R/calc_drought_indicator.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,20 @@
#' @examples
#' library(sf)
#' library(mapme.biodiversity)
#'
#' temp_loc <- file.path(tempdir(), "mapme.biodiversity")
#' if(!file.exists(temp_loc)){
#' dir.create(temp_loc)
#' resource_dir <- system.file("res", package = "mapme.biodiversity")
#' file.copy(resource_dir, temp_loc, recursive = TRUE)
#' }
#'
#' (aoi <- system.file("extdata", "sierra_de_neiba_478140_2.gpkg", package = "mapme.biodiversity") %>%
#' read_sf() %>%
#' init_portfolio(
#' years = 2022,
#' outdir = system.file("res", package = "mapme.biodiversity"),
#' tmpdir = system.file("tmp", package = "mapme.biodiversity"),
#' outdir = file.path(temp_loc, "res"),
#' tmpdir = tempdir(),
#' add_resources = FALSE,
#' cores = 1,
#' verbose = FALSE
Expand Down
12 changes: 10 additions & 2 deletions R/calc_elevation.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,20 @@
#' @examples
#' library(sf)
#' library(mapme.biodiversity)
#'
#' temp_loc <- file.path(tempdir(), "mapme.biodiversity")
#' if(!file.exists(temp_loc)){
#' dir.create(temp_loc)
#' resource_dir <- system.file("res", package = "mapme.biodiversity")
#' file.copy(resource_dir, temp_loc, recursive = TRUE)
#' }
#'
#' (aoi <- system.file("extdata", "sierra_de_neiba_478140_2.gpkg", package = "mapme.biodiversity") %>%
#' read_sf() %>%
#' init_portfolio(
#' years = 2000:2020,
#' outdir = system.file("res", package = "mapme.biodiversity"),
#' tmpdir = system.file("tmp", package = "mapme.biodiversity"),
#' outdir = file.path(temp_loc, "res"),
#' tmpdir = tempdir(),
#' add_resources = FALSE,
#' cores = 1,
#' verbose = FALSE
Expand Down
12 changes: 10 additions & 2 deletions R/calc_emissions.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,20 @@
#' @examples
#' library(sf)
#' library(mapme.biodiversity)
#'
#' temp_loc <- file.path(tempdir(), "mapme.biodiversity")
#' if(!file.exists(temp_loc)){
#' dir.create(temp_loc)
#' resource_dir <- system.file("res", package = "mapme.biodiversity")
#' file.copy(resource_dir, temp_loc, recursive = TRUE)
#' }
#'
#' (aoi <- system.file("extdata", "sierra_de_neiba_478140_2.gpkg", package = "mapme.biodiversity") %>%
#' read_sf() %>%
#' init_portfolio(
#' years = 2016:2017,
#' outdir = system.file("res", package = "mapme.biodiversity"),
#' tmpdir = system.file("tmp", package = "mapme.biodiversity"),
#' outdir = file.path(temp_loc, "res"),
#' tmpdir = tempdir(),
#' add_resources = FALSE,
#' cores = 1,
#' verbose = FALSE
Expand Down
12 changes: 10 additions & 2 deletions R/calc_gmw.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,22 @@
#' @examples
#' library(sf)
#' library(mapme.biodiversity)
#'
#' temp_loc <- file.path(tempdir(), "mapme.biodiversity")
#' if(!file.exists(temp_loc)){
#' dir.create(temp_loc)
#' resource_dir <- system.file("res", package = "mapme.biodiversity")
#' file.copy(resource_dir, temp_loc, recursive = TRUE)
#' }
#'
#' (aoi <- system.file("extdata", "shell_beach_protected_area_41057_B.gpkg",
#' package = "mapme.biodiversity"
#' ) %>%
#' read_sf() %>%
#' init_portfolio(
#' years = c(1996, 2016),
#' outdir = system.file("res", package = "mapme.biodiversity"),
#' tmpdir = system.file("tmp", package = "mapme.biodiversity"),
#' outdir = file.path(temp_loc, "res"),
#' tmpdir = tempdir(),
#' add_resources = FALSE,
#' cores = 1,
#' verbose = FALSE
Expand Down
12 changes: 10 additions & 2 deletions R/calc_landcover.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,20 @@
#' @examples
#' library(sf)
#' library(mapme.biodiversity)
#'
#' temp_loc <- file.path(tempdir(), "mapme.biodiversity")
#' if(!file.exists(temp_loc)){
#' dir.create(temp_loc)
#' resource_dir <- system.file("res", package = "mapme.biodiversity")
#' file.copy(resource_dir, temp_loc, recursive = TRUE)
#' }
#'
#' (aoi <- system.file("extdata", "sierra_de_neiba_478140_2.gpkg", package = "mapme.biodiversity") %>%
#' read_sf() %>%
#' init_portfolio(
#' years = 2016:2017,
#' outdir = system.file("res", package = "mapme.biodiversity"),
#' tmpdir = system.file("tmp", package = "mapme.biodiversity"),
#' outdir = file.path(temp_loc, "res"),
#' tmpdir = tempdir(),
#' add_resources = FALSE,
#' cores = 1,
#' verbose = FALSE
Expand Down
12 changes: 10 additions & 2 deletions R/calc_popcount.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,20 @@
#' @examples
#' library(sf)
#' library(mapme.biodiversity)
#'
#' temp_loc <- file.path(tempdir(), "mapme.biodiversity")
#' if(!file.exists(temp_loc)){
#' dir.create(temp_loc)
#' resource_dir <- system.file("res", package = "mapme.biodiversity")
#' file.copy(resource_dir, temp_loc, recursive = TRUE)
#' }
#'
#' (aoi <- system.file("extdata", "sierra_de_neiba_478140_2.gpkg", package = "mapme.biodiversity") %>%
#' read_sf() %>%
#' init_portfolio(
#' years = 2000:2010,
#' outdir = system.file("res", package = "mapme.biodiversity"),
#' tmpdir = system.file("tmp", package = "mapme.biodiversity"),
#' outdir = file.path(temp_loc, "res"),
#' tmpdir = tempdir(),
#' add_resources = FALSE,
#' cores = 1,
#' verbose = FALSE
Expand Down
12 changes: 10 additions & 2 deletions R/calc_soilproperties.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,20 @@
#' @examples
#' library(sf)
#' library(mapme.biodiversity)
#'
#' temp_loc <- file.path(tempdir(), "mapme.biodiversity")
#' if(!file.exists(temp_loc)){
#' dir.create(temp_loc)
#' resource_dir <- system.file("res", package = "mapme.biodiversity")
#' file.copy(resource_dir, temp_loc, recursive = TRUE)
#' }
#'
#' (aoi <- system.file("extdata", "sierra_de_neiba_478140_2.gpkg", package = "mapme.biodiversity") %>%
#' read_sf() %>%
#' init_portfolio(
#' years = 2022,
#' outdir = system.file("res", package = "mapme.biodiversity"),
#' tmpdir = system.file("tmp", package = "mapme.biodiversity"),
#' outdir = file.path(temp_loc, "res"),
#' tmpdir = tempdir(),
#' add_resources = FALSE,
#' cores = 1,
#' verbose = FALSE
Expand Down
12 changes: 10 additions & 2 deletions R/calc_teow.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,20 @@
#' @examples
#' library(sf)
#' library(mapme.biodiversity)
#'
#' temp_loc <- file.path(tempdir(), "mapme.biodiversity")
#' if(!file.exists(temp_loc)){
#' dir.create(temp_loc)
#' resource_dir <- system.file("res", package = "mapme.biodiversity")
#' file.copy(resource_dir, temp_loc, recursive = TRUE)
#' }
#'
#' (aoi <- system.file("extdata", "sierra_de_neiba_478140_2.gpkg", package = "mapme.biodiversity") %>%
#' read_sf() %>%
#' init_portfolio(
#' years = 2001,
#' outdir = system.file("res", package = "mapme.biodiversity"),
#' tmpdir = system.file("tmp", package = "mapme.biodiversity"),
#' outdir = file.path(temp_loc, "res"),
#' tmpdir = tempdir(),
#' add_resources = FALSE,
#' cores = 1,
#' verbose = FALSE
Expand Down
12 changes: 10 additions & 2 deletions R/calc_treecover.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,20 @@
#' @examples
#' library(sf)
#' library(mapme.biodiversity)
#'
#' temp_loc <- file.path(tempdir(), "mapme.biodiversity")
#' if(!file.exists(temp_loc)){
#' dir.create(temp_loc)
#' resource_dir <- system.file("res", package = "mapme.biodiversity")
#' file.copy(resource_dir, temp_loc, recursive = TRUE)
#' }
#'
#' (aoi <- system.file("extdata", "sierra_de_neiba_478140_2.gpkg", package = "mapme.biodiversity") %>%
#' read_sf() %>%
#' init_portfolio(
#' years = 2016:2017,
#' outdir = system.file("res", package = "mapme.biodiversity"),
#' tmpdir = system.file("tmp", package = "mapme.biodiversity"),
#' outdir = file.path(temp_loc, "res"),
#' tmpdir = tempdir(),
#' add_resources = FALSE,
#' cores = 1,
#' verbose = FALSE
Expand Down
12 changes: 10 additions & 2 deletions R/calc_treeloss.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,20 @@
#' @examples
#' library(sf)
#' library(mapme.biodiversity)
#'
#' temp_loc <- file.path(tempdir(), "mapme.biodiversity")
#' if(!file.exists(temp_loc)){
#' dir.create(temp_loc)
#' resource_dir <- system.file("res", package = "mapme.biodiversity")
#' file.copy(resource_dir, temp_loc, recursive = TRUE)
#' }
#'
#' (aoi <- system.file("extdata", "sierra_de_neiba_478140_2.gpkg", package = "mapme.biodiversity") %>%
#' read_sf() %>%
#' init_portfolio(
#' years = 2016:2017,
#' outdir = system.file("res", package = "mapme.biodiversity"),
#' tmpdir = system.file("tmp", package = "mapme.biodiversity"),
#' outdir = file.path(temp_loc, "res"),
#' tmpdir = tempdir(),
#' add_resources = FALSE,
#' cores = 1,
#' verbose = FALSE
Expand Down
12 changes: 10 additions & 2 deletions R/calc_tri.R
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,20 @@
#' @examples
#' library(sf)
#' library(mapme.biodiversity)
#'
#' temp_loc <- file.path(tempdir(), "mapme.biodiversity")
#' if(!file.exists(temp_loc)){
#' dir.create(temp_loc)
#' resource_dir <- system.file("res", package = "mapme.biodiversity")
#' file.copy(resource_dir, temp_loc, recursive = TRUE)
#' }
#'
#' (aoi <- system.file("extdata", "sierra_de_neiba_478140_2.gpkg", package = "mapme.biodiversity") %>%
#' read_sf() %>%
#' init_portfolio(
#' years = 2000:2020,
#' outdir = system.file("res", package = "mapme.biodiversity"),
#' tmpdir = system.file("tmp", package = "mapme.biodiversity"),
#' outdir = file.path(temp_loc, "res"),
#' tmpdir = tempdir(),
#' add_resources = FALSE,
#' cores = 1,
#' verbose = FALSE
Expand Down
13 changes: 11 additions & 2 deletions R/calc_wcprec.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,21 @@
#' @examples
#' library(sf)
#' library(mapme.biodiversity)
#'
#' temp_loc <- file.path(tempdir(), "mapme.biodiversity")
#' if(!file.exists(temp_loc)){
#' dir.create(temp_loc)
#' resource_dir <- system.file("res", package = "mapme.biodiversity")
#' file.copy(resource_dir, temp_loc, recursive = TRUE)
#' }
#'
#'
#' (aoi <- system.file("extdata", "sierra_de_neiba_478140_2.gpkg", package = "mapme.biodiversity") %>%
#' read_sf() %>%
#' init_portfolio(
#' years = 2018,
#' outdir = system.file("res", package = "mapme.biodiversity"),
#' tmpdir = system.file("tmp", package = "mapme.biodiversity"),
#' outdir = file.path(temp_loc, "res"),
#' tmpdir = tempdir(),
#' add_resources = FALSE,
#' cores = 1,
#' verbose = FALSE
Expand Down
Loading

0 comments on commit 9e0a62f

Please sign in to comment.