From d224cace4f6241389338e120627a70fdedef5d04 Mon Sep 17 00:00:00 2001 From: Jeffrey Hanson Date: Tue, 20 Aug 2024 10:13:23 +1200 Subject: [PATCH] fix url --- docs/articles/aoh.html | 12 +++--- docs/search.json | 2 +- inst/doc/aoh.Rmd | 2 +- inst/doc/aoh.html | 83 ++++++++++++++++++------------------- inst/doc/customization.html | 36 ++++++++-------- 5 files changed, 66 insertions(+), 69 deletions(-) diff --git a/docs/articles/aoh.html b/docs/articles/aoh.html index a1e1362..f432890 100644 --- a/docs/articles/aoh.html +++ b/docs/articles/aoh.html @@ -174,10 +174,10 @@

Tutorial## # A tibble: 4 × 5 ## id_no binomial seasonal path geometry ## <dbl> <chr> <int> <chr> <POLYGON [m]> -## 1 979 Alytes dickhilleni 1 /tmp/RtmpAcEC2… ((-105506.8 4465112, -10… -## 2 59448 Calotriton asper 1 /tmp/RtmpAcEC2… ((-238681 5029057, -2377… -## 3 4657 Chioglossa lusitanica 1 /tmp/RtmpAcEC2… ((-859201.6 4559278, -85… -## 4 58622 Rana iberica 1 /tmp/RtmpAcEC2… ((-849801.9 4614149, -84… +## 1 979 Alytes dickhilleni 1 /tmp/Rtmp5rXUb… ((-105506.8 4465112, -10… +## 2 59448 Calotriton asper 1 /tmp/Rtmp5rXUb… ((-238681 5029057, -2377… +## 3 4657 Chioglossa lusitanica 1 /tmp/Rtmp5rXUb… ((-859201.6 4559278, -85… +## 4 58622 Rana iberica 1 /tmp/Rtmp5rXUb… ((-849801.9 4614149, -84…

After generating the Area of Habitat data, we can import them.

 # import the Area of Habitat data
@@ -274,7 +274,7 @@ 

Tutorial strip.text = element_text(color = "white"), strip.background = element_rect(fill = "black", color = "black") )

-
## |---------|---------|---------|---------|=========================================                                          |---------|---------|---------|---------|=========================================                                          
+
## |---------|---------|---------|---------|=========================================                                          
 # display maps
 print(map)
@@ -330,7 +330,7 @@

Frequently asked questions
  • Can I use habitat classification data from other data sources?

    -

    Yes, you can use habitat classification data from a variety of sources. For example, the habitat classification data could be derived from Copernicus Corine Land Cover, and MODIS Land Cover data (MCD12Q1)). To use such data, you will also need to develop a crosswalk table to specify which land cover (or habitat) classes correspond to which habitat classes as defined by the IUCN Red List Habitat Classification Scheme (e.g., see Tracewski et al. 2016; Lumbierres et al. 2021). After preparing the habitat classification data and the crosswalk table, they can be used to create Area of Habitat data (via create_spp_aoh_data()). For more information, see the Customization vignette.

    +

    Yes, you can use habitat classification data from a variety of sources. For example, the habitat classification data could be derived from Copernicus Corine Land Cover, and MODIS Land Cover data (MCD12Q1)). To use such data, you will also need to develop a crosswalk table to specify which land cover (or habitat) classes correspond to which habitat classes as defined by the IUCN Red List Habitat Classification Scheme (e.g., see Tracewski et al. 2016; Lumbierres et al. 2021). After preparing the habitat classification data and the crosswalk table, they can be used to create Area of Habitat data (via create_spp_aoh_data()). For more information, see the Customization vignette.

  • The output Area of Habitat data have different spatial extents, how can I combine them together?

    diff --git a/docs/search.json b/docs/search.json index b64c14c..f9045d2 100644 --- a/docs/search.json +++ b/docs/search.json @@ -1 +1 @@ -[{"path":"https://prioritizr.github.io/aoh/articles/aoh.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Getting started","text":"Area Habitat (AOH) maps aim delineate spatial distribution suitable habitat species (Brooks et al. 2019). used assess performance protected area systems, measure impacts threats biodiversity, identify priorities conservation actions (Tracewski et al. 2016; Rondinini et al. 2005; Durán et al. 2020). maps generally produced obtaining geographic range data species, removing areas contain suitable habitat occur outside known elevational limits species (Brooks et al. 2019). help make maps accessible, aoh R package provides routines automatically creating Area Habitat data based International Union Conservation Nature (IUCN) Red List Threatened Species. manually downloading species range data IUCN Red List, users can import (using read_spp_range_data()), prepare collate additional information subsequent processing (using create_spp_info_data()), create Area Habitat data (using create_spp_aoh_data()). Global elevation habitat classification data automatically downloaded (Robinson et al. 2014; Jung et al. 2020; Lumbierres et al. 2021), data species’ habitat preferences elevational limits obtained automatically using IUCN Red List API. Since accessing IUCN Red List requires token, users may need obtain token update R configuration recognize token (see README details).","code":""},{"path":"https://prioritizr.github.io/aoh/articles/aoh.html","id":"tutorial","dir":"Articles","previous_headings":"","what":"Tutorial","title":"Getting started","text":"provide tutorial using aoh R package. tutorial, generate Area Habitat data following Iberian species: Pyrenean brook salamander (Calotriton asper), Iberian frog (Rana iberica), western spadefoot toad (Pelobates cultripes), golden striped salamnader (Chioglossa lusitanica). start , load package. also load rappdirs R package cache data, terra ggplot2 R packages visualize results. Now import range data species. Although users typically obtain range data International Union Conservation Nature (IUCN) Red List Threatened Species, use built-species range data distributed package convenience. Please note data obtained IUCN Red List, manually generated using occurrence records Global Biodiversity Information Facility. Next, prepare range data generating Area Habitat data. procedure – addition repairing geometry issues spatial data – obtain information species’ habitat preferences elevational limits (via IUCN Red List Threatened Species). also specify folder cache downloaded data won’t need re-download subsequent runs. can now generate Area Habitat data species. default, data generated using elevation data derived Robinson et al. (2014) habitat data derived Lumbierres et al. (2021). Similar , also specify folder cache downloaded datasets won’t need re-downloaded subsequent runs. running code, see displayed message telling us certain habitat classes available (.e., \"7.1\", \"7.2\"). fine. error. reason see message although global habitat dataset contains majority IUCN habitat classes terrestrial environments, contain every single IUCN habitat class (see Lumbierres et al. 2021 details). Upon checking IUCN habitat classes, can see classes correspond artificial aquatic areas also caves subterranean environments. Although failing account habitats potentially issue, assume accounting species’ non-subterranean habitats sufficient describe spatial distribution (Ficetola et al. 2014). generating Area Habitat data, can import . can see Area Habitat data species stored separate spatial (raster) datasets different extents. Although useful drastically reduces total size data species, can make difficult work data multiple species. address , can use terra_combine() function automatically align combine spatial data species’ distributions single spatial dataset. Finally, let’s create maps compare range data Area habitat data. Although create maps manually (e.g., using ggplot2 R package), use plotting function distributed aoh R package convenience.","code":"# load packages library(aoh) library(terra) library(rappdirs) library(ggplot2) # find file path for data path <- system.file(\"extdata\", \"EXAMPLE_SPECIES.zip\", package = \"aoh\") # import data spp_range_data <- read_spp_range_data(path) # preview data print(spp_range_data) ## Simple feature collection with 4 features and 26 fields ## Geometry type: POLYGON ## Dimension: XY ## Bounding box: xmin: -9.479736 ymin: 36.59422 xmax: 3.302702 ymax: 43.76455 ## Geodetic CRS: WGS 84 ## # A tibble: 4 × 27 ## id_no binomial presence origin seasonal compiler yrcompiled citation ## ## 1 979 Alytes dickhilleni 1 1 1 Derived… NA NA ## 2 59448 Calotriton asper 1 1 1 Derived… NA NA ## 3 4657 Chioglossa lusita… 1 1 1 Derived… NA NA ## 4 58622 Rana iberica 1 1 1 Derived… NA NA ## # ℹ 19 more variables: subspecies , subpop , source , ## # island , tax_comm , dist_comm , generalisd , ## # legend , kingdom , phylum , class , order_ , ## # family , genus , category , marine , terrestial , ## # freshwater , geometry # specify cache directory cache_dir <- user_data_dir(\"aoh\") # create cache_dir if needed if (!file.exists(cache_dir)) { dir.create(cache_dir, showWarnings = FALSE, recursive = TRUE) } # prepare information spp_info_data <- create_spp_info_data(spp_range_data, cache_dir = cache_dir) # specify cache directory cache_dir <- user_data_dir(\"aoh\") # specify folder to save Area of Habitat data ## although we use a temporary directory here to avoid polluting your computer ## with examples files, you would normally specify the folder ## on your computer where you want to save data output_dir <- tempdir() # generate Area of Habitat data ## note that this function might take a complete because it will need to ## download the global habitat and elevation data that first time you run it. spp_aoh_data <- create_spp_aoh_data( spp_info_data, output_dir = output_dir, cache_dir = cache_dir ) # preview results ## resulting dataset is a simple features (sf) object containing ## spatial geometries for cleaned versions of the range data ## (in the geometry column) and the following additional columns: ## ## - id_no : IUCN Red List taxon identifier ## - seasonal : integer identifier for seasonal distributions ## - category : character IUCN Red List threat category ## - full_habitat_code: All IUCN Red List codes for suitable habitat classes ## (multiple codes are delimited using \"|\" symbols) ## - habitat_code : IUCN Red List codes for suitable habitat classes ## used to create AOH maps ## - elevation_lower : lower limit for the species on IUCN Red List ## - elevation_upper : upper limit for the species on IUCN Red List ## - xmin : minimum x-coordinate for Area of Habitat data ## - xmax : maximum x-coordinate for Area of Habitat data ## - ymin : minimum y-coordinate for Area of Habitat data ## - ymax : maximum y-coordinate for Area of Habitat data ## - path : file path for Area of Habitat data (GeoTIFF format) ## ## since data obtained from the IUCN Red List cannot be redistributed, ## we will only show some of the columns in this object ## ## N.B., you can view all columns on your computer with: ##> print(spp_aoh_data, width = Inf) print(spp_aoh_data[, c(\"id_no\", \"binomial\", \"seasonal\", \"path\")]) ## Simple feature collection with 4 features and 4 fields ## Geometry type: POLYGON ## Dimension: XY ## Bounding box: xmin: -914664.9 ymin: 4364387 xmax: 318665.2 ymax: 5066721 ## Projected CRS: World_Behrmann ## # A tibble: 4 × 5 ## id_no binomial seasonal path geometry ## ## 1 979 Alytes dickhilleni 1 /tmp/RtmpAcEC2… ((-105506.8 4465112, -10… ## 2 59448 Calotriton asper 1 /tmp/RtmpAcEC2… ((-238681 5029057, -2377… ## 3 4657 Chioglossa lusitanica 1 /tmp/RtmpAcEC2… ((-859201.6 4559278, -85… ## 4 58622 Rana iberica 1 /tmp/RtmpAcEC2… ((-849801.9 4614149, -84… # import the Area of Habitat data ## since the data for each species have a different spatial extent ## (to reduce file sizes), we will import each dataset separately in a list spp_aoh_rasters <- lapply(spp_aoh_data$path, rast) # preview raster data print(spp_aoh_rasters) ## [[1]] ## class : SpatRaster ## dimensions : 2593, 3701, 1 (nrow, ncol, nlyr) ## resolution : 100, 100 (x, y) ## extent : -467931, -97831, 4364377, 4623677 (xmin, xmax, ymin, ymax) ## coord. ref. : World_Behrmann ## source : 979_1.tif ## name : lyr1 ## min value : 0 ## max value : 1 ## ## [[2]] ## class : SpatRaster ## dimensions : 2266, 5670, 1 (nrow, ncol, nlyr) ## resolution : 100, 100 (x, y) ## extent : -248331, 318669, 4838277, 5064877 (xmin, xmax, ymin, ymax) ## coord. ref. : World_Behrmann ## source : 59448_1.tif ## name : lyr1 ## min value : 0 ## max value : 1 ## ## [[3]] ## class : SpatRaster ## dimensions : 5149, 5361, 1 (nrow, ncol, nlyr) ## resolution : 100, 100 (x, y) ## extent : -914731, -378631, 4551877, 5066777 (xmin, xmax, ymin, ymax) ## coord. ref. : World_Behrmann ## source : 4657_1.tif ## name : lyr1 ## min value : 0 ## max value : 1 ## ## [[4]] ## class : SpatRaster ## dimensions : 4978, 7512, 1 (nrow, ncol, nlyr) ## resolution : 100, 100 (x, y) ## extent : -904331, -153131, 4568977, 5066777 (xmin, xmax, ymin, ymax) ## coord. ref. : World_Behrmann ## source : 58622_1.tif ## name : lyr1 ## min value : 0 ## max value : 1 # combine raster data spp_aoh_rasters <- terra_combine(spp_aoh_rasters) # assign identifiers to layer names names(spp_aoh_rasters) <- paste0( \"AOH_\", spp_aoh_data$id_no, \"_\", spp_aoh_data$seasonal ) # preview raster data print(spp_aoh_rasters) ## class : SpatRaster ## dimensions : 7024, 12334, 4 (nrow, ncol, nlyr) ## resolution : 100, 100 (x, y) ## extent : -914731, 318669, 4364377, 5066777 (xmin, xmax, ymin, ymax) ## coord. ref. : World_Behrmann ## source(s) : memory ## varnames : 979_1 ## 59448_1 ## 4657_1 ## ... ## names : AOH_979_1, AOH_59448_1, AOH_4657_1, AOH_58622_1 ## min values : 0, 0, 0, 0 ## max values : 1, 1, 1, 1 # create maps ## N.B. you might need to install the ggmap package to create the maps map <- plot_spp_aoh_data( spp_aoh_data, zoom = 6, maptype = \"stamen_toner_background\" ) + scale_fill_viridis_d() + scale_color_manual(values = c(\"range\" = \"red\")) + scale_size_manual(values = c(\"range\" = 0.5)) + theme( axis.title = element_blank(), axis.text = element_text(size = 6), strip.text = element_text(color = \"white\"), strip.background = element_rect(fill = \"black\", color = \"black\") ) ## |---------|---------|---------|---------|========================================= |---------|---------|---------|---------|========================================= # display maps print(map)"},{"path":"https://prioritizr.github.io/aoh/articles/aoh.html","id":"frequently-asked-questions","dir":"Articles","previous_headings":"","what":"Frequently asked questions","title":"Getting started","text":"provide answers frequently asked questions encountered using package. see following error message Error: need API key Red List data, resolve ? error message indicates need obtain token access IUCN Red List API, need complete setup process R can use token. details resolving issue, please see details obtaining access IUCN Red List API. previously completed set procedures still receive error message, please try completing . obtain access IUCN Red List API? need obtain token access IUCN Red List API (one already). achieve , please visit IUCN API website (https://apiv3.iucnredlist.org/), click “Generate token” link top web page, fill form apply token. receive token shortly completing form (immediately). receiving token, need complete additional steps R can use token access IUCN Red List API. Please open .Renviron file computer (e.g., using usethis::edit_r_environ()). Next, please add following text file (replacing string token) save file: Please restart R session. now able access IUCN Red List API. verify , please try running following R code – assuming everything works correctly – see current version IUCN Red List: instructions work, please consult documentation rredlist R package details. can find species range data generating Area Habitat data? Species range data can obtained IUCN Red List (see Spatial Data Download resources). can also obtained data sources (see question details). keep seeing message Error x$.self$finalize() : attempt apply non-function, mean? message commonly encountered using terra package large datasets. Although currently known solution prevent message appearing, message can safely ignored (see details). message stop R completing spatial data processing – meaning R continue processing data even message displayed – underlying cause message thought result incorrect calculations. Can produce Area Habitat data thousands species globally? Yes, package can generate Area Habitat data terrestrial amphibians, mammals, birds, reptiles. accomplish , need system least 16 Gb RAM 65 Gb disk space. processing take couple days (e.g., processing amphibian species) weeks (e.g., processing bird species) complete. example script processing global data available online code repository (see ). Additionally, since lot memory required process data bird species globally, recommended split full dataset containing bird species multiple chunks (e.g., six chunks) process chunks separately. can speed processing Area Habitat data? create_spp_aoh_data() function can use different software engines data processing (specified via engine parameter). Although engine produces results, engines computationally efficient others. default \"terra\" engine uses terra package processing. Although engine easy install fast small datasets, scale well larger datasets. generally recommended use \"gdal\" engine cases possible. Although \"gdal\" engine requires installation additional software (see package README instructions), much faster engines. Additionally, \"grass\" engine also available. engine can faster \"terra\" engine processing many species across large spatial extents. However, benchmarks indicate slower \"gdal\" engine. Can use species range data data sources (instead IUCN Red List)? Yes, can use species range data variety sources. example, species range data obtained governmental (e.g., data federally listed species Canada available Government Canada data portal) non-governmental organizations (e.g., Botanical Information Ecology Network Map Life). data can also produced using observation records (e.g., following Palacio et al. 2021) data repositories (e.g., Global Biodiversity Information Facility Atlas Living Australia). obtaining species range data, need formatted follow data format conventions used IUCN Red List. means species range data must contain following columns: id_no, presence, origin, seasonal, terrestrial (terrestial), freshwater, marine. details values columns contain, please see Species range data format section documentation create_spp_info_data() IUCN Red List documentation. Additionally, note wish use IUCN Red List specifying habitat preference data, please ensure id_no specified species follows taxon identifiers used IUCN Red List. example, tutorial used manually generated species range data Pyrenean brook salamander (Calotriton asper). ensure correct habitat preference data obtained species IUCN Red List, id_no value specified species specified 59448. Can use species elevational limit data sources? Yes, can use elevational limit data sources. example, birds important use “Occasional minimum altitude” “Occasional maximum altitude” estimates species coded IUCN Red List. data available request BirdLife International (please contact science@birdlife.org). use data, need manually create table containing species’ summary information. table need contain information species’ elevational limits, well habitat preferences threat status (see get_spp_summary_data() correct format). preparing data, can used collate information needed processing Area Habitat data (via create_spp_info_data()) , turn, create Area Habitat data (via create_spp_aoh_data()). Can use elevation data data sources? Yes, can use elevation data variety sources. example, elevation data derived NASA’s Shuttle Radar Topography Mission (SRTM). preparing elevation data, can used create Area Habitat data (via create_spp_aoh_data()). information, see Customization vignette. Can use habitat classification data data sources? Yes, can use habitat classification data variety sources. example, habitat classification data derived Copernicus Corine Land Cover, MODIS Land Cover data (MCD12Q1)). use data, also need develop crosswalk table specify land cover (habitat) classes correspond habitat classes defined IUCN Red List Habitat Classification Scheme (e.g., see Tracewski et al. 2016; Lumbierres et al. 2021). preparing habitat classification data crosswalk table, can used create Area Habitat data (via create_spp_aoh_data()). information, see Customization vignette. output Area Habitat data different spatial extents, can combine together? terra_combine() function can used align combine list raster terra::rast() objects single object. Note procedure recommended species occur geographic region. Please see tutorial example using function combine Area Habitat data multiple species single object.","code":"IUCN_REDLIST_KEY=\"your_actual_token_not_this_string\" # verify access to IUCN Red List API rredlist::rl_version()"},{"path":"https://prioritizr.github.io/aoh/articles/aoh.html","id":"conclusion","dir":"Articles","previous_headings":"","what":"Conclusion","title":"Getting started","text":"Hopefully, vignette provided useful introduction package. encounter issues running code tutorial – adapting code work – please see following section. Additionally, questions using package suggestions improving , please file issue package’s online code repository.","code":""},{"path":[]},{"path":"https://prioritizr.github.io/aoh/articles/customization.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Customization","text":"aoh R package provides flexible framework generating Area Habitat data. default, use elevation data derived Robinson et al. (2014) habitat classification data derived Lumbierres et al. (2021). defaults also include using species’ elevational limit habitat preference data International Union Conservation Nature (IUCN) Red List Threatened Species. addition defaults, provides built-functions use habitat classification derived data sources (e.g., Jung et al. 2020). package can also used generate Area Habitat data using datasets manually created user. example, used produce Area Habitat data using habitat classification data derived Copernicus Corine Land Cover data species’ elevational limit data BirdLife Data Zone.","code":""},{"path":"https://prioritizr.github.io/aoh/articles/customization.html","id":"tutorial","dir":"Articles","previous_headings":"","what":"Tutorial","title":"Customization","text":"show Area Habitat data can generated using particular datasets (rather default datasets). tutorial, manually import data use generate Area Habitat data. previously read Getting started vignette, strongly recommended provide introduction package. start , load package. also load rappdirs package cache data, tibble package storing tabular data, terra ggplot2 R packages visualize results. Now import geographic range data species. Although users typically obtain data IUCN Red List, import example data distributed package. Please note data obtained IUCN Red List, generated using random simulations. Next, import data describe species’ habitat preferences. Although data automatically obtained IUCN Red List default (using get_spp_habitat_data() function), import example data distributed package. , please note data obtained IUCN Red List, randomly generated. wish use data, please ensure follow exactly conventions (e.g., column names, data types, character values \"suitability\" \"season\" columns). Next, import data describe species’ elevational limits. Although data automatically obtained IUCN Red List default (using get_spp_summary_data() function), import example data distributed package. , please note data obtained IUCN Red List, randomly generated. Since dataset contains additional columns aren’t strictly necessary, also update include necessary columns. wish use data, please ensure follow conventions (e.g., column names, data types). importing datasets species data, important ensure every species associated geographic range, habitat preference, summary data. , \"id_no\" column values used denote different taxa—meaning species unique identifier. identifiers used cross-referencing datasets. example, species named \"Simulus spp. 670\" identifier (\"id_no\" value) 670, identifier used denote range spp_range_data dataset, habitat preferences spp_habitat_data dataset, elevational limits spp_summary_data dataset. can verify species required information across three datasets using following code. now import elevation data. Although data automatically imported default (using get_global_elevation_data() function), import example data distributed package. Next, import habitat classification data. Although data automatically imported default (using get_lumb_cgls_habitat_data() function), import example data distributed package. Critically, elevation data habitat classification data must exactly spatial properties. means must coordinate reference system, resolution, spatial extent. using elevation habitat classification data previously prepared (manually download online sources), may need resample (reproject) data ensure datasets spatial properties using geographic information system (GIS). example, data resampled using ESRI ArcGIS, QGIS, terra R package, gdalUtilities R package. can verify elevation habitat classification datasets spatial properties using following code. now import crosswalk table habitat classification data. crosswalk table specifies pixel values habitat classification data correspond IUCN habitat classes. table can specify one--one relationships (e.g., pixel value 12 corresponds IUCN class 1.1), one--many relationships (e.g., pixel values 12 corresponds IUCN classes 1.1 1.2), many--many relationships (e.g., pixel values 12 13 correspond IUCN classes 1.1 1.2). Although data automatically imported default (.e., crosswalk_lumb_cgls_data built-dataset), import example data distributed package. using habitat classification data, please ensure follows format (.e., column names data types). importing data, can clean collate information together generating Area Habitat data. Next, can generate Area Habitat data. Finally, let’s create maps compare range data Area habitat data. Although create maps manually (e.g., using ggplot2 R package), use plotting function distributed aoh R package convenience. Although full dataset contains many species; brevity, show first four species’ seasonal distributions.","code":"# load packages library(aoh) library(terra) library(tibble) library(rappdirs) library(ggplot2) # find file path for data spp_range_path <- system.file( \"testdata\", \"SIMULATED_SPECIES.zip\", package = \"aoh\" ) # import data spp_range_data <- read_spp_range_data(spp_range_path) # preview data ## dataset follows the same format as the IUCN Red List spatial data print(spp_range_data) ## Simple feature collection with 34 features and 26 fields ## Geometry type: MULTIPOLYGON ## Dimension: XY ## Bounding box: xmin: -9.497 ymin: 36.01108 xmax: 3.318 ymax: 43.793 ## Geodetic CRS: WGS 84 ## # A tibble: 34 × 27 ## id_no seasonal presence origin binomial compiler yrcompiled citation ## ## 1 670 2 1 1 Simulus spp. 670 Simulat… NA NA ## 2 670 3 1 1 Simulus spp. 670 Simulat… NA NA ## 3 670 4 1 1 Simulus spp. 670 Simulat… NA NA ## 4 2072 1 1 1 Simulus spp. 2072 Simulat… NA NA ## 5 2072 1 4 4 Simulus spp. 2072 Simulat… NA NA ## 6 2072 1 3 3 Simulus spp. 2072 Simulat… NA NA ## 7 2072 1 3 5 Simulus spp. 2072 Simulat… NA NA ## 8 2374 1 1 1 Simulus spp. 2374 Simulat… NA NA ## 9 2374 1 4 2 Simulus spp. 2374 Simulat… NA NA ## 10 2374 1 5 2 Simulus spp. 2374 Simulat… NA NA ## # ℹ 24 more rows ## # ℹ 19 more variables: subspecies , subpop , source , ## # island , tax_comm , dist_comm , generalisd , ## # legend , kingdom , phylum , class , order_ , ## # family , genus , category , marine , terrestial , ## # freshwater , geometry # visualize data ## each panel corresponds to a different seasonal distribution of a species map <- ggplot() + geom_sf(data = spp_range_data, fill = \"darkblue\") + facet_wrap(~ id_no + seasonal) print(map) # find file path for species habitat preference data spp_habitat_path <- system.file( \"testdata\", \"sim_spp_habitat_data.csv\", package = \"aoh\" ) # import species habitat preference data spp_habitat_data <- read.csv(spp_habitat_path, sep = \",\", header = TRUE) spp_habitat_data <- as_tibble(spp_habitat_data) # preview data print(spp_habitat_data, n = Inf) ## # A tibble: 42 × 6 ## id_no code habitat suitability season majorimportance ## ## 1 670 14.5 Urban Areas Suitable Breed… NA ## 2 670 14.2 Pastureland Suitable Breed… NA ## 3 670 4.4 Grassland - Temperate Suitable Non-b… NA ## 4 670 3.5 Shrubland - Subtropical/tropi… Suitable Non-b… NA ## 5 670 6 Rocky Areas (e.g., inland cli… Suitable Non-b… NA ## 6 670 1.5 Forest - Subtropical/tropical… Suitable Passa… NA ## 7 670 3.8 Shrubland - Mediterranean-typ… Suitable Passa… NA ## 8 670 3.4 Shrubland - Temperate Suitable Passa… NA ## 9 2072 3.8 Shrubland - Mediterranean-typ… Suitable Resid… NA ## 10 2072 1.4 Forest - Temperate Suitable Resid… NA ## 11 2072 2.1 Savanna - Dry Suitable Resid… NA ## 12 2374 4.4 Grassland - Temperate Suitable Resid… NA ## 13 2374 2.1 Savanna - Dry Suitable Resid… NA ## 14 2374 14.5 Urban Areas Suitable Resid… NA ## 15 3667 1.4 Forest - Temperate Suitable Resid… NA ## 16 3667 3.5 Shrubland - Subtropical/tropi… Suitable Resid… NA ## 17 3667 3.8 Shrubland - Mediterranean-typ… Suitable Resid… NA ## 18 4421 3.5 Shrubland - Subtropical/tropi… Suitable Resid… NA ## 19 4421 4.4 Grassland - Temperate Suitable Resid… NA ## 20 4650 3.8 Shrubland - Mediterranean-typ… Suitable Resid… NA ## 21 4650 4.4 Grassland - Temperate Suitable Resid… NA ## 22 4650 14.5 Urban Areas Suitable Resid… NA ## 23 5808 14.5 Urban Areas Suitable Resid… NA ## 24 5808 14.1 Arable Land Suitable Resid… NA ## 25 5808 14.2 Pastureland Suitable Resid… NA ## 26 5808 3.8 Shrubland - Mediterranean-typ… Suitable Breed… NA ## 27 5808 4.1 Grassland - Tundra Suitable Breed… NA ## 28 5808 2.1 Savanna - Dry Suitable Breed… NA ## 29 5808 14.1 Arable Land Suitable Non-b… NA ## 30 5808 5.5 Wetlands (inland) - Permanent… Suitable Non-b… NA ## 31 5808 3.8 Shrubland - Mediterranean-typ… Suitable Passa… NA ## 32 5808 5.5 Wetlands (inland) - Permanent… Suitable Passa… NA ## 33 5808 4 Grassland Suitable Passa… NA ## 34 6701 3.8 Shrubland - Mediterranean-typ… Suitable Resid… NA ## 35 6701 5.5 Wetlands (inland) - Permanent… Suitable Resid… NA ## 36 6701 4.1 Grassland - Tundra Suitable Resid… NA ## 37 8110 3.8 Shrubland - Mediterranean-typ… Suitable Resid… NA ## 38 8110 1.4 Forest - Temperate Suitable Resid… NA ## 39 8110 14.5 Urban Areas Suitable Resid… NA ## 40 8644 3.4 Shrubland - Temperate Suitable Resid… NA ## 41 8644 14.5 Urban Areas Suitable Resid… NA ## 42 8644 5 Wetlands (inland) Suitable Resid… NA # find file path for species habitat preference data spp_summary_path <- system.file( \"testdata\", \"sim_spp_summary_data.csv\", package = \"aoh\" ) # import species habitat preference data spp_summary_data <- read.csv(spp_summary_path, sep = \",\", header = TRUE) spp_summary_data <- as_tibble(spp_summary_data) # extract only necessary columns col_names <- c(\"id_no\", \"elevation_lower\", \"elevation_upper\", \"category\") spp_summary_data <- spp_summary_data[, col_names, drop = FALSE] # preview data print(spp_summary_data, n = Inf) ## # A tibble: 10 × 4 ## id_no elevation_lower elevation_upper category ## ## 1 670 82 942 LC ## 2 2072 46 907 NT ## 3 2374 65 1020 VU ## 4 3667 15 598 EN ## 5 4421 85 949 VU ## 6 4650 54 951 NT ## 7 5808 91 974 VU ## 8 6701 221 1069 EN ## 9 8110 75 991 VU ## 10 8644 182 1183 LC # verify all identifiers in range data are present in habitat preference data ## if we see TRUE: then this means both datasets have the same taxa identifiers ## if we see FALSE: then some taxa identifiers are missing from one dataset setequal(spp_range_data$id_no, spp_habitat_data$id_no) ## [1] TRUE # verify all identifiers in range data are present in summary data ## if we see TRUE: then this means both datasets have the same taxa identifiers ## if we see FALSE: then some taxa identifiers are missing from one dataset setequal(spp_range_data$id_no, spp_summary_data$id_no) ## [1] TRUE # find file path for elevation data elevation_path <- system.file( \"testdata\", \"sim_elevation_data.tif\", package = \"aoh\" ) # import elevation data elevation_data <- rast(elevation_path) # preview data print(elevation_data) ## class : SpatRaster ## dimensions : 792, 1268, 1 (nrow, ncol, nlyr) ## resolution : 1000, 1000 (x, y) ## extent : -929631, 338369, 4289077, 5081077 (xmin, xmax, ymin, ymax) ## coord. ref. : World_Behrmann ## source : sim_elevation_data.tif ## name : dem-100m-esri54017 ## min value : -4 ## max value : 3260 # visualize data plot(elevation_data, main = \"Elevation data\") # find file path for elevation data habitat_path <- system.file( \"testdata\", \"sim_habitat_data.tif\", package = \"aoh\" ) # import habitat classification data habitat_data <- rast(habitat_path) # preview data print(habitat_data) ## class : SpatRaster ## dimensions : 792, 1268, 1 (nrow, ncol, nlyr) ## resolution : 1000, 1000 (x, y) ## extent : -929631, 338369, 4289077, 5081077 (xmin, xmax, ymin, ymax) ## coord. ref. : World_Behrmann ## source : sim_habitat_data.tif ## name : jung-lvl2-10-5281_zenodo-4058819 ## min value : 104 ## max value : 1405 # visualize data plot(habitat_data, main = \"Habitat classification data\") # verify that elevation and habitat classification data have same properties ## if we see TRUE, this means they have the same spatial properties. ## otherwise, if we see an error, then this means that they do not have ## have the same spatial properties and require updating compareGeom(elevation_data, habitat_data) ## [1] TRUE # find file path for crosswalk data crosswalk_path <- system.file( \"testdata\", \"sim_crosswalk.csv\", package = \"aoh\" ) # import crosswalk data crosswalk_data <- read.csv(crosswalk_path, sep = \",\", header = TRUE) crosswalk_data <- as_tibble(crosswalk_data) # print table ## code column contains codes for the IUCN habitat classes ## value column contains values in the habitat classification data print(crosswalk_data, n = Inf) ## # A tibble: 126 × 2 ## code value ## ## 1 1 100 ## 2 1.1 101 ## 3 1.2 102 ## 4 1.3 103 ## 5 1.4 104 ## 6 1.5 105 ## 7 1.6 106 ## 8 1.7 107 ## 9 1.8 108 ## 10 1.9 109 ## 11 2 200 ## 12 2.1 201 ## 13 2.2 202 ## 14 3 300 ## 15 3.1 301 ## 16 3.2 302 ## 17 3.3 303 ## 18 3.4 304 ## 19 3.5 305 ## 20 3.6 306 ## 21 3.7 307 ## 22 3.8 308 ## 23 4 400 ## 24 4.1 401 ## 25 4.2 402 ## 26 4.3 403 ## 27 4.4 404 ## 28 4.5 405 ## 29 4.6 406 ## 30 4.7 407 ## 31 5 500 ## 32 5.1 501 ## 33 5.2 502 ## 34 5.3 503 ## 35 5.4 504 ## 36 5.5 505 ## 37 5.6 506 ## 38 5.7 507 ## 39 5.8 508 ## 40 5.9 509 ## 41 5.10 510 ## 42 5.11 511 ## 43 5.12 512 ## 44 5.13 513 ## 45 5.14 514 ## 46 5.15 515 ## 47 5.16 516 ## 48 5.17 517 ## 49 5.18 518 ## 50 6 600 ## 51 7 700 ## 52 7.1 701 ## 53 7.2 702 ## 54 8 800 ## 55 8.1 801 ## 56 8.2 802 ## 57 8.3 803 ## 58 9 900 ## 59 9.1 901 ## 60 9.2 902 ## 61 9.3 903 ## 62 9.4 904 ## 63 9.5 905 ## 64 9.6 906 ## 65 9.7 907 ## 66 9.8 908 ## 67 9.8.1 981 ## 68 9.8.2 982 ## 69 9.8.3 983 ## 70 9.8.4 984 ## 71 9.8.5 985 ## 72 9.8.6 986 ## 73 9.9 909 ## 74 9.10 910 ## 75 10 1000 ## 76 10.1 1001 ## 77 10.2 1002 ## 78 10.3 1003 ## 79 10.4 1004 ## 80 11 1100 ## 81 11.1 1101 ## 82 11.1.1 1111 ## 83 11.2 1102 ## 84 11.1.2 1112 ## 85 11.3 1103 ## 86 11.4 1104 ## 87 11.5 1105 ## 88 11.6 1106 ## 89 12 1200 ## 90 12.1 1201 ## 91 12.2 1202 ## 92 12.3 1203 ## 93 12.4 1204 ## 94 12.5 1205 ## 95 12.7 1207 ## 96 12.6 1206 ## 97 13 1300 ## 98 13.1 1301 ## 99 13.2 1302 ## 100 13.3 1303 ## 101 13.4 1304 ## 102 13.5 1305 ## 103 14 1400 ## 104 14.1 1401 ## 105 14.2 1402 ## 106 14.3 1403 ## 107 14.4 1404 ## 108 14.5 1405 ## 109 14.6 1406 ## 110 15 1500 ## 111 15.1 1501 ## 112 15.2 1502 ## 113 15.3 1503 ## 114 15.4 1504 ## 115 15.5 1505 ## 116 15.6 1506 ## 117 15.7 1507 ## 118 15.8 1508 ## 119 15.9 1509 ## 120 15.10 1510 ## 121 15.11 1511 ## 122 15.12 1512 ## 123 15.13 1513 ## 124 16 1600 ## 125 17 1700 ## 126 18 1800 # create data with information for Area of Habitat data spp_info_data <- create_spp_info_data( spp_range_data, spp_summary_data = spp_summary_data, spp_habitat_data = spp_habitat_data ) # preview data print(spp_info_data, width = Inf) ## Simple feature collection with 15 features and 8 fields ## Geometry type: MULTIPOLYGON ## Dimension: XY ## Bounding box: xmin: -916330.2 ymin: 4304151 xmax: 320141.5 ymax: 5069358 ## Projected CRS: World_Behrmann ## # A tibble: 15 × 9 ## id_no binomial category migratory seasonal ## ## 1 670 Simulus spp. 670 LC TRUE 2 ## 2 670 Simulus spp. 670 LC TRUE 3 ## 3 670 Simulus spp. 670 LC TRUE 4 ## 4 2072 Simulus spp. 2072 NT FALSE 1 ## 5 2374 Simulus spp. 2374 VU FALSE 1 ## 6 3667 Simulus spp. 3667 EN FALSE 1 ## 7 4421 Simulus spp. 4421 VU FALSE 1 ## 8 4650 Simulus spp. 4650 NT FALSE 1 ## 9 5808 Simulus spp. 5808 VU TRUE 1 ## 10 5808 Simulus spp. 5808 VU TRUE 2 ## 11 5808 Simulus spp. 5808 VU TRUE 3 ## 12 5808 Simulus spp. 5808 VU TRUE 4 ## 13 6701 Simulus spp. 6701 EN FALSE 1 ## 14 8110 Simulus spp. 8110 VU FALSE 1 ## 15 8644 Simulus spp. 8644 LC FALSE 1 ## full_habitat_code elevation_lower elevation_upper ## ## 1 14.2|14.5 82 942 ## 2 3.5|4.4|6 82 942 ## 3 1.5|3.4|3.8 82 942 ## 4 1.4|2.1|3.8 46 907 ## 5 2.1|4.4|14.5 65 1020 ## 6 1.4|3.5|3.8 15 598 ## 7 3.5|4.4 85 949 ## 8 3.8|4.4|14.5 54 951 ## 9 2.1|3.8|4.1|5.5|14.1|14.2|14.5 91 974 ## 10 2.1|3.8|4.1|14.1|14.2|14.5 91 974 ## 11 5.5|14.1|14.2|14.5 91 974 ## 12 3.8|4|5.5|14.1|14.2|14.5 91 974 ## 13 3.8|4.1|5.5 221 1069 ## 14 1.4|3.8|14.5 75 991 ## 15 3.4|5|14.5 182 1183 ## geometry ## ## 1 (((-744167.8 5065733, -744758.3 5065030, -745429.8 5064437, -745619 5064063,… ## 2 (((27902.87 4746365, 27056.68 4747482, 26787.49 4748880, 27030.63 4750311, 2… ## 3 (((-463308.8 4832969, -462721.2 4833049, -461995.6 4833183, -461258.5 483323… ## 4 (((-415672.5 4377074, -416862.2 4377160, -416399.1 4377219, -415731.4 437712… ## 5 (((-568331.2 4328892, -568572.4 4330309, -568690.1 4331566, -568471.1 433245… ## 6 (((-598890.3 4658362, -599068.8 4657037, -598638.5 4656082, -597329.2 465567… ## 7 (((-862522.7 4407131, -862193.7 4407172, -862201.4 4407165, -862640.4 440702… ## 8 (((-613250.4 4368112, -611865.8 4368219, -610831.5 4368152, -610384.8 436778… ## 9 (((-604205.8 4355480, -604258.8 4354866, -604481.7 4354214, -604629.3 435369… ## 10 (((-214939.6 4390035, -213485.5 4389897, -212252.4 4389503, -211509.5 438892… ## 11 (((-712163.3 4853217, -712938.1 4854392, -714015.8 4854814, -715276.9 485473… ## 12 (((-853538.9 4415882, -853532.1 4415239, -853670.1 4414456, -853800.3 441371… ## 13 (((-501888.8 5040197, -501188.3 5040426, -500444.4 5040511, -499781.6 504024… ## 14 (((-259653.3 4377133, -259650.4 4376545, -259928.2 4375843, -260216.7 437513… ## 15 (((166524.7 4944201, 165755.7 4943358, 165117 4942089, 164815 4940646, 16505… # specify folder to save Area of Habitat data ## although we use a temporary directory here to avoid polluting your computer ## with examples files, you would normally specify the folder ## on your computer where you want to save data output_dir <- tempdir() # generate Area of Habitat data spp_aoh_data <- create_spp_aoh_data( spp_info_data, elevation_data = elevation_data, habitat_data = habitat_data, crosswalk_data = crosswalk_data, output_dir = output_dir ) # preview results ## resulting dataset is a simple features (sf) object containing ## spatial geometries for cleaned versions of the range data ## (in the geometry column) and the following additional columns: ## ## - id_no : IUCN Red List taxon identifier ## - seasonal : integer identifier for seasonal distributions ## - category : character IUCN Red List threat category ## - full_habitat_code: All IUCN Red List codes for suitable habitat classes ## (multiple codes are delimited using \"|\" symbols) ## - habitat_code : IUCN Red List codes for suitable habitat classes ## used to create AOH maps ## - elevation_lower : lower limit for the species on IUCN Red List ## - elevation_upper : upper limit for the species on IUCN Red List ## - xmin : minimum x-coordinate for Area of Habitat data ## - xmax : maximum x-coordinate for Area of Habitat data ## - ymin : minimum y-coordinate for Area of Habitat data ## - ymax : maximum y-coordinate for Area of Habitat data ## - path : file path for Area of Habitat data (GeoTIFF format) print(spp_aoh_data, width = Inf) ## Simple feature collection with 15 features and 14 fields ## Geometry type: MULTIPOLYGON ## Dimension: XY ## Bounding box: xmin: -916330.2 ymin: 4304151 xmax: 320141.5 ymax: 5069358 ## Projected CRS: World_Behrmann ## # A tibble: 15 × 15 ## id_no binomial category migratory seasonal ## * ## 1 670 Simulus spp. 670 LC TRUE 2 ## 2 670 Simulus spp. 670 LC TRUE 3 ## 3 670 Simulus spp. 670 LC TRUE 4 ## 4 2072 Simulus spp. 2072 NT FALSE 1 ## 5 2374 Simulus spp. 2374 VU FALSE 1 ## 6 3667 Simulus spp. 3667 EN FALSE 1 ## 7 4421 Simulus spp. 4421 VU FALSE 1 ## 8 4650 Simulus spp. 4650 NT FALSE 1 ## 9 5808 Simulus spp. 5808 VU TRUE 1 ## 10 5808 Simulus spp. 5808 VU TRUE 2 ## 11 5808 Simulus spp. 5808 VU TRUE 3 ## 12 5808 Simulus spp. 5808 VU TRUE 4 ## 13 6701 Simulus spp. 6701 EN FALSE 1 ## 14 8110 Simulus spp. 8110 VU FALSE 1 ## 15 8644 Simulus spp. 8644 LC FALSE 1 ## full_habitat_code habitat_code elevation_lower ## * ## 1 14.2|14.5 14.2|14.5 82 ## 2 3.5|4.4|6 3.5|4.4|6 82 ## 3 1.5|3.4|3.8 1.5|3.4|3.8 82 ## 4 1.4|2.1|3.8 1.4|2.1|3.8 46 ## 5 2.1|4.4|14.5 2.1|4.4|14.5 65 ## 6 1.4|3.5|3.8 1.4|3.5|3.8 15 ## 7 3.5|4.4 3.5|4.4 85 ## 8 3.8|4.4|14.5 3.8|4.4|14.5 54 ## 9 2.1|3.8|4.1|5.5|14.1|14.2|14.5 2.1|3.8|4.1|5.5|14.1|14.2|14.5 91 ## 10 2.1|3.8|4.1|14.1|14.2|14.5 2.1|3.8|4.1|14.1|14.2|14.5 91 ## 11 5.5|14.1|14.2|14.5 5.5|14.1|14.2|14.5 91 ## 12 3.8|4|5.5|14.1|14.2|14.5 3.8|4|5.5|14.1|14.2|14.5 91 ## 13 3.8|4.1|5.5 3.8|4.1|5.5 221 ## 14 1.4|3.8|14.5 1.4|3.8|14.5 75 ## 15 3.4|5|14.5 3.4|5|14.5 182 ## elevation_upper xmin xmax ymin ymax path ## * ## 1 942 -896631 -648631 4946077 5067077 /tmp/Rtmpp2hyni/670_2.tif ## 2 942 -417631 320369 4742077 5033077 /tmp/Rtmpp2hyni/670_3.tif ## 3 942 -527631 -312631 4664077 4840077 /tmp/Rtmpp2hyni/670_4.tif ## 4 907 -916631 39369 4328077 5070077 /tmp/Rtmpp2hyni/2072_1.tif ## 5 1020 -868631 320369 4304077 5070077 /tmp/Rtmpp2hyni/2374_1.tif ## 6 598 -794631 -305631 4334077 4678077 /tmp/Rtmpp2hyni/3667_1.tif ## 7 949 -863631 -8631 4400077 5062077 /tmp/Rtmpp2hyni/4421_1.tif ## 8 951 -916631 203369 4304077 5070077 /tmp/Rtmpp2hyni/4650_1.tif ## 9 974 -621631 -354631 4304077 4456077 /tmp/Rtmpp2hyni/5808_1.tif ## 10 974 -375631 -201631 4373077 4519077 /tmp/Rtmpp2hyni/5808_2.tif ## 11 974 -771631 -651631 4781077 4861077 /tmp/Rtmpp2hyni/5808_3.tif ## 12 974 -868631 275369 4406077 5058077 /tmp/Rtmpp2hyni/5808_4.tif ## 13 1069 -896631 -74631 4634077 5070077 /tmp/Rtmpp2hyni/6701_1.tif ## 14 991 -868631 291369 4304077 5044077 /tmp/Rtmpp2hyni/8110_1.tif ## 15 1183 -402631 183369 4624077 5000077 /tmp/Rtmpp2hyni/8644_1.tif ## geometry ## * ## 1 (((-744167.8 5065733, -744758.3 5065030, -745429.8 5064437, -745619 5064063,… ## 2 (((27902.87 4746365, 27056.68 4747482, 26787.49 4748880, 27030.63 4750311, 2… ## 3 (((-463308.8 4832969, -462721.2 4833049, -461995.6 4833183, -461258.5 483323… ## 4 (((-415672.5 4377074, -416862.2 4377160, -416399.1 4377219, -415731.4 437712… ## 5 (((-568331.2 4328892, -568572.4 4330309, -568690.1 4331566, -568471.1 433245… ## 6 (((-598890.3 4658362, -599068.8 4657037, -598638.5 4656082, -597329.2 465567… ## 7 (((-862522.7 4407131, -862193.7 4407172, -862201.4 4407165, -862640.4 440702… ## 8 (((-613250.4 4368112, -611865.8 4368219, -610831.5 4368152, -610384.8 436778… ## 9 (((-604205.8 4355480, -604258.8 4354866, -604481.7 4354214, -604629.3 435369… ## 10 (((-214939.6 4390035, -213485.5 4389897, -212252.4 4389503, -211509.5 438892… ## 11 (((-712163.3 4853217, -712938.1 4854392, -714015.8 4854814, -715276.9 485473… ## 12 (((-853538.9 4415882, -853532.1 4415239, -853670.1 4414456, -853800.3 441371… ## 13 (((-501888.8 5040197, -501188.3 5040426, -500444.4 5040511, -499781.6 504024… ## 14 (((-259653.3 4377133, -259650.4 4376545, -259928.2 4375843, -260216.7 437513… ## 15 (((166524.7 4944201, 165755.7 4943358, 165117 4942089, 164815 4940646, 16505… # create maps ## N.B. you might need to install the ggmap package to create the maps map <- plot_spp_aoh_data( spp_aoh_data[1:4, ], zoom = 6, maptype = \"stamen_toner_background\", maxcell = Inf ) + scale_fill_viridis_d() + scale_color_manual(values = c(\"range\" = \"red\")) + scale_size_manual(values = c(\"range\" = 0.5)) + theme( axis.title = element_blank(), axis.text = element_text(size = 6), strip.text = element_text(color = \"white\"), strip.background = element_rect(fill = \"black\", color = \"black\") ) # display maps print(map)"},{"path":"https://prioritizr.github.io/aoh/articles/customization.html","id":"conclusion","dir":"Articles","previous_headings":"","what":"Conclusion","title":"Customization","text":"Hopefully, vignette provided useful overview customizing Area Habitat data. questions suggestions additional elevation, habitat classification, crosswalk datasets included package, please file issue package’s online code repository.","code":""},{"path":[]},{"path":"https://prioritizr.github.io/aoh/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Jeffrey O Hanson. Author, maintainer.","code":""},{"path":"https://prioritizr.github.io/aoh/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Hanson JO (2024) aoh: Create Area Habitat Data. R package version 0.0.2.14. Available https://github.com/prioritizr/aoh. IUCN [insert year] IUCN Red List Threatened Species. Version [insert version]. Available www.iucnredlist.org. BirdLife International Handbook Birds World ([insert year]) Bird species distribution maps world. Version [insert version]. Available https://datazone.birdlife.org/species/requestdis. Jung M, Dahal PR, Butchart SHM, Donald PF, De Lamo X, Lesiv M, Kapos V, Rondinini C, Visconti P (2020). “global map terrestrial habitat types.” Scientific Data, 7(1), 256. doi:10.1038/s41597-020-00599-8. Jung M, Dahal PR, Butchart SHM, Donald PF, De Lamo X, Lesiv M, Kapos V, Rondinini C, Visconti P (2020b) global map terrestrial habitat types (insert version) [Data set]. Zenodo. Available https://doi.org/10.5281/zenodo.4058819. Lumbierres M, Dahal PR, Di Marco M, Butchart SHM, Donald PF, Rondinini C (2021). “Translating habitat class land cover map area habitat terrestrial vertebrates.” Conservation Biology, 36(3), e13851. doi:10.1111/cobi.13851. Robinson N, Regetz J, Guralnick RP (2014). “EarthEnv-DEM90: nearly-global, void-free, multi-scale smoothed 90m digital elevation model fused ASTER SRTM data.” ISPRS Journal Photogrammetry Remote Sensing, 87(1), 57–67. doi:10.1016/j.isprsjprs.2013.11.002.","code":"@Manual{, author = {Jeffrey O Hanson}, title = {aoh: Create Area of Habitat Data}, year = {2024}, note = {R package version 0.0.2.14}, url = {https://github.com/prioritizr/aoh}, } @Manual{, author = {{IUCN}}, title = {IUCN Red List of Threatened Species}, year = {[insert year]}, note = {Version [insert version]}, url = {www.iucnredlist.org}, } @Manual{, author = {{BirdLife International} and {Handbook of the Birds of the World}}, title = {Bird species distribution maps of the world}, year = {[insert year]}, note = {Version [insert version]}, url = {https://datazone.birdlife.org/species/requestdis}, } @Article{, author = {Martin Jung and Prabhat Raj Dahal and Stuart H. M. Butchart and Paul F. Donald and Xavier {De Lamo} and Myroslava Lesiv and Valerie Kapos and Carlo Rondinini and Piero Visconti}, title = {A global map of terrestrial habitat types}, year = {2020}, journal = {Scientific Data}, volume = {7}, number = {1}, pages = {256}, doi = {10.1038/s41597-020-00599-8}, } @Manual{, author = {Martin Jung and Prabhat Raj Dahal and Stuart H. M. Butchart and Paul F. Donald and Xavier {De Lamo} and Myroslava Lesiv and Valerie Kapos and Carlo Rondinini and Piero Visconti}, title = {A global map of terrestrial habitat types [Data set]}, year = {[insert year]}, note = {Zenodo}, doi = {10.5281/zenodo.4058819}, } @Article{, author = {Maria Lumbierres and Prabhat Raj Dahal and Moreno {Di Marco} and Stuart H. M. Butchart and Paul F. Donald and Carlo Rondinini}, title = {Translating habitat class to land cover to map area of habitat of terrestrial vertebrates}, year = {2021}, journal = {Conservation Biology}, volume = {36}, number = {3}, pages = {e13851}, doi = {10.1111/cobi.13851}, } @Article{, author = {Natalie Robinson and James Regetz and Robert P Guralnick}, title = {EarthEnv-DEM90: A nearly-global, void-free, multi-scale smoothed 90m digital elevation model from fused ASTER and SRTM data}, journal = {ISPRS Journal of Photogrammetry and Remote Sensing}, year = {2014}, volume = {87}, number = {1}, pages = {57--67}, doi = {10.1016/j.isprsjprs.2013.11.002}, }"},{"path":[]},{"path":"https://prioritizr.github.io/aoh/index.html","id":"overview","dir":"","previous_headings":"aoh: Create Area of Habitat Data","what":"Overview","title":"Create Area of Habitat Data","text":"Area Habitat (AOH) maps aim delineate spatial distribution suitable habitat species (Brooks et al. 2019). used assess performance protected area systems, measure impacts threats biodiversity, identify priorities conservation actions (e.g., Rondinini et al. 2005; Tracewski et al. 2016; Durán et al. 2021). maps generally produced obtaining geographic range data species, removing areas contain suitable habitat occur outside known elevational limits species (Brooks et al. 2019). help make maps accessible, aoh R package provides routines automatically creating Area Habitat data based International Union Conservation Nature (IUCN) Red List Threatened Species. manually downloading species range data IUCN Red List, users can import (using read_spp_range_data()), prepare collate additional information subsequent processing (using create_spp_info_data()), create Area Habitat data (using create_spp_aoh_data()). Global elevation habitat classification data (Jung et al. 2020; Lumbierres et al. 2021; Robinson et al. 2014) automatically downloaded, data species’ habitat preferences elevational limits obtained automatically using IUCN Red List API. Since accessing IUCN Red List requires token, users may need obtain token update R configuration recognize token (see installation instructions details).","code":""},{"path":[]},{"path":"https://prioritizr.github.io/aoh/index.html","id":"package-installation","dir":"","previous_headings":"aoh: Create Area of Habitat Data > Installation","what":"Package installation","title":"Create Area of Habitat Data","text":"latest developmental version aoh R package can installed using following R code. Please note requires sf, terra, zen4R R packages, may require additional software installed. encounter problems installing dependencies, please consult installation instructions.","code":"if (!require(remotes)) install.packages(\"remotes\") remotes::install_github(\"prioritizr/aoh\")"},{"path":"https://prioritizr.github.io/aoh/index.html","id":"optional-dependencies","dir":"","previous_headings":"aoh: Create Area of Habitat Data > Installation","what":"Optional dependencies","title":"Create Area of Habitat Data","text":"aoh R package can leverage prepr R package augment data cleaning procedures. Since prepr R package available Comprehensive R Archive Network (CRAN), listed optional dependency. cases, prepr R package required complete data cleaning procedures (e.g., fix especially extreme geometry issues) aoh R package throw error package available. install prepr R package, please use following R code. Note prepr R package system dependencies need installed package can installed (see platform-specific instructions). package can also leverage Geospatial Data Abstraction Library (GDAL) Geographic Resources Analysis Support System (GRASS) help reduce processing time. Although use software optional, can help improve computational performance processing data across large spatial extents. provide platform-specific instructions install dependencies prepr R package, GDAL, GRASS.","code":"if (!require(remotes)) install.packages(\"remotes\") remotes::install_github(\"prioritizr/prepr\")"},{"path":"https://prioritizr.github.io/aoh/index.html","id":"windows","dir":"","previous_headings":"aoh: Create Area of Habitat Data > Installation > Optional dependencies","what":"Windows","title":"Create Area of Habitat Data","text":"Rtools software needs installed install prepr R package package. software provides system requirements rwinlib. Additionally, easiest way install GDAL GRASS OSGeo4W. Download OSGeo4W installer, select “Express Install” option, follow prompts complete installation. installation process finished, please restart computer. aoh::is_gdal_calc_available() function find GDAL, may also need update PATH environmental variable contains folder path GDAL (default folder path C:\\OSGeo4W\\bin),","code":""},{"path":"https://prioritizr.github.io/aoh/index.html","id":"ubuntu","dir":"","previous_headings":"aoh: Create Area of Habitat Data > Installation > Optional dependencies","what":"Ubuntu","title":"Create Area of Habitat Data","text":"recent versions Ubuntu (18.04 later), libraries available official repositories. can installed using following system commands.","code":"apt-get -y update apt-get install -y \\ libgdal-dev libgeos-dev libproj-dev gdal-bin grass \\ libgmp3-dev libmpfr-dev libudunits2-dev"},{"path":"https://prioritizr.github.io/aoh/index.html","id":"linux","dir":"","previous_headings":"aoh: Create Area of Habitat Data > Installation > Optional dependencies","what":"Linux","title":"Create Area of Habitat Data","text":"Unix-alikes, gdal (>= 3.0.2), gmp (>= 4.2.3), grass (>= 7.8.7), mpfr (>= 3.0.0) required.","code":""},{"path":"https://prioritizr.github.io/aoh/index.html","id":"macos","dir":"","previous_headings":"aoh: Create Area of Habitat Data > Installation > Optional dependencies","what":"MacOS","title":"Create Area of Habitat Data","text":"easiest way install libraries using HomeBrew. installing HomeBrew, libraries can installed using following system commands.","code":"brew tap osgeo/osgeo4mac brew install pkg-config brew install gdal brew install osgeo-grass brew install gmp brew install mpfr"},{"path":"https://prioritizr.github.io/aoh/index.html","id":"accessing-the-iucn-red-list-api","dir":"","previous_headings":"aoh: Create Area of Habitat Data > Installation","what":"Accessing the IUCN Red List API","title":"Create Area of Habitat Data","text":"installing aoh R package, need obtain token IUCN Red List API (one already). , please visit IUCN API website (https://apiv3.iucnredlist.org/), click “Generate token” link top web page, fill form apply token. receive token shortly completing form (immediately). receiving token, please open .Renviron file computer (e.g., using usethis::edit_r_environ()). Next, please add following text file (replacing string token) save file, using token place string . Please restart R session. now able access IUCN Red List API. verify , please try running following R code – assuming everything works correctly – output . instructions work, please consult documentation rredlist R package details.","code":"IUCN_REDLIST_KEY=\"your_actual_token_not_this_string\" # verify access to IUCN Red List API is_iucn_rl_api_available()"},{"path":"https://prioritizr.github.io/aoh/index.html","id":"usage","dir":"","previous_headings":"aoh: Create Area of Habitat Data","what":"Usage","title":"Create Area of Habitat Data","text":"provide short example using aoh R package. example, generate Area Habitat data following Iberian species: Pyrenean brook salamander (Calotriton asper), Iberian frog (Rana iberica), western spadefoot toad (Pelobates cultripes), golden striped salamnader (Chioglossa lusitanica). Please note example abridged version tutorial provided package vignette, please consult package vignette detailed tutorial using package. start , load package several packages help data processing visualization. Now import range data species. Although users typically obtain range data International Union Conservation Nature (IUCN) Red List Threatened Species, use built-species range data distributed package convenience. Please note data obtained IUCN Red List, manually generated using occurrence records Global Biodiversity Information Facility. Next, prepare range data generating Area Habitat data. procedure – addition repairing geometry issues spatial data – obtain information species’ habitat preferences elevational limits (via IUCN Red List Threatened Species). also specify folder cache downloaded data won’t need re-download subsequent runs. can now generate Area Habitat data species. default, data generated using elevation data derived Robinson et al. (2014) habitat data derived Lumbierres et al. (2021). Similar , also specify folder cache downloaded datasets won’t need re-downloaded subsequent runs. generating Area Habitat data, can import . Finally, let’s create maps compare range data Area habitat data.","code":"# load packages library(aoh) library(terra) library(rappdirs) library(ggplot2) # find file path for data path <- system.file(\"extdata\", \"EXAMPLE_SPECIES.zip\", package = \"aoh\") # import data spp_range_data <- read_spp_range_data(path) # preview data print(spp_range_data) ## Simple feature collection with 4 features and 26 fields ## Geometry type: POLYGON ## Dimension: XY ## Bounding box: xmin: -9.479736 ymin: 36.59422 xmax: 3.302702 ymax: 43.76455 ## Geodetic CRS: WGS 84 ## # A tibble: 4 × 27 ## id_no binomial presence origin seasonal compiler yrcompiled citation ## ## 1 979 Alytes dickhilleni 1 1 1 Derived… NA ## 2 59448 Calotriton asper 1 1 1 Derived… NA ## 3 4657 Chioglossa lusita… 1 1 1 Derived… NA ## 4 58622 Rana iberica 1 1 1 Derived… NA ## # ℹ 19 more variables: subspecies , subpop , source , ## # island , tax_comm , dist_comm , generalisd , ## # legend , kingdom , phylum , class , order_ , ## # family , genus , category , marine , terrestial , ## # freshwater , geometry # specify cache directory cache_dir <- user_data_dir(\"aoh\") # create cache_dir if needed if (!file.exists(cache_dir)) { dir.create(cache_dir, showWarnings = FALSE, recursive = TRUE) } # prepare information spp_info_data <- create_spp_info_data(spp_range_data, cache_dir = cache_dir) # specify cache directory cache_dir <- user_data_dir(\"aoh\") # specify folder to save Area of Habitat data ## although we use a temporary directory here to avoid polluting your ## with examples files, you would normally specify the folder ## on your computer where you want to save data output_dir <- tempdir() # generate Area of Habitat data ## note that this function might take a complete because it will need to ## download the global habitat and elevation data that first time you run it. spp_aoh_data <- create_spp_aoh_data( spp_info_data, output_dir = output_dir, cache_dir = cache_dir ) # preview results print(spp_aoh_data[, c(\"id_no\", \"seasonal\", \"path\")]) # import the Area of Habitat data spp_aoh_rasters <- lapply(spp_aoh_data$path, rast) # preview raster data print(spp_aoh_rasters) ## [[1]] ## class : SpatRaster ## dimensions : 2593, 3701, 1 (nrow, ncol, nlyr) ## resolution : 100, 100 (x, y) ## extent : -467931, -97831, 4364377, 4623677 (xmin, xmax, ymin, ymax) ## coord. ref. : World_Behrmann ## source : 979_1.tif ## name : lyr1 ## min value : 0 ## max value : 1 ## ## [[2]] ## class : SpatRaster ## dimensions : 2266, 5670, 1 (nrow, ncol, nlyr) ## resolution : 100, 100 (x, y) ## extent : -248331, 318669, 4838277, 5064877 (xmin, xmax, ymin, ymax) ## coord. ref. : World_Behrmann ## source : 59448_1.tif ## name : lyr1 ## min value : 0 ## max value : 1 ## ## [[3]] ## class : SpatRaster ## dimensions : 5149, 5361, 1 (nrow, ncol, nlyr) ## resolution : 100, 100 (x, y) ## extent : -914731, -378631, 4551877, 5066777 (xmin, xmax, ymin, ymax) ## coord. ref. : World_Behrmann ## source : 4657_1.tif ## name : lyr1 ## min value : 0 ## max value : 1 ## ## [[4]] ## class : SpatRaster ## dimensions : 4978, 7512, 1 (nrow, ncol, nlyr) ## resolution : 100, 100 (x, y) ## extent : -904331, -153131, 4568977, 5066777 (xmin, xmax, ymin, ymax) ## coord. ref. : World_Behrmann ## source : 58622_1.tif ## name : lyr1 ## min value : 0 ## max value : 1 # create maps ## N.B. you might need to install the ggmap package map <- plot_spp_aoh_data( spp_aoh_data, zoom = 6, maptype = \"stamen_toner_background\" ) + scale_fill_viridis_d() + scale_color_manual(values = c(\"range\" = \"red\")) + scale_size_manual(values = c(\"range\" = 0.5)) + theme( axis.title = element_blank(), axis.text = element_text(size = 6), strip.text = element_text(color = \"white\"), strip.background = element_rect(fill = \"black\", color = \"black\") ) # display maps print(map)"},{"path":"https://prioritizr.github.io/aoh/index.html","id":"citation","dir":"","previous_headings":"aoh: Create Area of Habitat Data","what":"Citation","title":"Create Area of Habitat Data","text":"Please cite aoh R package underlying datasets used produce Area Habitat data.","code":"Area of Habitat data are created using a range of different datasets. Depending on which datasets are used, please cite the aoh package and relevant data using: Hanson JO (2024) aoh: Create Area of Habitat Data. R package version 0.0.2.14. Available at https://github.com/prioritizr/aoh. IUCN [insert year] IUCN Red List of Threatened Species. Version [insert version]. Available at www.iucnredlist.org. BirdLife International and Handbook of the Birds of the World ([insert year]) Bird species distribution maps of the world. Version [insert version]. Available at https://datazone.birdlife.org/species/requestdis. Jung M, Dahal PR, Butchart SHM, Donald PF, De Lamo X, Lesiv M, Kapos V, Rondinini C, Visconti P (2020). \"A global map of terrestrial habitat types.\" _Scientific Data_, *7*(1), 256. doi:10.1038/s41597-020-00599-8 . Jung M, Dahal PR, Butchart SHM, Donald PF, De Lamo X, Lesiv M, Kapos V, Rondinini C, and Visconti P (2020b) A global map of terrestrial habitat types (insert version) [Data set]. Zenodo. Available at https://doi.org/10.5281/zenodo.4058819. Lumbierres M, Dahal PR, Di Marco M, Butchart SHM, Donald PF, Rondinini C (2021). \"Translating habitat class to land cover to map area of habitat of terrestrial vertebrates.\" _Conservation Biology_, *36*(3), e13851. doi:10.1111/cobi.13851 . Robinson N, Regetz J, Guralnick RP (2014). \"EarthEnv-DEM90: A nearly-global, void-free, multi-scale smoothed 90m digital elevation model from fused ASTER and SRTM data.\" _ISPRS Journal of Photogrammetry and Remote Sensing_, *87*(1), 57-67. doi:10.1016/j.isprsjprs.2013.11.002 . To see these entries in BibTeX format, use 'print(, bibtex=TRUE)', 'toBibtex(.)', or set 'options(citation.bibtex.max=999)'."},{"path":"https://prioritizr.github.io/aoh/index.html","id":"getting-help","dir":"","previous_headings":"","what":"Getting help","title":"Create Area of Habitat Data","text":"Please refer package website information. questions using package suggestions improving , please file issue package’s online code repository.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/aoh.html","id":null,"dir":"Reference","previous_headings":"","what":"aoh: Create Area of Habitat Data — aoh","title":"aoh: Create Area of Habitat Data — aoh","text":"Area Habitat (AOH) maps aim delineate spatial distribution suitable habitat species (Brooks et al. 2019). used help understand impacts habitat loss species, prioritize areas conservation (e.g., Tracewski et al. 2016; Rondinini et al. 2005). maps generally produced obtaining geographic range data species, removing areas contain suitable habitat occur outside known elevational limits species (Brooks et al. 2019). help make maps accessible, package provides routines automatically creating Area Habitat data based International Union Conservation Nature (IUCN) Red List Threatened Species. manually downloading species range data IUCN Red List, users can import (using read_spp_range_data()), prepare collate additional information subsequent processing (using create_spp_info_data()), create Area Habitat data (using create_spp_aoh_data()). Global elevation habitat classification data (Jung et al. 2020a,b; Lumbierres *et al. 2021; Robinson et al. 2014) automatically downloaded, data species' habitat preferences elevational limits obtained automatically using IUCN Red List API. Since accessing IUCN Red List API requires token, users may need obtain token update R configuration recognize token (see instructions details).","code":""},{"path":"https://prioritizr.github.io/aoh/reference/aoh.html","id":"accessing-the-iucn-red-list-api","dir":"Reference","previous_headings":"","what":"Accessing the IUCN Red List API","title":"aoh: Create Area of Habitat Data — aoh","text":"need obtain token IUCN Red List API (one already). achieve , please visit IUCN API website (https://apiv3.iucnredlist.org/), click \"Generate token\" link top web page, fill form apply token. receive token shortly completing form (immediately). receiving token, please open .Renviron file computer (e.g., using usethis::edit_r_environ()). Next, please add following text file (replacing string token) save file: Please restart R session. now able access IUCN Red List API. verify , please try running following R code – assuming everything works correctly – see TRUE output: instructions work, please consult documentation rredlist package details.","code":"IUCN_REDLIST_KEY=\"your_actual_token_not_this_string\" # verify access to IUCN Red List API is_iucn_rl_available()"},{"path":"https://prioritizr.github.io/aoh/reference/aoh.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"aoh: Create Area of Habitat Data — aoh","text":"Brooks TM, Pimm SL, Akçakaya HR, Buchanan GM, Butchart SHM, Foden W, Hilton-Taylor C, Hoffmann M, Jenkins CN, Joppa L, Li BV, Menon V, Ocampo-Peñuela N, Rondinini C (2019) Measuring terrestrial Area Habitat (AOH) utility IUCN Red List. Trends Ecology & Evolution, 34, 977–986. doi:10.1016/j.tree.2019.06.009 Jung M, Dahal PR, Butchart SHM, Donald PF, De Lamo X, Lesiv M, Kapos V, Rondinini C, Visconti P (2020a) global map terrestrial habitat types. Scientific data, 7, 1–8. doi:10.1038/s41597-020-00599-8 Jung M, Dahal PR, Butchart SHM, Donald PF, De Lamo X, Lesiv M, Kapos V, Rondinini C, Visconti P (2020b) global map terrestrial habitat types (insert version) [Data set]. Zenodo. doi:10.5281/zenodo.4058819 Lumbierres M, Dahal PR, Di Marco M, Butchart SHM, Donald PF, Rondinini C (2021) Translating habitat class land cover map area habitat terrestrial vertebrates. Conservation Biology, 36, e13851. doi:10.1111/cobi.13851 Robinson N, Regetz J, Guralnick RP (2014) EarthEnv-DEM90: nearly- global, void-free, multi-scale smoothed, 90m digital elevation model fused ASTER SRTM data. ISPRS Journal Photogrammetry Remote Sensing, 87:57–67. doi:10.1016/j.isprsjprs.2013.11.002 Rondinini C, Stuart S, Boitani L (2005) Habitat suitability models shortfall conservation planning African vertebrates. Conservation Biology, 19, 1488–1497. doi:10.1111/j.1523-1739.2005.00204 Tracewski Ł, Butchart SHM, Di Marco M, Ficetola GF, Rondinini C, Symes , Wheatley H, Beresford AE, Buchanan GM (2016) Toward quantification impact 21st‐century deforestation extinction risk terrestrial vertebrates. Conservation Biology, 30, 1070–1079. doi:10.1111/cobi.12715","code":""},{"path":[]},{"path":"https://prioritizr.github.io/aoh/reference/aoh.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"aoh: Create Area of Habitat Data — aoh","text":"Maintainer: Jeffrey O Hanson jeffrey.hanson@uqconnect.edu.au (ORCID)","code":""},{"path":"https://prioritizr.github.io/aoh/reference/calc_spp_frc_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate fractional coverage data — calc_spp_frc_data","title":"Calculate fractional coverage data — calc_spp_frc_data","text":"Calculate fractional coverage species' Area Habitat.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/calc_spp_frc_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate fractional coverage data — calc_spp_frc_data","text":"","code":"calc_spp_frc_data( x, res, output_dir, template_data = NULL, cache_dir = tempdir(), force = FALSE, n_threads = 1, engine = \"terra\", cache_limit = 1000, verbose = TRUE, ... )"},{"path":"https://prioritizr.github.io/aoh/reference/calc_spp_frc_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate fractional coverage data — calc_spp_frc_data","text":"x sf::st_sf() Object containing species data. object produced using create_spp_aoh_data() function. res numeric Resolution computing fractional coverage. Note argument res must factor resolution underlying Area Habitat data. example, value 5000 valid argument underlying data resolution 100 m. output_dir character character Folder path save raster (GeoTIFF) files containing fractional coverage data. template_data terra::rast() Raster data use template computing fractional coverage. Note argument spatial properties elevation habitat data used generate Area Habitat data. Defaults NULL template data automatically imported default global habitat dataset (using get_lumb_cgls_habitat_data()). cache_dir character Folder path downloading caching data. default, temporary directory used (.e., tempdir()). avoid downloading data multiple times, strongly recommended specify persistent storage location (see Examples ). force logical data downloaded even data already available? Defaults FALSE. n_threads integer Number computational threads use data processing. reduce run time, strongly recommended set parameter based available resources (see Examples section ). Note parallel processing used processing habitat classification elevation data. , parameter influence using preprocessed datasets. Defaults 1. engine character Value indicating name software use data processing. Available options include \"terra\" \"gdal\". Defaults \"terra\". cache_limit integer Amount memory (Mb) caching processing spatial data Geospatial Data Abstraction Library (GDAL). parameter used using \"gdal\" engine. possible, recommended set parameter 5000 (assuming least 8Gb memory available system). Defaults 1000. verbose logical progress displayed processing data? Defaults TRUE. ... Arguments passed get_lumb_cgls_habitat_data().","code":""},{"path":"https://prioritizr.github.io/aoh/reference/calc_spp_frc_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate fractional coverage data — calc_spp_frc_data","text":"updated version argument x updated values path, xmin, xmax, ymin, ymax columns. ","code":""},{"path":"https://prioritizr.github.io/aoh/reference/calc_spp_frc_data.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Calculate fractional coverage data — calc_spp_frc_data","text":"function works () creating template grid based specified resolution, (ii) aggregating Area Habitat data match spatial origin resolution template grid, (iii) dividing aggregated values based aggregation factor express values fractional coverage.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/calc_spp_frc_data.html","id":"output-file-format","dir":"Reference","previous_headings":"","what":"Output file format","title":"Calculate fractional coverage data — calc_spp_frc_data","text":"Fractional coverage data stored separate raster (GeoTIFF) file seasonal distribution species. raster file assigned file name based prefix combination species' taxon identifier (per id_no/SISID column x) identifier seasonal distribution (per seasonality x) (.e., file names named according FRC_{$id_no}_${seasonality}.tif). given raster file, grid cell values denote proportion suitable habitat located within cell. example, value 0 corresponds 0% fractional coverage, 0.5 50% fractional coverage, 1 100% fractional coverage. Missing (NA) values correspond grid cells located entirely outside species' distribution.","code":""},{"path":[]},{"path":"https://prioritizr.github.io/aoh/reference/calc_spp_frc_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Calculate fractional coverage data — calc_spp_frc_data","text":"","code":"# \\dontrun{ # find file path for example range data following IUCN Red List data format ## N.B., the range data were not obtained from the IUCN Red List, ## and were instead based on data from GBIF (https://www.gbif.org/) path <- system.file(\"extdata\", \"EXAMPLE_SPECIES.zip\", package = \"aoh\") # import data spp_range_data <- read_spp_range_data(path) # specify settings for data processing output_aoh_dir <- tempdir() # folder to save AOH data output_frc_dir <- tempdir() # folder to save coverage data cache_dir <- rappdirs::user_data_dir(\"aoh\") # persistent storage location n_threads <- parallel::detectCores() - 1 # speed up analysis # create cache directory if needed if (!file.exists(cache_dir)) { dir.create(cache_dir, showWarnings = FALSE, recursive = TRUE) } # create species information data spp_info_data <- create_spp_info_data( x = spp_range_data, cache_dir = cache_dir ) #> ℹ initializing #> ✔ initializing [1.5s] #> #> ℹ cleaning species range data #> ✔ cleaning species range data [2s] #> #> ℹ importing species summary data #> ✔ importing species summary data [480ms] #> #> ℹ importing species habitat data #> ✔ importing species habitat data [335ms] #> #> ℹ collating species data #> ✔ collating species data [188ms] #> #> ℹ post-processing results #> ✔ post-processing results [12ms] #> #> ✔ finished # create Area of Habitat data for species spp_aoh_data <- create_spp_aoh_data( x = spp_info_data, output_dir = output_aoh_dir, n_threads = n_threads, cache_dir = cache_dir ) #> ℹ initializing #> ✔ initializing [5ms] #> #> ℹ importing global elevation data #> ✔ importing global elevation data [8s] #> #> ℹ importing global habitat data #> ! argument to \"crosswalk_data\" is missing the following 2 habitat classification codes: \"7.1\", \"7.2\" #> ℹ importing global habitat data #> ✔ importing global habitat data [5s] #> #> ℹ generating Area of Habitat data #> ℹ processing ■■■■■■■■■ [ 25% | ETA: 13s] #> ℹ processing ■■■■■■■■■■■■■■■■ [ 50% | ETA: 8s] #> ℹ processing ■■■■■■■■■■■■■■■■■■■■■■■ [ 75% | ETA: 5s] #> ✔ processing [25.2s] #> #> ℹ generating Area of Habitat data #> ✔ generating Area of Habitat data [25.2s] #> #> ℹ post-processing results #> ✔ post-processing results [13ms] #> #> ✔ finished # compute fractional coverage across a 5 x 5 km spatial grid spp_aoh_frc_data <- calc_spp_frc_data( x = spp_aoh_data, output_dir = output_frc_dir, res = 5000, cache_dir = cache_dir ) #> ℹ importing global habitat data #> ✔ importing global habitat data [5.8s] #> # } if (FALSE) { # interactive() # \\dontrun{ # preview data print(spp_aoh_frc_data) # } } # \\dontrun{ # plot the data to visualize the range maps and fractional coverage data plot_spp_frc_data(spp_aoh_frc_data) # }"},{"path":"https://prioritizr.github.io/aoh/reference/create_spp_aoh_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Create Area of Habitat data — create_spp_aoh_data","title":"Create Area of Habitat data — create_spp_aoh_data","text":"Create Area Habitat (AOH) data species(Brooks et al. 2019). Briefly, function creates Area Habitat data seasonal distribution species stores results raster files disk. Please note procedures designed terrestrial species, apply marine freshwater species.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/create_spp_aoh_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create Area of Habitat data — create_spp_aoh_data","text":"","code":"create_spp_aoh_data( x, output_dir, elevation_data = NULL, habitat_data = NULL, crosswalk_data = NULL, cache_dir = tempdir(), habitat_version = \"latest\", elevation_version = \"latest\", force = FALSE, n_threads = 1, cache_limit = 1000, engine = \"terra\", rasterize_touches = FALSE, verbose = TRUE )"},{"path":"https://prioritizr.github.io/aoh/reference/create_spp_aoh_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create Area of Habitat data — create_spp_aoh_data","text":"x sf::sf() Spatial data delineating species' geographic ranges, habitat preferences, elevational limits. object created using create_spp_info_data() function. output_dir character Folder path save raster (GeoTIFF) files containing Area Habitat data. elevation_data terra::rast() Raster data delineating worldwide elevation data (e.g., Robinson et al. 2014). Defaults NULL data automatically obtained (using get_global_elevation_data()). data obtained automatically, preprocessed version habitat data used reduce processing time. habitat_data terra::rast() Raster data indicating presence different habitat classes across world (e.g., Jung et al. 2020a,b; Lumbierres et al. 2021). grid cell contain integer value specifies habitat class present within cell (based argument crosswalk_data). Defaults NULL data automatically obtained (using get_lumb_cgls_habitat_data()). crosswalk_data data.frame() Table containing data indicate grid cell values argument habitat_data correspond IUCN habitat classification codes. argument contain code column specifies set IUCN habitat classification codes (see iucn_habitat_data(), value column specifies different values argument habitat_data. Defaults NULL crosswalk default habitat data used (.e., crosswalk_lumb_cgls_data()). cache_dir character Folder path downloading caching data. default, temporary directory used (.e., tempdir()). avoid downloading data multiple times, strongly recommended specify persistent storage location (see Examples ). habitat_version character Version habitat dataset used. See documentation version parameter get_lumb_cgls_habitat_data() function details. parameter used habitat data obtained automatically (.e., argument habitat_data NULL). Defaults \"latest\" recent version dataset used data need obtained. elevation_version character Version elevation dataset used. See documentation version parameter get_global_elevation_data() function details. parameter used elevation data obtained automatically (.e., argument elevation_data NULL). Defaults \"latest\" recent version dataset used data need obtained. force logical data downloaded even data already available? Defaults FALSE. n_threads integer Number computational threads use data processing. reduce run time, strongly recommended set parameter based available resources (see Examples section ). Note parallel processing used processing habitat classification elevation data. , parameter influence using preprocessed datasets. Defaults 1. cache_limit integer Amount memory (Mb) caching processing spatial data Geospatial Data Abstraction Library (GDAL). parameter used using \"gdal\" engine. possible, recommended set parameter 5000 (assuming least 8Gb memory available system). Defaults 1000. engine character Value indicating name software use data processing. Available options include \"terra\", \"gdal\", \"grass\" (see details). Defaults \"terra\". rasterize_touches logical x (species' range data) rasterized overlapped elevation habitat raster data? rasterize_touches = FALSE, species' range data treated overlapping raster cell, range data overlap centroid raster cell. rasterize_touches = TRUE, species' range data treated overlapping raster cell, range data overlap part raster cell. Since species' ranges might small overlap centroid raster cells (meaning output Area Habitat map contain suitable habitat species), may preferable use rasterize_touches = TRUE. Note rasterize_touches = TRUE compatible GRASS engine. Defaults FALSE (following Lumbierres et al. 2022). verbose logical progress displayed processing data? Defaults TRUE.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/create_spp_aoh_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create Area of Habitat data — create_spp_aoh_data","text":"sf::st_sf() object. object updated version argument x, contains additional columns describing output raster files. Specifically, contains following columns: id_no numeric species' taxon identifier IUCN Red List. binomial character species name. category character IUCN Red List threat category. migratory logical indicating species processed migratory species (.e., breeding, non-breeding, passage seasonal distribution). seasonal numeric seasonal distribution code. full_habitat_code character habitat classification codes contain suitable habitat species. given species multiple suitable habitat classes, denoted using pipe-delimited format. example, habitat classes denoted codes \"1.5\" \"1.9\" considered suitable given species, codes indicated \"1.5|1.9\". habitat_code character habitat codes used create species' Area Habitat data. Since argument habitat_data may contain habitat classes suitable habitats given species (e.g., default dataset contain subterranean cave systems), column contains subset habitat codes listed \"full_habitat_code\" column used processing. elevation_lower numeric lower elevation threshold used create species' Area Habitat data. elevation_upper numeric upper elevation threshold used create species' Area Habitat data. elevation_upper numeric upper elevation threshold used create species' Area Habitat data. xmin numeric value describing spatial extent output raster file. xmax numeric value describing spatial extent output raster file. ymin numeric value describing spatial extent output raster file. ymax numeric value describing spatial extent output raster file. path character file paths output raster files (see Output file format section details).","code":""},{"path":"https://prioritizr.github.io/aoh/reference/create_spp_aoh_data.html","id":"engines","dir":"Reference","previous_headings":"","what":"Engines","title":"Create Area of Habitat data — create_spp_aoh_data","text":"function can use different software engines data processing (specified via argument engine). Although engine produces results, engines computationally efficient others. default \"terra\" engine uses terra package processing. Although engine easy install fast small datasets, scale well larger datasets. generally recommended use \"gdal\" engine perform data processing Geospatial Data Abstraction Library (GDAL) can used data processing. \"grass\" engine can also used perform data processing Geographic Resources Analysis Support System (GRASS). Note \"grass\" engine requires GDAL GRASS software installed. instructions installing dependencies engines, please see README file.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/create_spp_aoh_data.html","id":"data-processing","dir":"Reference","previous_headings":"","what":"Data processing","title":"Create Area of Habitat data — create_spp_aoh_data","text":"Area Habitat data produced using following procedures. data generated, stored files disk (see Output file format section details). Global elevation habitat classification imported, (needed,, see get_global_elevation_data() get_lumb_cgls_habitat_data(), details)., data available cache directory, (.e. argument cache_dir), automatically downloaded, cache directory., Note elevation habitat data supplied, (.e. arguments elevation_data habitat_data), , user-supplied datasets used generate Area Habitat data., , Area Habitat data generated seasonal, distribution species. given species' distribution,, data generated , () cropping habitat classification elevation data spatial, extent species' seasonal distribution;, (ii) converting habitat classification data binary layer, denoting suitable habitat species' distribution, (using habitat affiliation data species' distribution);, (iii) creating mask based species' elevational limits, elevation data, using mask set values, binary layer zero outside species', limits;, (iv) creating mask rasterizing species' seasonal, distribution, using mask set values binary, layer missing (NA) values outside species', distribution;, (v) saving binary layer Area Habitat data, species' distribution., Note species' distributions already Area Habitat data, available output directory skipped, (unless argument force TRUE). Post-processing routines used prepare results. routines involve updating collated species data include file names spatial metadata Area Habitat data.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/create_spp_aoh_data.html","id":"output-file-format","dir":"Reference","previous_headings":"","what":"Output file format","title":"Create Area of Habitat data — create_spp_aoh_data","text":"Area Habitat data stored separate raster (GeoTIFF) file seasonal distribution species. raster file assigned file name based prefix combination species' taxon identifier (per id_no/SISID column x) identifier seasonal distribution (per seasonality x) (.e., file names named according AOH_{$id_no}_${seasonality}.tif). given raster file, grid cell values denote presence (using value 1) absence (using value 0) suitable habitat inside given species' distribution. Missing (NA) values correspond grid cells located outside species' distribution.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/create_spp_aoh_data.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Create Area of Habitat data — create_spp_aoh_data","text":"Brooks TM, Pimm SL, Akçakaya HR, Buchanan GM, Butchart SHM, Foden W, Hilton-Taylor C, Hoffmann M, Jenkins CN, Joppa L, Li BV, Menon V, Ocampo-Peñuela N, Rondinini C (2019) Measuring terrestrial Area Habitat (AOH) utility IUCN Red List. Trends Ecology & Evolution, 34, 977–986. doi:10.1016/j.tree.2019.06.009 Jung M, Dahal PR, Butchart SHM, Donald PF, De Lamo X, Lesiv M, Kapos V, Rondinini C, Visconti P (2020a) global map terrestrial habitat types. Scientific Data, 7, 1–8. doi:10.1038/s41597-020-00599-8 Jung M, Dahal PR, Butchart SHM, Donald PF, De Lamo X, Lesiv M, Kapos V, Rondinini C, Visconti P (2020b) global map terrestrial habitat types (insert version) [Data set]. Zenodo. doi:10.5281/zenodo.4058819 Lumbierres M, Dahal PR, Di Marco M, Butchart SHM, Donald PF, Rondinini C (2021) Translating habitat class land cover map area habitat terrestrial vertebrates. Conservation Biology, 36, e13851. doi:10.1111/cobi.13851 Lumbierres M, Dahal PR, Soria CD, Di Marco M, Butchart SHM, Donald PF, Rondinini C (2022) Area Habitat maps world’s terrestrial birds mammals. Scientific Data, 9, 749. Robinson N, Regetz J, Guralnick RP (2014) EarthEnv-DEM90: nearly- global, void-free, multi-scale smoothed, 90m digital elevation model fused ASTER SRTM data. ISPRS Journal Photogrammetry Remote Sensing, 87, 57–67. doi:10.1016/j.isprsjprs.2013.11.002","code":""},{"path":"https://prioritizr.github.io/aoh/reference/create_spp_aoh_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create Area of Habitat data — create_spp_aoh_data","text":"","code":"# \\dontrun{ # find file path for example range data following IUCN Red List data format ## N.B., the range data were not obtained from the IUCN Red List, ## and were instead based on data from GBIF (https://www.gbif.org/) path <- system.file(\"extdata\", \"EXAMPLE_SPECIES.zip\", package = \"aoh\") # import data spp_range_data <- read_spp_range_data(path) # specify settings for data processing output_dir <- tempdir() # folder to save AOH data cache_dir <- rappdirs::user_data_dir(\"aoh\") # persistent storage location n_threads <- parallel::detectCores() - 1 # speed up analysis # create cache directory if needed if (!file.exists(cache_dir)) { dir.create(cache_dir, showWarnings = FALSE, recursive = TRUE) } # create species information data spp_info_data <- create_spp_info_data( x = spp_range_data, cache_dir = cache_dir ) #> ℹ initializing #> ✔ initializing [330ms] #> #> ℹ cleaning species range data #> ✔ cleaning species range data [3.1s] #> #> ℹ importing species summary data #> ✔ importing species summary data [329ms] #> #> ℹ importing species habitat data #> ✔ importing species habitat data [330ms] #> #> ℹ collating species data #> ✔ collating species data [230ms] #> #> ℹ post-processing results #> ✔ post-processing results [12ms] #> #> ✔ finished # create Area of Habitat data for species # N.B., the default based on Lumbierres et al. (2021) spp_aoh_data <- create_spp_aoh_data( x = spp_info_data, output_dir = output_dir, n_threads = n_threads, cache_dir = cache_dir ) #> ℹ initializing #> ✔ initializing [5ms] #> #> ℹ importing global elevation data #> ✔ importing global elevation data [7s] #> #> ℹ importing global habitat data #> ! argument to \"crosswalk_data\" is missing the following 2 habitat classification codes: \"7.1\", \"7.2\" #> ℹ importing global habitat data #> ✔ importing global habitat data [5.2s] #> #> ℹ generating Area of Habitat data #> skipping 4 species distributions already processed #> ✔ generating Area of Habitat data [33ms] #> #> ℹ post-processing results #> ✔ post-processing results [12ms] #> #> ✔ finished # } if (FALSE) { # interactive() # \\dontrun{ # preview data print(spp_aoh_data) # } } # \\dontrun{ # import AOH data as a list of terra::rast() objects spp_aoh_rasters <- lapply(spp_aoh_data$path, terra::rast) # print AOH data list print(spp_aoh_rasters) #> [[1]] #> class : SpatRaster #> dimensions : 2593, 3701, 1 (nrow, ncol, nlyr) #> resolution : 100, 100 (x, y) #> extent : -467931, -97831, 4364377, 4623677 (xmin, xmax, ymin, ymax) #> coord. ref. : World_Behrmann #> source : 979_1.tif #> name : lyr1 #> min value : 0 #> max value : 1 #> #> [[2]] #> class : SpatRaster #> dimensions : 2266, 5670, 1 (nrow, ncol, nlyr) #> resolution : 100, 100 (x, y) #> extent : -248331, 318669, 4838277, 5064877 (xmin, xmax, ymin, ymax) #> coord. ref. : World_Behrmann #> source : 59448_1.tif #> name : lyr1 #> min value : 0 #> max value : 1 #> #> [[3]] #> class : SpatRaster #> dimensions : 5149, 5361, 1 (nrow, ncol, nlyr) #> resolution : 100, 100 (x, y) #> extent : -914731, -378631, 4551877, 5066777 (xmin, xmax, ymin, ymax) #> coord. ref. : World_Behrmann #> source : 4657_1.tif #> name : lyr1 #> min value : 0 #> max value : 1 #> #> [[4]] #> class : SpatRaster #> dimensions : 4978, 7512, 1 (nrow, ncol, nlyr) #> resolution : 100, 100 (x, y) #> extent : -904331, -153131, 4568977, 5066777 (xmin, xmax, ymin, ymax) #> coord. ref. : World_Behrmann #> source : 58622_1.tif #> name : lyr1 #> min value : 0 #> max value : 1 #> # plot the data to visualize the range maps and AOH data plot_spp_aoh_data(spp_aoh_data) # }"},{"path":"https://prioritizr.github.io/aoh/reference/create_spp_frc_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Create fractional coverage data — create_spp_frc_data","title":"Create fractional coverage data — create_spp_frc_data","text":"Create fractional coverage data describe species' Area Habitat (AOH) across large spatial scales. Briefly, function creates Area Habitat data seasonal distribution species, overlays Area Habitat data spatial grid, computes proportion suitable habitat available within grid cell (species separately), stores results raster files disk. reduce data storage requirements, Area Habitat data automatically deleted processing. Please note procedures designed terrestrial species, apply marine freshwater species.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/create_spp_frc_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create fractional coverage data — create_spp_frc_data","text":"","code":"create_spp_frc_data( x, output_dir, res, elevation_data = NULL, habitat_data = NULL, crosswalk_data = NULL, cache_dir = tempdir(), habitat_version = \"latest\", elevation_version = \"latest\", force = FALSE, n_threads = 1, cache_limit = 1000, engine = \"terra\", rasterize_touches = FALSE, verbose = TRUE )"},{"path":"https://prioritizr.github.io/aoh/reference/create_spp_frc_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create fractional coverage data — create_spp_frc_data","text":"x sf::sf() Spatial data delineating species' geographic ranges, habitat preferences, elevational limits. object created using create_spp_info_data() function. output_dir character Folder path save raster (GeoTIFF) files containing fractional coverage data. res numeric Resolution computing fractional coverage. Note argument res must factor resolution underlying Area Habitat data. example, value 5000 valid argument underlying data resolution 100 m. elevation_data terra::rast() Raster data delineating worldwide elevation data (e.g., Robinson et al. 2014). Defaults NULL data automatically obtained (using get_global_elevation_data()). data obtained automatically, preprocessed version habitat data used reduce processing time. habitat_data terra::rast() Raster data indicating presence different habitat classes across world (e.g., Jung et al. 2020a,b; Lumbierres et al. 2021). grid cell contain integer value specifies habitat class present within cell (based argument crosswalk_data). Defaults NULL data automatically obtained (using get_lumb_cgls_habitat_data()). crosswalk_data data.frame() Table containing data indicate grid cell values argument habitat_data correspond IUCN habitat classification codes. argument contain code column specifies set IUCN habitat classification codes (see iucn_habitat_data(), value column specifies different values argument habitat_data. Defaults NULL crosswalk default habitat data used (.e., crosswalk_lumb_cgls_data()). cache_dir character Folder path downloading caching data. default, temporary directory used (.e., tempdir()). avoid downloading data multiple times, strongly recommended specify persistent storage location (see Examples ). habitat_version character Version habitat dataset used. See documentation version parameter get_lumb_cgls_habitat_data() function details. parameter used habitat data obtained automatically (.e., argument habitat_data NULL). Defaults \"latest\" recent version dataset used data need obtained. elevation_version character Version elevation dataset used. See documentation version parameter get_global_elevation_data() function details. parameter used elevation data obtained automatically (.e., argument elevation_data NULL). Defaults \"latest\" recent version dataset used data need obtained. force logical data downloaded even data already available? Defaults FALSE. n_threads integer Number computational threads use data processing. reduce run time, strongly recommended set parameter based available resources (see Examples section ). Note parallel processing used processing habitat classification elevation data. , parameter influence using preprocessed datasets. Defaults 1. cache_limit integer Amount memory (Mb) caching processing spatial data Geospatial Data Abstraction Library (GDAL). parameter used using \"gdal\" engine. possible, recommended set parameter 5000 (assuming least 8Gb memory available system). Defaults 1000. engine character Value indicating name software use data processing. Available options include \"terra\", \"gdal\", \"grass\" (see details). Defaults \"terra\". rasterize_touches logical x (species' range data) rasterized overlapped elevation habitat raster data? rasterize_touches = FALSE, species' range data treated overlapping raster cell, range data overlap centroid raster cell. rasterize_touches = TRUE, species' range data treated overlapping raster cell, range data overlap part raster cell. Since species' ranges might small overlap centroid raster cells (meaning output Area Habitat map contain suitable habitat species), may preferable use rasterize_touches = TRUE. Note rasterize_touches = TRUE compatible GRASS engine. Defaults FALSE (following Lumbierres et al. 2022). verbose logical progress displayed processing data? Defaults TRUE.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/create_spp_frc_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create fractional coverage data — create_spp_frc_data","text":"sf::st_sf() object. object updated version argument x, contains additional columns describing output raster files. Specifically, contains following columns: id_no numeric species' taxon identifier IUCN Red List. binomial character species name. category character IUCN Red List threat category. migratory logical indicating species processed migratory species (.e., breeding, non-breeding, passage seasonal distribution). seasonal numeric seasonal distribution code. full_habitat_code character habitat classification codes contain suitable habitat species. given species multiple suitable habitat classes, denoted using pipe-delimited format. example, habitat classes denoted codes \"1.5\" \"1.9\" considered suitable given species, codes indicated \"1.5|1.9\". habitat_code character habitat codes used create species' Area Habitat data. Since argument habitat_data may contain habitat classes suitable habitats given species (e.g., default dataset contain subterranean cave systems), column contains subset habitat codes listed \"full_habitat_code\" column used processing. elevation_lower numeric lower elevation threshold used create species' Area Habitat data. elevation_upper numeric upper elevation threshold used create species' Area Habitat data. elevation_upper numeric upper elevation threshold used create species' Area Habitat data. xmin numeric value describing spatial extent output raster file. xmax numeric value describing spatial extent output raster file. ymin numeric value describing spatial extent output raster file. ymax numeric value describing spatial extent output raster file. path character file paths output raster files (see Output file format section details).","code":""},{"path":"https://prioritizr.github.io/aoh/reference/create_spp_frc_data.html","id":"data-processing","dir":"Reference","previous_headings":"","what":"Data processing","title":"Create fractional coverage data — create_spp_frc_data","text":"fractional coverage data generated using following procedures. data generated, stored files disk (see Output file format section details). Global elevation habitat classification imported, (needed,, see get_global_elevation_data() get_lumb_cgls_habitat_data(), details)., data available cache directory, (.e. argument cache_dir), automatically downloaded, cache directory., Note elevation habitat data supplied, (.e. arguments elevation_data habitat_data), , user-supplied datasets used generate Area Habitat data., , Area Habitat data generated seasonal, distribution species. given species' distribution,, data generated , () cropping habitat classification elevation data spatial, extent species' seasonal distribution;, (ii) converting habitat classification data binary layer, denoting suitable habitat species' distribution, (using habitat affiliation data species' distribution);, (iii) creating mask based species' elevational limits, elevation data, using mask set values, binary layer zero outside species', limits;, (iv) creating mask rasterizing species' seasonal, distribution, using mask set values binary, layer missing (NA) values outside species', distribution;, (v) saving binary layer Area Habitat data, species' distribution., Note species' distributions already Area Habitat data, available output directory skipped, (unless argument force TRUE). terra::rast() object created define standardized grid calculating fractional coverage data. Specifically, grid created aggregating habitat data (per argument habitat_data) specified resolution (per argument res). Area Habitat data used compute fractional coverage data. Specifically, seasonal distribution species, Area Habitat data overlaid standardized grid calculate proportion grid cell contains suitable habitat. Post-processing routines used prepare results. routines involve updating collated species data include file names spatial metadata fractional coverage data.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/create_spp_frc_data.html","id":"output-file-format","dir":"Reference","previous_headings":"","what":"Output file format","title":"Create fractional coverage data — create_spp_frc_data","text":"Fractional coverage data stored separate raster (GeoTIFF) file seasonal distribution species. raster file assigned file name based prefix combination species' taxon identifier (per id_no/SISID column x) identifier seasonal distribution (per seasonality x) (.e., file names named according FRC_{$id_no}_${seasonality}.tif). given raster file, grid cell values denote proportion suitable habitat located within cell. example, value 0 corresponds 0% fractional coverage, 0.5 50% fractional coverage, 1 100% fractional coverage. Missing (NA) values correspond grid cells located entirely outside species' distribution.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/create_spp_frc_data.html","id":"engines","dir":"Reference","previous_headings":"","what":"Engines","title":"Create fractional coverage data — create_spp_frc_data","text":"function can use different software engines data processing (specified via argument engine). Although engine produces results, engines computationally efficient others. default \"terra\" engine uses terra package processing. Although engine easy install fast small datasets, scale well larger datasets. generally recommended use \"gdal\" engine perform data processing Geospatial Data Abstraction Library (GDAL) can used data processing. \"grass\" engine can also used perform data processing Geographic Resources Analysis Support System (GRASS). Note \"grass\" engine requires GDAL GRASS software installed. instructions installing dependencies engines, please see README file.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/create_spp_frc_data.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Create fractional coverage data — create_spp_frc_data","text":"Brooks TM, Pimm SL, Akçakaya HR, Buchanan GM, Butchart SHM, Foden W, Hilton-Taylor C, Hoffmann M, Jenkins CN, Joppa L, Li BV, Menon V, Ocampo-Peñuela N, Rondinini C (2019) Measuring terrestrial Area Habitat (AOH) utility IUCN Red List. Trends Ecology & Evolution, 34, 977–986. doi:10.1016/j.tree.2019.06.009 Jung M, Dahal PR, Butchart SHM, Donald PF, De Lamo X, Lesiv M, Kapos V, Rondinini C, Visconti P (2020a) global map terrestrial habitat types. Scientific Data, 7, 1–8. doi:10.1038/s41597-020-00599-8 Jung M, Dahal PR, Butchart SHM, Donald PF, De Lamo X, Lesiv M, Kapos V, Rondinini C, Visconti P (2020b) global map terrestrial habitat types (insert version) [Data set]. Zenodo. doi:10.5281/zenodo.4058819 Lumbierres M, Dahal PR, Di Marco M, Butchart SHM, Donald PF, Rondinini C (2021) Translating habitat class land cover map area habitat terrestrial vertebrates. Conservation Biology, 36, e13851. doi:10.1111/cobi.13851 Lumbierres M, Dahal PR, Soria CD, Di Marco M, Butchart SHM, Donald PF, Rondinini C (2022) Area Habitat maps world’s terrestrial birds mammals. Scientific Data, 9, 749. Robinson N, Regetz J, Guralnick RP (2014) EarthEnv-DEM90: nearly- global, void-free, multi-scale smoothed, 90m digital elevation model fused ASTER SRTM data. ISPRS Journal Photogrammetry Remote Sensing, 87, 57–67. doi:10.1016/j.isprsjprs.2013.11.002","code":""},{"path":[]},{"path":"https://prioritizr.github.io/aoh/reference/create_spp_frc_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create fractional coverage data — create_spp_frc_data","text":"","code":"# \\dontrun{ # find file path for example range data following IUCN Red List data format ## N.B., the range data were not obtained from the IUCN Red List, ## and were instead based on data from GBIF (https://www.gbif.org/) path <- system.file(\"extdata\", \"EXAMPLE_SPECIES.zip\", package = \"aoh\") # import data spp_range_data <- read_spp_range_data(path) # specify settings for data processing output_dir <- tempdir() # folder to save coverage data cache_dir <- rappdirs::user_data_dir(\"aoh\") # persistent storage location n_threads <- parallel::detectCores() - 1 # speed up analysis # create cache directory if needed if (!file.exists(cache_dir)) { dir.create(cache_dir, showWarnings = FALSE, recursive = TRUE) } # create species' information data spp_info_data <- create_spp_info_data( x = spp_range_data, cache_dir = cache_dir ) #> ℹ initializing #> ✔ initializing [338ms] #> #> ℹ cleaning species range data #> ✔ cleaning species range data [3.1s] #> #> ℹ importing species summary data #> ✔ importing species summary data [331ms] #> #> ℹ importing species habitat data #> ✔ importing species habitat data [327ms] #> #> ℹ collating species data #> ✔ collating species data [221ms] #> #> ℹ post-processing results #> ✔ post-processing results [10ms] #> #> ✔ finished # create fractional coverage data spp_frc_data <- create_spp_frc_data( x = spp_info_data, res = 5000, output_dir = output_dir, n_threads = n_threads, cache_dir = cache_dir ) #> ℹ initializing #> ✔ initializing [4ms] #> #> ℹ importing global elevation data #> ✔ importing global elevation data [7.2s] #> #> ℹ importing global habitat data #> ! argument to \"crosswalk_data\" is missing the following 2 habitat classification codes: \"7.1\", \"7.2\" #> ℹ importing global habitat data #> ✔ importing global habitat data [5s] #> #> ℹ generating Area of Habitat data #> skipping 4 species distributions already processed #> ✔ generating Area of Habitat data [32ms] #> #> ℹ post-processing results #> ✔ post-processing results [32ms] #> #> ✔ finished # } if (FALSE) { # interactive() # \\dontrun{ # preview data print(spp_frc_data) # } } # \\dontrun{ # import fractional coverage data as a list of terra::rast() objects spp_frc_rasters <- lapply(spp_frc_data$path, terra::rast) # print list of rasters print(spp_frc_rasters) #> [[1]] #> class : SpatRaster #> dimensions : 53, 75, 1 (nrow, ncol, nlyr) #> resolution : 5000, 5000 (x, y) #> extent : -472531, -97531, 4362077, 4627077 (xmin, xmax, ymin, ymax) #> coord. ref. : World_Behrmann #> source : FRC_979_1.tif #> name : lyr.1 #> min value : 0.0000 #> max value : 0.9968 #> #> [[2]] #> class : SpatRaster #> dimensions : 46, 115, 1 (nrow, ncol, nlyr) #> resolution : 5000, 5000 (x, y) #> extent : -252531, 322469, 4837077, 5067077 (xmin, xmax, ymin, ymax) #> coord. ref. : World_Behrmann #> source : FRC_59448_1.tif #> name : lyr.1 #> min value : 0 #> max value : 1 #> #> [[3]] #> class : SpatRaster #> dimensions : 104, 108, 1 (nrow, ncol, nlyr) #> resolution : 5000, 5000 (x, y) #> extent : -917531, -377531, 4547077, 5067077 (xmin, xmax, ymin, ymax) #> coord. ref. : World_Behrmann #> source : FRC_4657_1.tif #> name : lyr.1 #> min value : 0.0000 #> max value : 0.9932 #> #> [[4]] #> class : SpatRaster #> dimensions : 100, 151, 1 (nrow, ncol, nlyr) #> resolution : 5000, 5000 (x, y) #> extent : -907531, -152531, 4567077, 5067077 (xmin, xmax, ymin, ymax) #> coord. ref. : World_Behrmann #> source : FRC_58622_1.tif #> name : lyr.1 #> min value : 0 #> max value : 1 #> # plot the data to visualize the range maps and fractional coverage data plot_spp_frc_data(spp_frc_data) # }"},{"path":"https://prioritizr.github.io/aoh/reference/create_spp_info_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Create species' information data — create_spp_info_data","title":"Create species' information data — create_spp_info_data","text":"Create data collate information needed generate Area Habitat data (Brooks et al. 2019). Briefly, function cleans collates data describing species' geographic ranges, habitat preferences, elevational limits. Please note procedures designed terrestrial species, apply marine freshwater species.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/create_spp_info_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create species' information data — create_spp_info_data","text":"","code":"create_spp_info_data( x, spp_summary_data = NULL, spp_habitat_data = NULL, cache_dir = tempdir(), iucn_version = \"latest\", key = NULL, force = FALSE, keep_iucn_rl_presence = c(1, 2), keep_iucn_rl_origin = c(1, 2, 6), keep_iucn_rl_seasonal = c(1, 2, 3, 4), omit_habitat_codes = iucn_habitat_codes_marine(), adjust_elevational_limits = TRUE, adjust_habitat_codes = TRUE, crs = sf::st_crs(\"ESRI:54017\"), geometry_precision = 1e+05, verbose = TRUE )"},{"path":"https://prioritizr.github.io/aoh/reference/create_spp_info_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create species' information data — create_spp_info_data","text":"x sf::sf() Spatial data delineating species geographic ranges obtained IUCN Red List. See details. spp_summary_data tibble::tibble() Table containing summary information species (argument x). Specifically, argument contain following columns: \"id_no\", \"elevation_lower\", \"elevation_upper\" columns. , \"id_no\" corresponds species' taxon identifier (also present x), \"elevation_lower\" \"elevation_upper\" columns indicate lowest highest elevations contain habitat species. Defaults NULL data automatically obtained latest version IUCN Red List. spp_habitat_data tibble::tibble() Table containing habitat preference information species (argument x). Specifically, argument contain following columns: \"id_no\", \"code\", \"suitability\", \"season\" columns. , \"id_no\" corresponds species' taxon identifier (also present x), \"code\" indicates habitat classification code suitable species (.e., based layer names argument habitat_data), \"suitability\" indicates level suitability habitat class given species (e.g., using values \"Suitable\" \"Marginal\"), \"season\" indicates habitat class suitable particular seasonal distribution (e.g., \"Breeding\"). Defaults NULL data automatically obtained latest version IUCN Red List. cache_dir character Folder path downloading caching data. default, temporary directory used (.e., tempdir()). avoid downloading data multiple times, strongly recommended specify persistent storage location (see Examples ). iucn_version character Version IUCN Red List dataset used. See documentation version parameter get_spp_summary_data() function details. Defaults \"latest\" recent version dataset used. key character Token querying IUCN Red List API. Defaults NULL token accessed \"IUCN_REDLIST_KEY\" environmental variable (can specified .Renviron file). force logical data downloaded even data already available? Defaults FALSE. keep_iucn_rl_presence integer IUCN Red List presence codes retain (see IUCN SSC Red List Technical Working Group 2021 details). Species' ranges associated codes excluded data cleaning procedures. Defaults numeric vector containing 1 2 (corresponding extant probably extant). keep_iucn_rl_origin integer IUCN Red List origin codes retain (see IUCN SSC Red List Technical Working Group 2021 details). Species' ranges associated codes excluded data cleaning procedures. Defaults numeric vector containing 1, 2, 6. (corresponding native, reintroduced, assisted colonization). keep_iucn_rl_seasonal integer IUCN Red List seasonal codes retain (see IUCN SSC Red List Technical Working Group 2021 details). Species' ranges associated codes excluded data cleaning procedures. Defaults numeric vector containing 1, 2, 3, 4. (corresponding resident, breeding season, non-breeding season, passage distributions). omit_habitat_codes character Habitat classification codes omit resulting Area Habitat data. Please see IUCN Red List Habitat Classification Scheme full range habitat classification codes. example, aim identify natural places contain suitable conditions, areas classified anthropogenically modified (iucn_habitat_codes_artificial()), introduced vegetation (iucn_habitat_codes_introduced(), unknown habitat (iucn_habitat_codes_misc()) excluded. Defaults iucn_habitat_codes_marine(), marine habitats excluded. adjust_elevational_limits logical elevation limits adjusted correct errors? Defaults TRUE automatically fix errors (see Data processing section details). adjust_habitat_codes logical habitat codes adjusted assigned species' distributions following guidelines Key Biodiversity areas? Defaults TRUE (see Data processing section details). Otherwise, FALSE, habitat codes assigned species' distributions following exact matches (e.g., codes described resident distribution assigned resident distribution). crs st_crs() object containing coordinate reference system reprojecting species' range data. coordinate reference system elevation habitat classification data subsequently used generate Area Habitat data (using create_spp_aoh_data() create_spp_frc_data() functions). Defaults World Behrmann coordinate reference system (ESRI:54017), appropriate elevation habitat datasets available package (e.g., using get_global_elevation_data() get_lumb_cgls_habitat_data() functions). geometry_precision numeric level precision processing spatial data (used sf::st_set_precision()). default 100000 (higher values indicate higher precision). Although level precision generally suitable fine-scale analyses, might result unnecessarily long computation times (e.g., 1500 suitable national-scale analyses). encounter geometry errors, increasing argument parameter can sometimes resolve issues. verbose logical progress displayed processing data? Defaults TRUE.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/create_spp_info_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create species' information data — create_spp_info_data","text":"sf::st_sf() object containing information needed create Area Habitat data. contains cleaned versions species' range maps columns containing species' elevational limits habitat preferences. Specifically, object contains following columns: id_no numeric species' taxon identifier IUCN Red List. binomial character species name. category character IUCN Red List threat category. migratory logical indicating species processed migratory species (.e., breeding, non-breeding, passage seasonal distribution). seasonal numeric seasonal distribution code. full_habitat_code character habitat classification codes contain suitable habitat species. given species multiple suitable habitat classes, denoted using pipe-delimited format. example, habitat classes denoted codes \"1.5\" \"1.9\" considered suitable given species, codes indicated \"1.5|1.9\". elevation_lower numeric lower elevation threshold used create species' Area Habitat data. elevation_upper numeric upper elevation threshold used create species' Area Habitat data. geometry sf::st_sfc() geometries species' distributions.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/create_spp_info_data.html","id":"species-range-data-format","dir":"Reference","previous_headings":"","what":"Species range data format","title":"Create species' information data — create_spp_info_data","text":"Species range data expected follow data format conventions IUCN Red List (see IUCN Red List documentation details). Specifically, argument x sf::st_sf() object following columns: id_no, presence, origin, seasonal. can also contain following optional columns: terrestrial (terrestial), freshwater, marine. provide brief description column: id_no numeric taxon identifier IUCN Red List. presence numeric identifier describing information presence taxon range data. origin numeric identifier describing species native location(s) described range data. seasonality numeric identifier describing species occupied location(s) describe range data throughout whole year, certain seasons. terrestial character value indicating range data pertain terrestrial environments (\"true\" \"false\" values.) freshwater character value indicating range data pertain freshwater environments (\"true\" \"false\" values.) marine character value indicating range data pertain marine environments (\"true\" \"false\" values.)","code":""},{"path":"https://prioritizr.github.io/aoh/reference/create_spp_info_data.html","id":"data-processing","dir":"Reference","previous_headings":"","what":"Data processing","title":"Create species' information data — create_spp_info_data","text":"species' information data produced using following procedures. Species range data cleaned. default, range data cleaned following guidelines identification Key Biodiversity Areas (KBA Standards Appeals Committee IUCN SSC/WCPA 2022). Specifically, default cleaning procedures involves excluding places () species' presence extant probably extant (.e. filtering based presence == 1 presence == 2); (ii) species' origin native, reintroduced, result assisted colonization (.e. filtering based origin == 1, origin == 2, origin == 6); (iii) available information species' seasonal distribution uncertain (.e. filtering based seasonal != 5); (iv) species' distribution terrestrial (.e. filtering based terrestrial == \"true\"). Additionally, species' range data spatially dissolved seasonal distribution taxon represented separate geometry. Finally, geoprocessing routines used detect repair invalid geometries. Species summary habitat preferences data imported (needed, see get_spp_summary_data() get_spp_habitat_data() details). data available cache directory (.e. argument cache_dir), automatically downloaded cache directory. specified (per adjust_elevational_limits = TRUE), elevational limit values species summary data adjusted correct errors. adjustments applied based following procedures: () species lacks lower upper elevational limits, limits -500 m 9,000 m assumed (respectively); (ii) since IUCN Red List assigns lower limit values 0 m many species parts distribution areas sea level, lower elevational limit values equal 0 m replaced -500 m; (iii) lower elevational limit values -500 m replaced -500 m; (iv) upper elevational limit values 9000 replaced 9000 m; (v) lower elevational limit greater upper elevational limit, limits -500 m 9000 m assumed (respectively); (vi) lower elevational limit within 50 m upper elevational limit, limits adjusted 50 m difference . Otherwise, FALSE, elevation limit values altered. species classified either migratory non-migratory, based presence breeding, non-breeding, passage distributions species range data (.e., x`). example, species resident distribution species range data, classified non-migratory species. species resident breeding distribution species range data, classified migratory species. specified (per adjust_habitat_codes = TRUE), habitat codes species habitat preferences data adjusted based guidelines identification Key Biodiversity Areas (KBA Standards Appeals Committee IUCN SSC/WCPA 2022). adjustments based following procedures: () resident distributions non-migratory species assigned habitat codes described species habitat preference data species' resident, breeding, non-breeding, passage, seasonal occurrence uncertain, missing (NA) seasonal distributions; (ii) resident distributions migratory species assigned habitat codes described species habitat preference data species' resident, breeding, non-breeding, seasonal occurrence uncertain, missing (NA) seasonal distributions; (ii) breeding distributions assigned habitat codes described species' resident, breeding, seasonal occurrence uncertain missing (NA) seasonal distributions; (iii) non-breeding distributions assigned habitat codes described species' resident, non-breeding, seasonal occurrence uncertain, missing (NA) seasonal distributions; (iv) passage distributions assigned habitat codes described species' resident, passage, seasonal occurrence uncertain, missing (NA) seasonal distributions. adjustments applied (per adjust_habitat_codes = FALSE), habitat codes assigned species' distributions based exact matches (e.g., codes described resident distribution assigned resident distribution). Species information collated single dataset containing geographic ranges, migratory status, habitat preferences, elevational limits. Specifically, taxon identifiers (per id_no/SISID columns) used merge datasets together. Post-processing routines used prepare output data.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/create_spp_info_data.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Create species' information data — create_spp_info_data","text":"Brooks TM, Pimm SL, Akçakaya HR, Buchanan GM, Butchart SHM, Foden W, Hilton-Taylor C, Hoffmann M, Jenkins CN, Joppa L, Li BV, Menon V, Ocampo-Peñuela N, Rondinini C (2019) Measuring terrestrial Area Habitat (AOH) utility IUCN Red List. Trends Ecology & Evolution, 34, 977–986. doi:10.1016/j.tree.2019.06.009 KBA Standards Appeals Committee IUCN SSC/WCPA (2022). Guidelines using Global Standard Identification Key Biodiversity Areas. Version 1.2. Gland, Switzerland: IUCN.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/create_spp_info_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create species' information data — create_spp_info_data","text":"","code":"# \\dontrun{ # find file path for example range data following IUCN Red List data format ## N.B., the range data were not obtained from the IUCN Red List, ## and were instead based on data from GBIF (https://www.gbif.org/) path <- system.file(\"extdata\", \"EXAMPLE_SPECIES.zip\", package = \"aoh\") # import data spp_range_data <- read_spp_range_data(path) # specify persistent storage location for data processing cache_dir <- rappdirs::user_data_dir(\"aoh\") # create cache directory if needed if (!file.exists(cache_dir)) { dir.create(cache_dir, showWarnings = FALSE, recursive = TRUE) } # create species information data spp_info_data <- create_spp_info_data( x = spp_range_data, cache_dir = cache_dir ) #> ℹ initializing #> ✔ initializing [351ms] #> #> ℹ cleaning species range data #> ✔ cleaning species range data [3.3s] #> #> ℹ importing species summary data #> ✔ importing species summary data [338ms] #> #> ℹ importing species habitat data #> ✔ importing species habitat data [329ms] #> #> ℹ collating species data #> ✔ collating species data [237ms] #> #> ℹ post-processing results #> ✔ post-processing results [12ms] #> #> ✔ finished # } if (FALSE) { # interactive() # \\dontrun{ # preview data print(spp_info_data) # } }"},{"path":"https://prioritizr.github.io/aoh/reference/crosswalk_jung_lvl1_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Crosswalk data for Jung et al. (2020) (level 1 classification) — crosswalk_jung_lvl1_data","title":"Crosswalk data for Jung et al. (2020) (level 1 classification) — crosswalk_jung_lvl1_data","text":"International Union Conservation Nature (IUCN) Red List Threatened Species provides habitat classification scheme different habitat types. map spatial location habitat classes, Jung et al. (2020a) developed global raster dataset combining range different land use land cover data (Jung et al. 2020b). created two habitat classification schemes – termed level 1 level 2 classification schemes – describe coarse-scale fine-scale differences habitat classes. dataset provides crosswalk table associate values level 1 raster dataset IUCN habitat classes.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/crosswalk_jung_lvl1_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Crosswalk data for Jung et al. (2020) (level 1 classification) — crosswalk_jung_lvl1_data","text":"","code":"data(crosswalk_jung_lvl1_data)"},{"path":"https://prioritizr.github.io/aoh/reference/crosswalk_jung_lvl1_data.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Crosswalk data for Jung et al. (2020) (level 1 classification) — crosswalk_jung_lvl1_data","text":"data frame (tibble::tibble()) object 126 rows 2 columns. row corresponds different IUCN habitat class. following columns: code character code given IUCN habitat class. value numeric value assigned grid cells raster data contain IUCN habitat class (see get_jung_lvl1_habitat_data()).","code":""},{"path":"https://prioritizr.github.io/aoh/reference/crosswalk_jung_lvl1_data.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Crosswalk data for Jung et al. (2020) (level 1 classification) — crosswalk_jung_lvl1_data","text":"data obtained Jung et al. (2020b).","code":""},{"path":"https://prioritizr.github.io/aoh/reference/crosswalk_jung_lvl1_data.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Crosswalk data for Jung et al. (2020) (level 1 classification) — crosswalk_jung_lvl1_data","text":"Jung M, Dahal PR, Butchart SHM, Donald PF, De Lamo X, Lesiv M, Kapos V, Rondinini C, Visconti P (2020a) global map terrestrial habitat types. Scientific Data, 7, 1–8. doi:10.1038/s41597-020-00599-8 Jung M, Dahal PR, Butchart SHM, Donald PF, De Lamo X, Lesiv M, Kapos V, Rondinini C, Visconti P (2020b) global map terrestrial habitat types (insert version) [Data set]. Zenodo. doi:10.5281/zenodo.4058819","code":""},{"path":[]},{"path":"https://prioritizr.github.io/aoh/reference/crosswalk_jung_lvl1_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Crosswalk data for Jung et al. (2020) (level 1 classification) — crosswalk_jung_lvl1_data","text":"","code":"# load data data(crosswalk_jung_lvl1_data) # print data print(crosswalk_jung_lvl1_data) #> # A tibble: 126 × 2 #> code value #> #> 1 1 100 #> 2 1.1 100 #> 3 1.2 100 #> 4 1.3 100 #> 5 1.4 100 #> 6 1.5 100 #> 7 1.6 100 #> 8 1.7 100 #> 9 1.8 100 #> 10 1.9 100 #> # ℹ 116 more rows"},{"path":"https://prioritizr.github.io/aoh/reference/crosswalk_jung_lvl2_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Crosswalk data for Jung et al. (2020) (level 2 classification) — crosswalk_jung_lvl2_data","title":"Crosswalk data for Jung et al. (2020) (level 2 classification) — crosswalk_jung_lvl2_data","text":"International Union Conservation Nature (IUCN) Red List Threatened Species provides habitat classification scheme different habitat types. map spatial location habitat classes, Jung et al. (2020a) developed global raster dataset combining range different land use land cover data (Jung et al. 2020b). created two habitat classification schemes – termed level 1 level 2 classification schemes – describe coarse-scale fine-scale differences habitat classes. dataset provides crosswalk table associate values level 2 raster dataset IUCN habitat classes.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/crosswalk_jung_lvl2_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Crosswalk data for Jung et al. (2020) (level 2 classification) — crosswalk_jung_lvl2_data","text":"","code":"data(crosswalk_jung_lvl2_data)"},{"path":"https://prioritizr.github.io/aoh/reference/crosswalk_jung_lvl2_data.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Crosswalk data for Jung et al. (2020) (level 2 classification) — crosswalk_jung_lvl2_data","text":"data frame (tibble::tibble()) object 126 rows 2 columns. row corresponds different IUCN habitat class. following columns: code character code given IUCN habitat class. value numeric value assigned grid cells raster data contain IUCN habitat class (see get_jung_lvl2_habitat_data()).","code":""},{"path":"https://prioritizr.github.io/aoh/reference/crosswalk_jung_lvl2_data.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Crosswalk data for Jung et al. (2020) (level 2 classification) — crosswalk_jung_lvl2_data","text":"data obtained Jung et al. (2020b).","code":""},{"path":"https://prioritizr.github.io/aoh/reference/crosswalk_jung_lvl2_data.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Crosswalk data for Jung et al. (2020) (level 2 classification) — crosswalk_jung_lvl2_data","text":"Jung M, Dahal PR, Butchart SHM, Donald PF, De Lamo X, Lesiv M, Kapos V, Rondinini C, Visconti P (2020a) global map terrestrial habitat types. Scientific Data, 7, 1–8. doi:10.1038/s41597-020-00599-8 Jung M, Dahal PR, Butchart SHM, Donald PF, De Lamo X, Lesiv M, Kapos V, Rondinini C, Visconti P (2020b) global map terrestrial habitat types (insert version) [Data set]. Zenodo. doi:10.5281/zenodo.4058819","code":""},{"path":[]},{"path":"https://prioritizr.github.io/aoh/reference/crosswalk_jung_lvl2_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Crosswalk data for Jung et al. (2020) (level 2 classification) — crosswalk_jung_lvl2_data","text":"","code":"# load data data(crosswalk_jung_lvl2_data) # print data print(crosswalk_jung_lvl2_data) #> # A tibble: 126 × 2 #> code value #> #> 1 1 100 #> 2 1.1 101 #> 3 1.2 102 #> 4 1.3 103 #> 5 1.4 104 #> 6 1.5 105 #> 7 1.6 106 #> 8 1.7 107 #> 9 1.8 108 #> 10 1.9 109 #> # ℹ 116 more rows"},{"path":"https://prioritizr.github.io/aoh/reference/crosswalk_jung_plvl1_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Crosswalk data for Jung (2020) potential habitat classification (level 1) — crosswalk_jung_plvl1_data","title":"Crosswalk data for Jung (2020) potential habitat classification (level 1) — crosswalk_jung_plvl1_data","text":"International Union Conservation Nature (IUCN) Red List Threatened Species provides habitat classification scheme different habitat types. map spatial location restoration actions might produce habitat classes, Jung (2020) developed global raster dataset based potential vegetation data.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/crosswalk_jung_plvl1_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Crosswalk data for Jung (2020) potential habitat classification (level 1) — crosswalk_jung_plvl1_data","text":"","code":"data(crosswalk_jung_plvl1_data)"},{"path":"https://prioritizr.github.io/aoh/reference/crosswalk_jung_plvl1_data.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Crosswalk data for Jung (2020) potential habitat classification (level 1) — crosswalk_jung_plvl1_data","text":"data frame (tibble::tibble()) object 126 rows 2 columns. row corresponds different IUCN habitat class. following columns: code character code given IUCN habitat class. value numeric value assigned grid cells raster data contain IUCN habitat class (see get_jung_plvl1_habitat_data()).","code":""},{"path":"https://prioritizr.github.io/aoh/reference/crosswalk_jung_plvl1_data.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Crosswalk data for Jung (2020) potential habitat classification (level 1) — crosswalk_jung_plvl1_data","text":"data obtained Jung (2020).","code":""},{"path":"https://prioritizr.github.io/aoh/reference/crosswalk_jung_plvl1_data.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Crosswalk data for Jung (2020) potential habitat classification (level 1) — crosswalk_jung_plvl1_data","text":"Jung M (2020) layer global potential habitats (insert version) [Data set]. Zenodo. doi:10.5281/zenodo.4038749","code":""},{"path":[]},{"path":"https://prioritizr.github.io/aoh/reference/crosswalk_jung_plvl1_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Crosswalk data for Jung (2020) potential habitat classification (level 1) — crosswalk_jung_plvl1_data","text":"","code":"# load data data(crosswalk_jung_plvl1_data) # print data print(crosswalk_jung_plvl1_data) #> # A tibble: 126 × 2 #> code value #> #> 1 1 100 #> 2 1.1 100 #> 3 1.2 100 #> 4 1.3 100 #> 5 1.4 100 #> 6 1.5 100 #> 7 1.6 100 #> 8 1.7 100 #> 9 1.8 100 #> 10 1.9 100 #> # ℹ 116 more rows"},{"path":"https://prioritizr.github.io/aoh/reference/crosswalk_lumb_cgls_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Crosswalk data for CGLS based on Lumbierres et al. (2021) — crosswalk_lumb_cgls_data","title":"Crosswalk data for CGLS based on Lumbierres et al. (2021) — crosswalk_lumb_cgls_data","text":"International Union Conservation Nature (IUCN) Red List Threatened Species provides habitat classification scheme different habitat types. map spatial location habitat classes, Lumbierres et al. (2021) developed global habitat classification dataset using Copernicus Global Land Service Land Cover (CGLS-LC100) dataset (Buchhorn et al., 2019; Buchhorn et al., 20200). dataset provides crosswalk table associate values raster dataset IUCN habitat classes.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/crosswalk_lumb_cgls_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Crosswalk data for CGLS based on Lumbierres et al. (2021) — crosswalk_lumb_cgls_data","text":"","code":"data(crosswalk_lumb_cgls_data)"},{"path":"https://prioritizr.github.io/aoh/reference/crosswalk_lumb_cgls_data.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Crosswalk data for CGLS based on Lumbierres et al. (2021) — crosswalk_lumb_cgls_data","text":"data frame (tibble::tibble()) object 159 rows 2 columns. row corresponds different IUCN habitat class. following columns: code character code given IUCN habitat class. value numeric value assigned grid cells raster data contain IUCN habitat class (see get_lumb_cgls_habitat_data()).","code":""},{"path":"https://prioritizr.github.io/aoh/reference/crosswalk_lumb_cgls_data.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Crosswalk data for CGLS based on Lumbierres et al. (2021) — crosswalk_lumb_cgls_data","text":"data derived Lumbierres et al. (2021).","code":""},{"path":"https://prioritizr.github.io/aoh/reference/crosswalk_lumb_cgls_data.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Crosswalk data for CGLS based on Lumbierres et al. (2021) — crosswalk_lumb_cgls_data","text":"Buchhorn M, Smets B, Bertels L, Lesiv M, Tsendbazar N-E, Herold M, Fritz SA (2019) Copernicus Global Land Service: Land Cover 100m: Epoch 2015: Globe. Dataset global component Copernicus Land Monitoring Service. doi:10.5281/zenodo.3243508 Buchhorn M, Smets B, Bertels L, de Roo B, Lesiv M, Tsendbazar N-E, Linlin L, Tarko (2020) Copernicus Global Land Service: Land Cover 100m: Version 3 Globe 2015–2019: Product User Manual. Geneve: Zenodo. doi:10.5281/zenodo.3606295 Lumbierres M, Dahal PR, Di Marco M, Butchart SHM, Donald PF, Rondinini C (2021) Translating habitat class land cover map area habitat terrestrial vertebrates. Conservation Biology, 36, e13851. doi:10.1111/cobi.13851","code":""},{"path":[]},{"path":"https://prioritizr.github.io/aoh/reference/crosswalk_lumb_cgls_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Crosswalk data for CGLS based on Lumbierres et al. (2021) — crosswalk_lumb_cgls_data","text":"","code":"# load data data(crosswalk_lumb_cgls_data) # print data print(crosswalk_lumb_cgls_data) #> # A tibble: 159 × 2 #> code value #> #> 1 1 100 #> 2 1.1 100 #> 3 1.2 100 #> 4 1.3 100 #> 5 1.4 100 #> 6 1.5 100 #> 7 1.6 100 #> 8 1.7 100 #> 9 1.8 100 #> 10 1.9 100 #> # ℹ 149 more rows"},{"path":"https://prioritizr.github.io/aoh/reference/get_global_elevation_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Get global elevation data — get_global_elevation_data","title":"Get global elevation data — get_global_elevation_data","text":"Import elevation data derived Robinson et al. (2014). data available locally, downloaded Zenodo repository (doi:10.5281/zenodo.5719984 ).","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_global_elevation_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get global elevation data — get_global_elevation_data","text":"","code":"get_global_elevation_data( dir = tempdir(), version = \"latest\", force = FALSE, verbose = TRUE )"},{"path":"https://prioritizr.github.io/aoh/reference/get_global_elevation_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get global elevation data — get_global_elevation_data","text":"dir character Folder path downloading caching data. default, data downloaded temporary directory (.e., tempdir()). avoid downloading data multiple times, strongly recommended specify persistent storage location (see Examples ). version character Value indicating specific version dataset downloaded. version indicated using Digital Object Identifier specific version required (e.g. \"10.5281/zenodo.3673586\"). Defaults \"latest\" latest release dataset available habitat data used. force logical data downloaded even data already available? Defaults FALSE. verbose logical progress displayed downloading data? Defaults TRUE.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_global_elevation_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get global elevation data — get_global_elevation_data","text":"terra::rast() object containing elevation data (100 m resolution). Pixel values indicate elevation (m).","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_global_elevation_data.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get global elevation data — get_global_elevation_data","text":"data produced () obtaining raw elevation data EarthEnv project, (ii) collating data single raster (GeoTIFF) file, (iii) reprojecting data World Behrmannn coordinate reference systems (ESRI:54017). details, see online repository containing code used process data.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_global_elevation_data.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Get global elevation data — get_global_elevation_data","text":"Robinson N, Regetz J, Guralnick RP (2014) EarthEnv-DEM90: nearly- global, void-free, multi-scale smoothed, 90m digital elevation model fused ASTER SRTM data. ISPRS Journal Photogrammetry Remote Sensing, 87:57–67. doi:10.1016/j.isprsjprs.2013.11.002","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_global_elevation_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get global elevation data — get_global_elevation_data","text":"","code":"# \\dontrun{ # define persistent storage location download_dir <- rappdirs::user_data_dir(\"aoh\") # create download directory if needed if (!file.exists(download_dir)) { dir.create(download_dir, showWarnings = FALSE, recursive = TRUE) } # download and import elevation data elev_data <- get_global_elevation_data(download_dir) # preview data print(elev_data) #> class : SpatRaster #> dimensions : 132926, 347351, 1 (nrow, ncol, nlyr) #> resolution : 100, 100 (x, y) #> extent : -17367531, 17367569, -6005523, 7287077 (xmin, xmax, ymin, ymax) #> coord. ref. : World_Behrmann #> source : dem-100m-esri54017.tif #> name : dem-100m-esri54017 # plot data plot(elev_data) # }"},{"path":"https://prioritizr.github.io/aoh/reference/get_jung_lvl1_habitat_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Jung et al. (2020) habitat classification data (level 1) — get_jung_lvl1_habitat_data","title":"Get Jung et al. (2020) habitat classification data (level 1) — get_jung_lvl1_habitat_data","text":"Import habitat classification data (level 1) derived Jung et al. (2020a). data available locally, downloaded Zenodo repository (doi:10.5281/zenodo.6622029 ).","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_jung_lvl1_habitat_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Jung et al. (2020) habitat classification data (level 1) — get_jung_lvl1_habitat_data","text":"","code":"get_jung_lvl1_habitat_data( dir = tempdir(), version = \"latest\", force = FALSE, verbose = TRUE )"},{"path":"https://prioritizr.github.io/aoh/reference/get_jung_lvl1_habitat_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get Jung et al. (2020) habitat classification data (level 1) — get_jung_lvl1_habitat_data","text":"dir character Folder path downloading caching data. default, data downloaded temporary directory (.e., tempdir()). avoid downloading data multiple times, strongly recommended specify persistent storage location (see Examples ). version character Value indicating specific version dataset downloaded. version indicated using Digital Object Identifier specific version required (e.g. \"10.5281/zenodo.3673586\"). Defaults \"latest\" latest release dataset available habitat data used. force logical data downloaded even data already available? Defaults FALSE. verbose logical progress displayed downloading data? Defaults TRUE.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_jung_lvl1_habitat_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get Jung et al. (2020) habitat classification data (level 1) — get_jung_lvl1_habitat_data","text":"terra::rast() object containing habitat data (100 m resolution). Pixel values indicate habitat classification codes.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_jung_lvl1_habitat_data.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get Jung et al. (2020) habitat classification data (level 1) — get_jung_lvl1_habitat_data","text":"data produced obtaining level 1 habitat classification data Zenodo repository (Jung et al. 2020b), resampling data (using nearest neighbor interpolation) World Behrmannn coordinate reference systems (ESRI:54017).","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_jung_lvl1_habitat_data.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Get Jung et al. (2020) habitat classification data (level 1) — get_jung_lvl1_habitat_data","text":"Jung M, Dahal PR, Butchart SHM, Donald PF, De Lamo X, Lesiv M, Kapos V, Rondinini C, Visconti P (2020a) global map terrestrial habitat types. Scientific Data, 7, 1–8. doi:10.1038/s41597-020-00599-8 Jung M, Dahal PR, Butchart SHM, Donald PF, De Lamo X, Lesiv M, Kapos V, Rondinini C, Visconti P (2020b) global map terrestrial habitat types (insert version) [Data set]. Zenodo. doi:10.5281/zenodo.4058819","code":""},{"path":[]},{"path":"https://prioritizr.github.io/aoh/reference/get_jung_lvl1_habitat_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get Jung et al. (2020) habitat classification data (level 1) — get_jung_lvl1_habitat_data","text":"","code":"# \\dontrun{ # define persistent storage location download_dir <- rappdirs::user_data_dir(\"aoh\") # create download directory if needed if (!file.exists(download_dir)) { dir.create(download_dir, showWarnings = FALSE, recursive = TRUE) } # download and import habitat data habitat_data <- get_jung_lvl1_habitat_data(download_dir, version = \"latest\") # preview data print(habitat_data) #> class : SpatRaster #> dimensions : 132926, 347351, 1 (nrow, ncol, nlyr) #> resolution : 100, 100 (x, y) #> extent : -17367531, 17367569, -6005523, 7287077 (xmin, xmax, ymin, ymax) #> coord. ref. : World_Behrmann #> source : jung-lvl1-10-5281_zenodo-4058819.tif #> name : jung-lvl1-10-5281_zenodo-4058819 # plot data plot(habitat_data) # }"},{"path":"https://prioritizr.github.io/aoh/reference/get_jung_lvl2_habitat_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Jung et al. (2020) habitat classification data (level 2) — get_jung_lvl2_habitat_data","title":"Get Jung et al. (2020) habitat classification data (level 2) — get_jung_lvl2_habitat_data","text":"Import habitat classification data (level 2) derived Jung et al. (2020a). data available locally, downloaded Zenodo repository (doi:10.5281/zenodo.6622029 ).","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_jung_lvl2_habitat_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Jung et al. (2020) habitat classification data (level 2) — get_jung_lvl2_habitat_data","text":"","code":"get_jung_lvl2_habitat_data( dir = tempdir(), version = \"latest\", force = FALSE, verbose = TRUE )"},{"path":"https://prioritizr.github.io/aoh/reference/get_jung_lvl2_habitat_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get Jung et al. (2020) habitat classification data (level 2) — get_jung_lvl2_habitat_data","text":"dir character Folder path downloading caching data. default, data downloaded temporary directory (.e., tempdir()). avoid downloading data multiple times, strongly recommended specify persistent storage location (see Examples ). version character Value indicating specific version dataset downloaded. version indicated using Digital Object Identifier specific version required (e.g. \"10.5281/zenodo.3673586\"). Defaults \"latest\" latest release dataset available habitat data used. force logical data downloaded even data already available? Defaults FALSE. verbose logical progress displayed downloading data? Defaults TRUE.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_jung_lvl2_habitat_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get Jung et al. (2020) habitat classification data (level 2) — get_jung_lvl2_habitat_data","text":"terra::rast() object containing habitat data (100 m resolution). Pixel values indicate habitat classification codes.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_jung_lvl2_habitat_data.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get Jung et al. (2020) habitat classification data (level 2) — get_jung_lvl2_habitat_data","text":"data produced obtaining level 2 habitat classification data Zenodo repository (Jung et al. 2020b), resampling data (using nearest neighbor interpolation) World Behrmannn coordinate reference systems (ESRI:54017).","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_jung_lvl2_habitat_data.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Get Jung et al. (2020) habitat classification data (level 2) — get_jung_lvl2_habitat_data","text":"Jung M, Dahal PR, Butchart SHM, Donald PF, De Lamo X, Lesiv M, Kapos V, Rondinini C, Visconti P (2020a) global map terrestrial habitat types. Scientific Data, 7, 1–8. doi:10.1038/s41597-020-00599-8 Jung M, Dahal PR, Butchart SHM, Donald PF, De Lamo X, Lesiv M, Kapos V, Rondinini C, Visconti P (2020b) global map terrestrial habitat types (insert version) [Data set]. Zenodo. doi:10.5281/zenodo.4058819","code":""},{"path":[]},{"path":"https://prioritizr.github.io/aoh/reference/get_jung_lvl2_habitat_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get Jung et al. (2020) habitat classification data (level 2) — get_jung_lvl2_habitat_data","text":"","code":"# \\dontrun{ # define persistent storage location download_dir <- rappdirs::user_data_dir(\"aoh\") # create download directory if needed if (!file.exists(download_dir)) { dir.create(download_dir, showWarnings = FALSE, recursive = TRUE) } # download and import habitat data habitat_data <- get_jung_lvl2_habitat_data(download_dir, version = \"latest\") # preview data print(habitat_data) #> class : SpatRaster #> dimensions : 132926, 347351, 1 (nrow, ncol, nlyr) #> resolution : 100, 100 (x, y) #> extent : -17367531, 17367569, -6005523, 7287077 (xmin, xmax, ymin, ymax) #> coord. ref. : World_Behrmann #> source : jung-lvl2-10-5281_zenodo-4058819.tif #> name : jung-lvl2-10-5281_zenodo-4058819 # plot data plot(habitat_data) # }"},{"path":"https://prioritizr.github.io/aoh/reference/get_jung_plvl1_habitat_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Jung (2020) potential habitat classification data (level 1) — get_jung_plvl1_habitat_data","title":"Get Jung (2020) potential habitat classification data (level 1) — get_jung_plvl1_habitat_data","text":"Import potential habitat classification data derived Jung (2020). data available locally, downloaded Zenodo repository (doi:10.5281/zenodo.6622090 ).","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_jung_plvl1_habitat_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Jung (2020) potential habitat classification data (level 1) — get_jung_plvl1_habitat_data","text":"","code":"get_jung_plvl1_habitat_data( dir = tempdir(), version = \"latest\", force = FALSE, verbose = TRUE )"},{"path":"https://prioritizr.github.io/aoh/reference/get_jung_plvl1_habitat_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get Jung (2020) potential habitat classification data (level 1) — get_jung_plvl1_habitat_data","text":"dir character Folder path downloading caching data. default, data downloaded temporary directory (.e., tempdir()). avoid downloading data multiple times, strongly recommended specify persistent storage location (see Examples ). version character Value indicating specific version dataset downloaded. version indicated using Digital Object Identifier specific version required (e.g. \"10.5281/zenodo.3673586\"). Defaults \"latest\" latest release dataset available habitat data used. force logical data downloaded even data already available? Defaults FALSE. verbose logical progress displayed downloading data? Defaults TRUE.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_jung_plvl1_habitat_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get Jung (2020) potential habitat classification data (level 1) — get_jung_plvl1_habitat_data","text":"terra::rast() object containing potential habitat data (100 m resolution). Pixel values indicate potential habitat classification codes.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_jung_plvl1_habitat_data.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get Jung (2020) potential habitat classification data (level 1) — get_jung_plvl1_habitat_data","text":"data predict potential habitat types available given location anthropogenic activities (see Hengl et al. 2018 details). , can used identify locations restoration activities produce certain habitat types. means can, turn, used predict location suitable habitat species following restoration activities. Since data show historic distribution habitat types, used examine patterns habitat loss. data produced obtaining level 1 habitat classification data Zenodo repository (Jung 2020), resampling data (using nearest neighbor interpolation) World Behrmannn coordinate reference systems (ESRI:54017).","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_jung_plvl1_habitat_data.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Get Jung (2020) potential habitat classification data (level 1) — get_jung_plvl1_habitat_data","text":"Jung M (2020) layer global potential habitats (insert version) [Data set]. Zenodo. doi:10.5281/zenodo.4038749","code":""},{"path":[]},{"path":"https://prioritizr.github.io/aoh/reference/get_jung_plvl1_habitat_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get Jung (2020) potential habitat classification data (level 1) — get_jung_plvl1_habitat_data","text":"","code":"# \\dontrun{ # define persistent storage location download_dir <- rappdirs::user_data_dir(\"aoh\") # create download directory if needed if (!file.exists(download_dir)) { dir.create(download_dir, showWarnings = FALSE, recursive = TRUE) } # download and import potential habitat data ph_data <- get_jung_plvl1_habitat_data(download_dir, version = \"latest\") # preview data print(ph_data) #> class : SpatRaster #> dimensions : 132926, 347351, 1 (nrow, ncol, nlyr) #> resolution : 100, 100 (x, y) #> extent : -17367531, 17367569, -6005523, 7287077 (xmin, xmax, ymin, ymax) #> coord. ref. : World_Behrmann #> source : jung-plvl1-10-5281_zenodo-4038749.tif #> name : jung-plvl1-10-5281_zenodo-4038749 # plot data plot(ph_data) # }"},{"path":"https://prioritizr.github.io/aoh/reference/get_lumb_cgls_habitat_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Lumbierres et al. (2021) CGLS habitat classification data — get_lumb_cgls_habitat_data","title":"Get Lumbierres et al. (2021) CGLS habitat classification data — get_lumb_cgls_habitat_data","text":"Import habitat classification data derived Copernicus Global Land Service Land Cover (CGLS-LC100) dataset (Buchhorn et al., 2019; Buchhorn et al., 20200) following Lumbierres et al. (2021). data available locally, downloaded Zenodo repository (doi:10.5281/zenodo.6622059 ).","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_lumb_cgls_habitat_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Lumbierres et al. (2021) CGLS habitat classification data — get_lumb_cgls_habitat_data","text":"","code":"get_lumb_cgls_habitat_data( dir = tempdir(), version = \"latest\", force = FALSE, verbose = TRUE )"},{"path":"https://prioritizr.github.io/aoh/reference/get_lumb_cgls_habitat_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get Lumbierres et al. (2021) CGLS habitat classification data — get_lumb_cgls_habitat_data","text":"dir character Folder path downloading caching data. default, data downloaded temporary directory (.e., tempdir()). avoid downloading data multiple times, strongly recommended specify persistent storage location (see Examples ). version character Value indicating specific version dataset downloaded. version indicated using Digital Object Identifier specific version required (e.g. \"10.5281/zenodo.3673586\"). Defaults \"latest\" latest release dataset available habitat data used. force logical data downloaded even data already available? Defaults FALSE. verbose logical progress displayed downloading data? Defaults TRUE.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_lumb_cgls_habitat_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get Lumbierres et al. (2021) CGLS habitat classification data — get_lumb_cgls_habitat_data","text":"terra::rast() object containing habitat data (100 m resolution). Pixel values indicate habitat classification codes.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_lumb_cgls_habitat_data.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get Lumbierres et al. (2021) CGLS habitat classification data — get_lumb_cgls_habitat_data","text":"data produced obtaining level 1 habitat classification data (derived Lumbierres et al. 2021), resampling data (using nearest neighbor interpolation) World Behrmannn coordinate reference system (ESRI:54017).","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_lumb_cgls_habitat_data.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Get Lumbierres et al. (2021) CGLS habitat classification data — get_lumb_cgls_habitat_data","text":"Buchhorn M, Smets B, Bertels L, Lesiv M, Tsendbazar N-E, Herold M, Fritz SA (2019) Copernicus Global Land Service: Land Cover 100m: Epoch 2015: Globe. Dataset global component Copernicus Land Monitoring Service. doi:10.5281/zenodo.3243508 Buchhorn M, Smets B, Bertels L, de Roo B, Lesiv M, Tsendbazar N-E, Linlin L, Tarko (2020) Copernicus Global Land Service: Land Cover 100m: Version 3 Globe 2015–2019: Product User Manual. Geneve: Zenodo. doi:10.5281/zenodo.3606295 Lumbierres M, Dahal PR, Di Marco M, Butchart SHM, Donald PF, Rondinini C (2021) Translating habitat class land cover map area habitat terrestrial vertebrates. Conservation Biology, 36, e13851. doi:10.1111/cobi.13851","code":""},{"path":[]},{"path":"https://prioritizr.github.io/aoh/reference/get_lumb_cgls_habitat_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get Lumbierres et al. (2021) CGLS habitat classification data — get_lumb_cgls_habitat_data","text":"","code":"# \\dontrun{ # define persistent storage location download_dir <- rappdirs::user_data_dir(\"aoh\") # create download directory if needed if (!file.exists(download_dir)) { dir.create(download_dir, showWarnings = FALSE, recursive = TRUE) } # download and import habitat data habitat_data <- get_lumb_cgls_habitat_data(download_dir, version = \"latest\") # preview data print(habitat_data) #> class : SpatRaster #> dimensions : 132926, 347351, 1 (nrow, ncol, nlyr) #> resolution : 100, 100 (x, y) #> extent : -17367531, 17367569, -6005523, 7287077 (xmin, xmax, ymin, ymax) #> coord. ref. : World_Behrmann #> source : lumbierres-10-5281_zenodo-5146073-v2.tif #> name : habitat_CGLS # plot data plot(habitat_data) # }"},{"path":"https://prioritizr.github.io/aoh/reference/get_spp_habitat_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Get species habitat data — get_spp_habitat_data","title":"Get species habitat data — get_spp_habitat_data","text":"Import species habitat preference data obtained International Union Conservation Nature (IUCN) Red List Threatened Species. Please note token required download data IUCN Red List API (see instructions obtain token).","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_spp_habitat_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get species habitat data — get_spp_habitat_data","text":"","code":"get_spp_habitat_data( x, dir = tempdir(), version = \"latest\", key = NULL, delay = 2, force = FALSE, verbose = TRUE )"},{"path":"https://prioritizr.github.io/aoh/reference/get_spp_habitat_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get species habitat data — get_spp_habitat_data","text":"x integer Taxon identifier species International Union Conservation Nature (IUCN) Red List Threatened Species. example, taxon identifier species Loxodonta africana 181008073. dir character Folder path data downloaded. default, data downloaded temporary directory (.e., tempdir()). avoid downloading data multiple times, strongly recommended specify persistent storage location (see Examples ). data already available folder specified version, data imported re-downloaded IUCN Red List. version character Value indicating version IUCN Red List obtaining data (e.g., \"2021-2\"). Although possible query past versions IUCN Red List, functionality useful accessing data previously downloaded IUCN Red List. Defaults \"latest\" data downloaded recent version IUCN Red List. key character Token querying IUCN Red List API. Defaults NULL token accessed \"IUCN_REDLIST_KEY\" environmental variable (can specified .Renviron file). delay integer Number seconds wait subsequent calls IUCN Red List API. Defaults 2 seconds (recommended rredlist package; https://docs.ropensci.org/rredlist/articles/rredlist.html). force logical data downloaded even data already available? Defaults FALSE. verbose logical progress displayed downloading data? Defaults TRUE.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_spp_habitat_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get species habitat data — get_spp_habitat_data","text":"table (tibble::tibble()) object.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_spp_habitat_data.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get species habitat data — get_spp_habitat_data","text":"Data downloaded IUCN Red List using rredlist::rl_habitats(). function essentially wrapper designed help download data multiple species provide caching previously downloaded data.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_spp_habitat_data.html","id":"accessing-the-iucn-red-list-api","dir":"Reference","previous_headings":"","what":"Accessing the IUCN Red List API","title":"Get species habitat data — get_spp_habitat_data","text":"need obtain token IUCN Red List API (one already). achieve , please visit IUCN API website (https://apiv3.iucnredlist.org/), click \"Generate token\" link top web page, fill form apply token. receive token shortly completing form (immediately). receiving token, please open .Renviron file computer (e.g., using usethis::edit_r_environ()). Next, please add following text file (replacing string token) save file: Please restart R session. now able access IUCN Red List API. verify , please try running following R code – assuming everything works correctly – see TRUE output: instructions work, please consult documentation rredlist package details.","code":"IUCN_REDLIST_KEY=\"your_actual_token_not_this_string\" # verify access to IUCN Red List API is_iucn_rl_available()"},{"path":"https://prioritizr.github.io/aoh/reference/get_spp_habitat_data.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Get species habitat data — get_spp_habitat_data","text":"Please use following citation data obtained IUCN Red List: IUCN (insert year). IUCN Red List Threatened Species. Version (insert version). Available . obtain version number latest version, use rredlist::rl_version().","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_spp_habitat_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get species habitat data — get_spp_habitat_data","text":"","code":"# \\dontrun{ # define species to download data for based on taxon identifiers spp_ids <- c(18, 22694927) # define persistent storage location download_dir <- rappdirs::user_data_dir(\"aoh\") # create download directory if needed if (!file.exists(download_dir)) { dir.create(download_dir, showWarnings = FALSE, recursive = TRUE) } # download and import habitat preference data result <- get_spp_habitat_data(spp_ids, download_dir) # } if (FALSE) { # interactive() # \\dontrun{ # preview data print(result) # } }"},{"path":"https://prioritizr.github.io/aoh/reference/get_spp_summary_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Get species summary data — get_spp_summary_data","title":"Get species summary data — get_spp_summary_data","text":"Import species summary data obtained International Union Conservation Nature (IUCN) Red List Threatened Species. Please note token required download data IUCN Red List API (see instructions obtain token).","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_spp_summary_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get species summary data — get_spp_summary_data","text":"","code":"get_spp_summary_data( x, dir = tempdir(), version = \"latest\", key = NULL, delay = 2, force = FALSE, verbose = TRUE )"},{"path":"https://prioritizr.github.io/aoh/reference/get_spp_summary_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get species summary data — get_spp_summary_data","text":"x integer Taxon identifier species International Union Conservation Nature (IUCN) Red List Threatened Species. example, taxon identifier species Loxodonta africana 181008073. dir character Folder path data downloaded. default, data downloaded temporary directory (.e., tempdir()). avoid downloading data multiple times, strongly recommended specify persistent storage location (see Examples ). data already available folder specified version, data imported re-downloaded IUCN Red List. version character Value indicating version IUCN Red List obtaining data (e.g., \"2021-2\"). Although possible query past versions IUCN Red List, functionality useful accessing data previously downloaded IUCN Red List. Defaults \"latest\" data downloaded recent version IUCN Red List. key character Token querying IUCN Red List API. Defaults NULL token accessed \"IUCN_REDLIST_KEY\" environmental variable (can specified .Renviron file). delay integer Number seconds wait subsequent calls IUCN Red List API. Defaults 2 seconds (recommended rredlist package; https://docs.ropensci.org/rredlist/articles/rredlist.html). force logical data downloaded even data already available? Defaults FALSE. verbose logical progress displayed downloading data? Defaults TRUE.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_spp_summary_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get species summary data — get_spp_summary_data","text":"table (tibble::tibble()) object.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_spp_summary_data.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get species summary data — get_spp_summary_data","text":"Data downloaded IUCN Red List using rredlist::rl_search(). function essentially wrapper designed help download data multiple species provide caching previously downloaded data.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_spp_summary_data.html","id":"accessing-the-iucn-red-list-api","dir":"Reference","previous_headings":"","what":"Accessing the IUCN Red List API","title":"Get species summary data — get_spp_summary_data","text":"need obtain token IUCN Red List API (one already). achieve , please visit IUCN API website (https://apiv3.iucnredlist.org/), click \"Generate token\" link top web page, fill form apply token. receive token shortly completing form (immediately). receiving token, please open .Renviron file computer (e.g., using usethis::edit_r_environ()). Next, please add following text file (replacing string token) save file: Please restart R session. now able access IUCN Red List API. verify , please try running following R code – assuming everything works correctly – see TRUE output: instructions work, please consult documentation rredlist package details.","code":"IUCN_REDLIST_KEY=\"your_actual_token_not_this_string\" # verify access to IUCN Red List API is_iucn_rl_available()"},{"path":"https://prioritizr.github.io/aoh/reference/get_spp_summary_data.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Get species summary data — get_spp_summary_data","text":"Please use following citation data obtained IUCN Red List: IUCN (insert year). IUCN Red List Threatened Species. Version (insert version). Available . obtain version number latest version, use rredlist::rl_version().","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_spp_summary_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get species summary data — get_spp_summary_data","text":"","code":"# \\dontrun{ # define species to download data for based on taxon identifiers spp_ids <- c(18, 22694927) # define persistent storage location download_dir <- rappdirs::user_data_dir(\"aoh\") # create download directory if needed if (!file.exists(download_dir)) { dir.create(download_dir, showWarnings = FALSE, recursive = TRUE) } # download and import summary data result <- get_spp_summary_data(spp_ids, download_dir) # } if (FALSE) { # interactive() # \\dontrun{ # preview data print(result) # } }"},{"path":"https://prioritizr.github.io/aoh/reference/get_spp_threat_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Get species threat data — get_spp_threat_data","title":"Get species threat data — get_spp_threat_data","text":"Import species threat data obtained International Union Conservation Nature (IUCN) Red List Threatened Species. Please note token required download data IUCN Red List API (see instructions obtain token).","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_spp_threat_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get species threat data — get_spp_threat_data","text":"","code":"get_spp_threat_data( x, dir = tempdir(), version = \"latest\", key = NULL, delay = 2, force = FALSE, verbose = TRUE )"},{"path":"https://prioritizr.github.io/aoh/reference/get_spp_threat_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get species threat data — get_spp_threat_data","text":"x integer Taxon identifier species International Union Conservation Nature (IUCN) Red List Threatened Species. example, taxon identifier species Loxodonta africana 181008073. dir character Folder path data downloaded. default, data downloaded temporary directory (.e., tempdir()). avoid downloading data multiple times, strongly recommended specify persistent storage location (see Examples ). data already available folder specified version, data imported re-downloaded IUCN Red List. version character Value indicating version IUCN Red List obtaining data (e.g., \"2021-2\"). Although possible query past versions IUCN Red List, functionality useful accessing data previously downloaded IUCN Red List. Defaults \"latest\" data downloaded recent version IUCN Red List. key character Token querying IUCN Red List API. Defaults NULL token accessed \"IUCN_REDLIST_KEY\" environmental variable (can specified .Renviron file). delay integer Number seconds wait subsequent calls IUCN Red List API. Defaults 2 seconds (recommended rredlist package; https://docs.ropensci.org/rredlist/articles/rredlist.html). force logical data downloaded even data already available? Defaults FALSE. verbose logical progress displayed downloading data? Defaults TRUE.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_spp_threat_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get species threat data — get_spp_threat_data","text":"table (tibble::tibble()) object.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_spp_threat_data.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get species threat data — get_spp_threat_data","text":"Data downloaded IUCN Red List using rredlist::rl_search(). function essentially wrapper designed help download data multiple species provide caching previously downloaded data. Data downloaded IUCN Red List using rredlist::rl_threats(). function essentially wrapper designed help download data multiple species provide caching previously downloaded data.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_spp_threat_data.html","id":"accessing-the-iucn-red-list-api","dir":"Reference","previous_headings":"","what":"Accessing the IUCN Red List API","title":"Get species threat data — get_spp_threat_data","text":"need obtain token IUCN Red List API (one already). achieve , please visit IUCN API website (https://apiv3.iucnredlist.org/), click \"Generate token\" link top web page, fill form apply token. receive token shortly completing form (immediately). receiving token, please open .Renviron file computer (e.g., using usethis::edit_r_environ()). Next, please add following text file (replacing string token) save file: Please restart R session. now able access IUCN Red List API. verify , please try running following R code – assuming everything works correctly – see TRUE output: instructions work, please consult documentation rredlist package details.","code":"IUCN_REDLIST_KEY=\"your_actual_token_not_this_string\" # verify access to IUCN Red List API is_iucn_rl_available()"},{"path":"https://prioritizr.github.io/aoh/reference/get_spp_threat_data.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Get species threat data — get_spp_threat_data","text":"Please use following citation data obtained IUCN Red List: IUCN (insert year). IUCN Red List Threatened Species. Version (insert version). Available . obtain version number latest version, use rredlist::rl_version().","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_spp_threat_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get species threat data — get_spp_threat_data","text":"","code":"# \\dontrun{ # define species to download data for based on taxon identifiers spp_ids <- c(18, 22694927) # define persistent storage location download_dir <- rappdirs::user_data_dir(\"aoh\") # create download directory if needed if (!file.exists(download_dir)) { dir.create(download_dir, showWarnings = FALSE, recursive = TRUE) } # download and import threat data result <- get_spp_threat_data(spp_ids, download_dir) # } if (FALSE) { # interactive() # \\dontrun{ # preview data print(result) # } }"},{"path":"https://prioritizr.github.io/aoh/reference/is_gdal_calc_available.html","id":null,"dir":"Reference","previous_headings":"","what":"Is gdal_calc.py available? — is_gdal_calc_available","title":"Is gdal_calc.py available? — is_gdal_calc_available","text":"Check gdal_calc.py Python script available.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/is_gdal_calc_available.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is gdal_calc.py available? — is_gdal_calc_available","text":"","code":"is_gdal_calc_available()"},{"path":"https://prioritizr.github.io/aoh/reference/is_gdal_calc_available.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Is gdal_calc.py available? — is_gdal_calc_available","text":"logical value indicating available.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/is_gdal_calc_available.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Is gdal_calc.py available? — is_gdal_calc_available","text":"gdal_calc.py Python script used process Area Habitat data using GDAL engine (within create_spp_aoh_data()) . function determines script available system. Windows systems, first tries access script using OSGeo4W software (available https://trac.osgeo.org/osgeo4w/). fails, using Windows system: tries access script using default system variables.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/is_gdal_calc_available.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Is gdal_calc.py available? — is_gdal_calc_available","text":"","code":"# see if gdal_calc python script is available print(is_gdal_calc_available()) #> [1] TRUE"},{"path":"https://prioritizr.github.io/aoh/reference/is_grass_available.html","id":null,"dir":"Reference","previous_headings":"","what":"Is GRASS available? — is_grass_available","title":"Is GRASS available? — is_grass_available","text":"Check Geographic Resources Analysis Support System (GRASS) available processing data.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/is_grass_available.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is GRASS available? — is_grass_available","text":"","code":"is_grass_available()"},{"path":"https://prioritizr.github.io/aoh/reference/is_grass_available.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Is GRASS available? — is_grass_available","text":"logical value indicating available.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/is_grass_available.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Is GRASS available? — is_grass_available","text":"function verifies (1) rgrass package installed, (2) link2GI package installed, (3) GRASS installed (.e., via link2GI::findGRASS), (4) version GRASS installed least 7.8.7. checks fail, GRASS considered available.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/is_grass_available.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Is GRASS available? — is_grass_available","text":"","code":"# \\dontrun{ # check if GRASS is available? print(is_grass_available()) #> [1] TRUE # }"},{"path":"https://prioritizr.github.io/aoh/reference/is_iucn_rl_api_available.html","id":null,"dir":"Reference","previous_headings":"","what":"Is IUCN Red List API available? — is_iucn_rl_api_available","title":"Is IUCN Red List API available? — is_iucn_rl_api_available","text":"International Union Conservation Nature (IUCN) provides API access data Red List Threatened Species. function checks whether data can accessed API. Please note token required access API (see instructions obtain token).","code":""},{"path":"https://prioritizr.github.io/aoh/reference/is_iucn_rl_api_available.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is IUCN Red List API available? — is_iucn_rl_api_available","text":"","code":"is_iucn_rl_api_available(key = NULL, n = 5)"},{"path":"https://prioritizr.github.io/aoh/reference/is_iucn_rl_api_available.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is IUCN Red List API available? — is_iucn_rl_api_available","text":"key character Token querying IUCN Red List API. Defaults NULL token accessed \"IUCN_REDLIST_KEY\" environmental variable (can specified .Renviron file). n integer Number times attempt access API.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/is_iucn_rl_api_available.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Is IUCN Red List API available? — is_iucn_rl_api_available","text":"logical indicating IUCN Red List API can accessed.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/is_iucn_rl_api_available.html","id":"accessing-the-iucn-red-list-api","dir":"Reference","previous_headings":"","what":"Accessing the IUCN Red List API","title":"Is IUCN Red List API available? — is_iucn_rl_api_available","text":"need obtain token IUCN Red List API (one already). achieve , please visit IUCN API website (https://apiv3.iucnredlist.org/), click \"Generate token\" link top web page, fill form apply token. receive token shortly completing form (immediately). receiving token, please open .Renviron file computer (e.g., using usethis::edit_r_environ()). Next, please add following text file (replacing string token) save file: Please restart R session. now able access IUCN Red List API. verify , please try running following R code – assuming everything works correctly – see TRUE output: instructions work, please consult documentation rredlist package details.","code":"IUCN_REDLIST_KEY=\"your_actual_token_not_this_string\" # verify access to IUCN Red List API is_iucn_rl_available()"},{"path":"https://prioritizr.github.io/aoh/reference/is_iucn_rl_api_available.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Is IUCN Red List API available? — is_iucn_rl_api_available","text":"","code":"# \\dontrun{ # check if IUCN Red List API is available? is_iucn_rl_api_available() #> [1] TRUE # }"},{"path":"https://prioritizr.github.io/aoh/reference/is_osgeo4w_available.html","id":null,"dir":"Reference","previous_headings":"","what":"Is OSGeo4W available? — is_osgeo4w_available","title":"Is OSGeo4W available? — is_osgeo4w_available","text":"Check OSGeo4W software available.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/is_osgeo4w_available.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is OSGeo4W available? — is_osgeo4w_available","text":"","code":"is_osgeo4w_available()"},{"path":"https://prioritizr.github.io/aoh/reference/is_osgeo4w_available.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Is OSGeo4W available? — is_osgeo4w_available","text":"logical value indicating available.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/is_osgeo4w_available.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Is OSGeo4W available? — is_osgeo4w_available","text":"software used provide GDAL Python scripts Windows systems used generate Area Habitat data via GDAL engine. can installed https://trac.osgeo.org/osgeo4w/. Note macOS Linux systems require software. default, assumed software installed \"C:/OSGeo4W\" directory. software installed different location, \"OSGEO4W_ROOT\" environmental variable can used specify different location.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/is_osgeo4w_available.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Is OSGeo4W available? — is_osgeo4w_available","text":"","code":"# see if OSGeo4W is available at the default location print(is_osgeo4w_available()) #> [1] FALSE # \\dontrun{ # specify a different location for OSGeo4W, and # then see if OSGeo4W is available at this location Sys.setenv(\"OSGEO4W_ROOT\" = \"C:/software/OSGeo4W\") print(is_osgeo4w_available()) #> [1] FALSE # }"},{"path":"https://prioritizr.github.io/aoh/reference/iucn_habitat_codes_artificial.html","id":null,"dir":"Reference","previous_headings":"","what":"IUCN Red List codes for artificial habitats — iucn_habitat_codes_artificial","title":"IUCN Red List codes for artificial habitats — iucn_habitat_codes_artificial","text":"International Union Conservation Nature (IUCN) Red List Threatened Species provides habitat classification scheme different habitat types worldwide. function returns codes habitat types correspond artificial areas (e.g., urban areas, pasture lands, canals).","code":""},{"path":"https://prioritizr.github.io/aoh/reference/iucn_habitat_codes_artificial.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"IUCN Red List codes for artificial habitats — iucn_habitat_codes_artificial","text":"","code":"iucn_habitat_codes_artificial()"},{"path":"https://prioritizr.github.io/aoh/reference/iucn_habitat_codes_artificial.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"IUCN Red List codes for artificial habitats — iucn_habitat_codes_artificial","text":"character vector codes.","code":""},{"path":[]},{"path":"https://prioritizr.github.io/aoh/reference/iucn_habitat_codes_artificial.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"IUCN Red List codes for artificial habitats — iucn_habitat_codes_artificial","text":"","code":"# print codes print(iucn_habitat_codes_artificial()) #> [1] \"14\" \"14.1\" \"14.2\" \"14.3\" \"14.4\" \"14.5\" \"14.6\" \"15\" \"15.1\" #> [10] \"15.2\" \"15.3\" \"15.4\" \"15.5\" \"15.6\" \"15.7\" \"15.8\" \"15.9\" \"15.10\" #> [19] \"15.11\" \"15.12\" \"15.13\""},{"path":"https://prioritizr.github.io/aoh/reference/iucn_habitat_codes_introduced.html","id":null,"dir":"Reference","previous_headings":"","what":"IUCN Red List codes for introduced habitats — iucn_habitat_codes_introduced","title":"IUCN Red List codes for introduced habitats — iucn_habitat_codes_introduced","text":"International Union Conservation Nature (IUCN) Red List Threatened Species provides habitat classification scheme different habitat types worldwide. function returns codes habitat classes correspond introduced vegetation.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/iucn_habitat_codes_introduced.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"IUCN Red List codes for introduced habitats — iucn_habitat_codes_introduced","text":"","code":"iucn_habitat_codes_introduced()"},{"path":"https://prioritizr.github.io/aoh/reference/iucn_habitat_codes_introduced.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"IUCN Red List codes for introduced habitats — iucn_habitat_codes_introduced","text":"character vector codes.","code":""},{"path":[]},{"path":"https://prioritizr.github.io/aoh/reference/iucn_habitat_codes_introduced.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"IUCN Red List codes for introduced habitats — iucn_habitat_codes_introduced","text":"","code":"# print codes print(iucn_habitat_codes_introduced()) #> [1] \"16\""},{"path":"https://prioritizr.github.io/aoh/reference/iucn_habitat_codes_marine.html","id":null,"dir":"Reference","previous_headings":"","what":"IUCN Red List codes for marine habitats — iucn_habitat_codes_marine","title":"IUCN Red List codes for marine habitats — iucn_habitat_codes_marine","text":"International Union Conservation Nature (IUCN) Red List Threatened Species provides habitat classification scheme different habitat types worldwide. function returns codes habitat classes occur ocean.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/iucn_habitat_codes_marine.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"IUCN Red List codes for marine habitats — iucn_habitat_codes_marine","text":"","code":"iucn_habitat_codes_marine()"},{"path":"https://prioritizr.github.io/aoh/reference/iucn_habitat_codes_marine.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"IUCN Red List codes for marine habitats — iucn_habitat_codes_marine","text":"character vector codes.","code":""},{"path":[]},{"path":"https://prioritizr.github.io/aoh/reference/iucn_habitat_codes_marine.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"IUCN Red List codes for marine habitats — iucn_habitat_codes_marine","text":"","code":"# print codes print(iucn_habitat_codes_marine()) #> [1] \"9\" \"9.1\" \"9.2\" \"9.3\" \"9.4\" \"9.5\" \"9.6\" \"9.7\" #> [9] \"9.8\" \"9.8.1\" \"9.8.2\" \"9.8.3\" \"9.8.4\" \"9.8.5\" \"9.8.6\" \"9.9\" #> [17] \"9.10\" \"10\" \"10.1\" \"10.2\" \"10.3\" \"10.4\" \"11\" \"11.1\" #> [25] \"11.1.1\" \"11.2\" \"11.1.2\" \"11.3\" \"11.4\" \"11.5\" \"11.6\" \"15.11\" #> [33] \"15.12\""},{"path":"https://prioritizr.github.io/aoh/reference/iucn_habitat_codes_misc.html","id":null,"dir":"Reference","previous_headings":"","what":"IUCN Red List codes for miscellaneous habitats — iucn_habitat_codes_misc","title":"IUCN Red List codes for miscellaneous habitats — iucn_habitat_codes_misc","text":"International Union Conservation Nature (IUCN) Red List Threatened Species provides habitat classification scheme different habitat types worldwide. function returns codes habitat classes correspond unknown habitats.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/iucn_habitat_codes_misc.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"IUCN Red List codes for miscellaneous habitats — iucn_habitat_codes_misc","text":"","code":"iucn_habitat_codes_misc()"},{"path":"https://prioritizr.github.io/aoh/reference/iucn_habitat_codes_misc.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"IUCN Red List codes for miscellaneous habitats — iucn_habitat_codes_misc","text":"character vector codes.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/iucn_habitat_codes_misc.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"IUCN Red List codes for miscellaneous habitats — iucn_habitat_codes_misc","text":"","code":"# print codes print(iucn_habitat_codes_misc()) #> [1] \"17\" \"18\""},{"path":"https://prioritizr.github.io/aoh/reference/iucn_habitat_codes_terrestrial.html","id":null,"dir":"Reference","previous_headings":"","what":"IUCN Red List codes for terrestrial habitats — iucn_habitat_codes_terrestrial","title":"IUCN Red List codes for terrestrial habitats — iucn_habitat_codes_terrestrial","text":"International Union Conservation Nature (IUCN) Red List Threatened Species provides habitat classification scheme different habitat types worldwide. function returns codes habitat classes occur land.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/iucn_habitat_codes_terrestrial.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"IUCN Red List codes for terrestrial habitats — iucn_habitat_codes_terrestrial","text":"","code":"iucn_habitat_codes_terrestrial()"},{"path":"https://prioritizr.github.io/aoh/reference/iucn_habitat_codes_terrestrial.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"IUCN Red List codes for terrestrial habitats — iucn_habitat_codes_terrestrial","text":"character vector codes.","code":""},{"path":[]},{"path":"https://prioritizr.github.io/aoh/reference/iucn_habitat_codes_terrestrial.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"IUCN Red List codes for terrestrial habitats — iucn_habitat_codes_terrestrial","text":"","code":"# print codes print(iucn_habitat_codes_terrestrial()) #> [1] \"1\" \"1.1\" \"1.2\" \"1.3\" \"1.4\" \"1.5\" \"1.6\" \"1.7\" \"1.8\" #> [10] \"1.9\" \"2\" \"2.1\" \"2.2\" \"3\" \"3.1\" \"3.2\" \"3.3\" \"3.4\" #> [19] \"3.5\" \"3.6\" \"3.7\" \"3.8\" \"4\" \"4.1\" \"4.2\" \"4.3\" \"4.4\" #> [28] \"4.5\" \"4.6\" \"4.7\" \"5\" \"5.1\" \"5.2\" \"5.3\" \"5.4\" \"5.5\" #> [37] \"5.6\" \"5.7\" \"5.8\" \"5.9\" \"5.10\" \"5.11\" \"5.12\" \"5.13\" \"5.14\" #> [46] \"5.15\" \"5.16\" \"5.17\" \"5.18\" \"6\" \"7\" \"7.1\" \"7.2\" \"8\" #> [55] \"8.1\" \"8.2\" \"8.3\" \"12\" \"12.1\" \"12.2\" \"12.3\" \"12.4\" \"12.5\" #> [64] \"12.7\" \"12.6\" \"13\" \"13.1\" \"13.2\" \"13.3\" \"13.4\" \"13.5\" \"14\" #> [73] \"14.1\" \"14.2\" \"14.3\" \"14.4\" \"14.5\" \"14.6\" \"15\" \"15.1\" \"15.2\" #> [82] \"15.3\" \"15.4\" \"15.5\" \"15.6\" \"15.7\" \"15.8\" \"15.9\" \"15.10\" \"15.13\" #> [91] \"16\" \"17\" \"18\""},{"path":"https://prioritizr.github.io/aoh/reference/iucn_habitat_data.html","id":null,"dir":"Reference","previous_headings":"","what":"IUCN habitat classification codes — iucn_habitat_data","title":"IUCN habitat classification codes — iucn_habitat_data","text":"International Union Conservation Nature (IUCN) Red List Threatened Species provides habitat classification scheme different habitat types worldwide. dataset provides details different IUCN habitat classes.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/iucn_habitat_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"IUCN habitat classification codes — iucn_habitat_data","text":"","code":"data(iucn_habitat_data)"},{"path":"https://prioritizr.github.io/aoh/reference/iucn_habitat_data.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"IUCN habitat classification codes — iucn_habitat_data","text":"data frame 126 rows 2 columns. row corresponds different habitat class, column contains information given habitat class. contains columns following values habitat class. code character value indicating code class. name character value indicating name class. is_terrestrial logical value indicating class occurs within terrestrial environmental. is_marine logical value indicating class occurs within marine environmental. is_artificial logical value indicating class artificial (e.g., anthropogenically human modified). is_misc logical value indicating class correspond specific land cover. is_introduced logical value indicating class corresponds introduced vegetation.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/iucn_habitat_data.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"IUCN habitat classification codes — iucn_habitat_data","text":"data obtained https://www.iucnredlist.org/resources/habitat-classification-scheme.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/iucn_habitat_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"IUCN habitat classification codes — iucn_habitat_data","text":"","code":"# load data data(iucn_habitat_data) # print data print(iucn_habitat_data) #> # A tibble: 126 × 7 #> code name is_terrestrial is_marine is_artificial is_misc is_introduced #> #> 1 1 Forest TRUE FALSE FALSE FALSE FALSE #> 2 1.1 Forest - … TRUE FALSE FALSE FALSE FALSE #> 3 1.2 Forest - … TRUE FALSE FALSE FALSE FALSE #> 4 1.3 Forest - … TRUE FALSE FALSE FALSE FALSE #> 5 1.4 Forest - … TRUE FALSE FALSE FALSE FALSE #> 6 1.5 Forest - … TRUE FALSE FALSE FALSE FALSE #> 7 1.6 Forest - … TRUE FALSE FALSE FALSE FALSE #> 8 1.7 Forest - … TRUE FALSE FALSE FALSE FALSE #> 9 1.8 Forest - … TRUE FALSE FALSE FALSE FALSE #> 10 1.9 Forest - … TRUE FALSE FALSE FALSE FALSE #> # ℹ 116 more rows"},{"path":"https://prioritizr.github.io/aoh/reference/iucn_threat_data.html","id":null,"dir":"Reference","previous_headings":"","what":"IUCN threat classification codes — iucn_threat_data","title":"IUCN threat classification codes — iucn_threat_data","text":"International Union Conservation Nature (IUCN) Red List Threatened Species provides threat classification scheme different threatening processes. dataset provides details different IUCN threat classes.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/iucn_threat_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"IUCN threat classification codes — iucn_threat_data","text":"","code":"data(iucn_threat_data)"},{"path":"https://prioritizr.github.io/aoh/reference/iucn_threat_data.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"IUCN threat classification codes — iucn_threat_data","text":"data frame 130 rows 2 columns. row corresponds different threat class, column contains information given threat class. contains columns following values threat class. code character value indicating code class. name character value indicating name class.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/iucn_threat_data.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"IUCN threat classification codes — iucn_threat_data","text":"data obtained https://www.iucnredlist.org/resources/threat-classification-scheme.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/iucn_threat_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"IUCN threat classification codes — iucn_threat_data","text":"","code":"# load data data(iucn_threat_data) # print data print(iucn_threat_data) #> # A tibble: 130 × 2 #> code name #> #> 1 1 Residential & commercial development #> 2 1.1 Housing & urban areas #> 3 1.2 Commercial & industrial areas #> 4 1.3 Tourism & recreation areas #> 5 2 Agriculture & aquaculture #> 6 2.1 Annual & perennial non-timber crops #> 7 2.1.1 Shifting agriculture #> 8 2.1.2 Small-holder farming #> 9 2.1.3 Agro-industry farming #> 10 2.1.4 Scale Unknown/Unrecorded #> # ℹ 120 more rows"},{"path":"https://prioritizr.github.io/aoh/reference/plot_spp_aoh_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot species range and Area of Habitat data — plot_spp_aoh_data","title":"Plot species range and Area of Habitat data — plot_spp_aoh_data","text":"Create map compare species geographic range Area Habitat data.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/plot_spp_aoh_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot species range and Area of Habitat data — plot_spp_aoh_data","text":"","code":"plot_spp_aoh_data( x, max_plot = 9, expand = 0.05, zoom = NULL, maptype = NULL, maxcell = 50000, ... )"},{"path":"https://prioritizr.github.io/aoh/reference/plot_spp_aoh_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot species range and Area of Habitat data — plot_spp_aoh_data","text":"x sf::st_sf() Object containing species data. object produced using create_spp_aoh_data() function. max_plot integer Maximum number Area Habitat datasets plot. Defaults 9. expand numeric Proportion expand plotting limits. Defaults 0.05 plot limits extended 5% beyond spatial extent data. zoom numeric Value indicating zoom level basemap. See documentation zoom parameter ggmap::get_stadiamap() function details. Defaults NULL basemap shown. maptype character Value indicating name basemap use plot. See documentation maptype parameter ggmap::get_stadiamap() function details. Defaults NULL basemap shown. Note ggmap package must installed show basemap. maxcell integer Maximum number grid cells mapping. Defaults 50000. ... Additional arguments passed ggmap::get_stadiamap().","code":""},{"path":"https://prioritizr.github.io/aoh/reference/plot_spp_aoh_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot species range and Area of Habitat data — plot_spp_aoh_data","text":"ggplot2::ggplot() object.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/plot_spp_aoh_data.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Plot species range and Area of Habitat data — plot_spp_aoh_data","text":"Note data automatically projected geographic coordinate system (EPSG:4326) plotted base map. means Area Habitat data shown maps contain base map might look slightly different underlying dataset.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/plot_spp_aoh_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot species range and Area of Habitat data — plot_spp_aoh_data","text":"","code":"# \\dontrun{ # find file path for example range data following IUCN Red List data format ## N.B., the range data were not obtained from the IUCN Red List, ## and were instead based on data from GBIF (https://www.gbif.org/) path <- system.file(\"extdata\", \"EXAMPLE_SPECIES.zip\", package = \"aoh\") # import data spp_range_data <- read_spp_range_data(path) # specify settings for data processing output_dir <- tempdir() # folder to save AOH data cache_dir <- rappdirs::user_data_dir(\"aoh\") # persistent storage location n_threads <- parallel::detectCores() - 1 # speed up analysis # create cache directory if needed if (!file.exists(cache_dir)) { dir.create(cache_dir, showWarnings = FALSE, recursive = TRUE) } # create species information data spp_info_data <- create_spp_info_data( x = spp_range_data, cache_dir = cache_dir ) #> ℹ initializing #> ✔ initializing [337ms] #> #> ℹ cleaning species range data #> ✔ cleaning species range data [3.7s] #> #> ℹ importing species summary data #> ✔ importing species summary data [343ms] #> #> ℹ importing species habitat data #> ✔ importing species habitat data [331ms] #> #> ℹ collating species data #> ✔ collating species data [261ms] #> #> ℹ post-processing results #> ✔ post-processing results [12ms] #> #> ✔ finished # create Area of Habitat data for species spp_aoh_data <- create_spp_aoh_data( x = spp_info_data, output_dir = output_dir, n_threads = n_threads, cache_dir = cache_dir ) #> ℹ initializing #> ✔ initializing [6ms] #> #> ℹ importing global elevation data #> ✔ importing global elevation data [7.7s] #> #> ℹ importing global habitat data #> ! argument to \"crosswalk_data\" is missing the following 2 habitat classification codes: \"7.1\", \"7.2\" #> ℹ importing global habitat data #> ✔ importing global habitat data [5.4s] #> #> ℹ generating Area of Habitat data #> skipping 4 species distributions already processed #> ✔ generating Area of Habitat data [39ms] #> #> ℹ post-processing results #> ✔ post-processing results [15ms] #> #> ✔ finished # plot the data to visualize the range maps and AOH data p <- plot_spp_aoh_data(spp_aoh_data) print(p) # this plot can be customized using ggplot2 functions # for example, let's style the plot and update the colors ## load ggplot2 package library(ggplot2) ## customize plot p2 <- p + scale_fill_viridis_d() + scale_color_manual(values = c(\"range\" = \"blue\")) + scale_size_manual(values = c(\"range\" = 1.5)) + theme( strip.text = ggplot2::element_text(color = \"white\"), strip.background = ggplot2::element_rect( fill = \"black\", color = \"black\" ) ) ## print customized plot print(p2) # } # \\dontrun{ # we can also plot the data with a base map too ## note that you might need to install ggmap to run this example if (require(ggmap)) { ## create customized map with basemap p3 <- plot_spp_aoh_data(spp_aoh_data, zoom = 7, maptype = \"stamen_toner\") + scale_fill_manual( values = c(\"suitable\" = \"blue\", \"not suitable\" = \"transparent\") ) + scale_color_manual(values = c(\"range\" = \"red\")) + scale_size_manual(values = c(\"range\" = 2)) + theme( strip.text = ggplot2::element_text(color = \"white\"), strip.background = ggplot2::element_rect( fill = \"black\", color = \"black\" ) ) ## print customized plot print(p3) } #> Loading required package: ggmap #> ℹ Google's Terms of Service: #> Stadia Maps' Terms of Service: #> OpenStreetMap's Tile Usage Policy: #> ℹ Please cite ggmap if you use it! Use `citation(\"ggmap\")` for details. #> #> Attaching package: ‘ggmap’ #> The following object is masked from ‘package:terra’: #> #> inset #> ℹ © Stadia Maps © Stamen Design © OpenMapTiles © OpenStreetMap contributors. #> Coordinate system already present. Adding new coordinate system, which will #> replace the existing one. # }"},{"path":"https://prioritizr.github.io/aoh/reference/plot_spp_frc_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot species range and fractional coverage data — plot_spp_frc_data","title":"Plot species range and fractional coverage data — plot_spp_frc_data","text":"Create map compare species geographic range fractional coverage data.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/plot_spp_frc_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot species range and fractional coverage data — plot_spp_frc_data","text":"","code":"plot_spp_frc_data( x, max_plot = 9, expand = 0.05, zoom = NULL, maptype = NULL, maxcell = 50000, ... )"},{"path":"https://prioritizr.github.io/aoh/reference/plot_spp_frc_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot species range and fractional coverage data — plot_spp_frc_data","text":"x sf::st_sf() Object containing species data. object produced using calc_spp_frc_data() function. max_plot integer Maximum number Area Habitat datasets plot. Defaults 9. expand numeric Proportion expand plotting limits. Defaults 0.05 plot limits extended 5% beyond spatial extent data. zoom numeric Value indicating zoom level basemap. See documentation zoom parameter ggmap::get_stadiamap() function details. Defaults NULL basemap shown. maptype character Value indicating name basemap use plot. See documentation maptype parameter ggmap::get_stadiamap() function details. Defaults NULL basemap shown. Note ggmap package must installed show basemap. maxcell integer Maximum number grid cells mapping. Defaults 50000. ... Additional arguments passed ggmap::get_stadiamap().","code":""},{"path":"https://prioritizr.github.io/aoh/reference/plot_spp_frc_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot species range and fractional coverage data — plot_spp_frc_data","text":"ggplot2::ggplot() object.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/plot_spp_frc_data.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Plot species range and fractional coverage data — plot_spp_frc_data","text":"Note data automatically projected geographic coordinate system (EPSG:4326) plotted base map. means Area Habitat data shown maps contain base map might look slightly different underlying dataset.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/plot_spp_frc_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot species range and fractional coverage data — plot_spp_frc_data","text":"","code":"# \\dontrun{ # find file path for example range data following IUCN Red List data format ## N.B., the range data were not obtained from the IUCN Red List, ## and were instead based on data from GBIF (https://www.gbif.org/) path <- system.file(\"extdata\", \"EXAMPLE_SPECIES.zip\", package = \"aoh\") # import data spp_range_data <- read_spp_range_data(path) # specify settings for data processing output_dir <- tempdir() # folder to save AOH data cache_dir <- rappdirs::user_data_dir(\"aoh\") # persistent storage location n_threads <- parallel::detectCores() - 1 # speed up analysis # create cache directory if needed if (!file.exists(cache_dir)) { dir.create(cache_dir, showWarnings = FALSE, recursive = TRUE) } # create species information data spp_info_data <- create_spp_info_data( x = spp_range_data, cache_dir = cache_dir ) #> ℹ initializing #> ✔ initializing [346ms] #> #> ℹ cleaning species range data #> ✔ cleaning species range data [3.8s] #> #> ℹ importing species summary data #> ✔ importing species summary data [347ms] #> #> ℹ importing species habitat data #> ✔ importing species habitat data [334ms] #> #> ℹ collating species data #> ✔ collating species data [225ms] #> #> ℹ post-processing results #> ✔ post-processing results [10ms] #> #> ✔ finished # create fractional coverage data for species spp_aoh_data <- create_spp_frc_data( x = spp_info_data, res = 5000, output_dir = output_dir, n_threads = n_threads, cache_dir = cache_dir ) #> ℹ initializing #> ✔ initializing [4ms] #> #> ℹ importing global elevation data #> ✔ importing global elevation data [7.8s] #> #> ℹ importing global habitat data #> ! argument to \"crosswalk_data\" is missing the following 2 habitat classification codes: \"7.1\", \"7.2\" #> ℹ importing global habitat data #> ✔ importing global habitat data [5.6s] #> #> ℹ generating Area of Habitat data #> skipping 4 species distributions already processed #> ✔ generating Area of Habitat data [39ms] #> #> ℹ post-processing results #> ✔ post-processing results [37ms] #> #> ✔ finished # create fraction coverage dat for species spp_frc_data <- calc_spp_frc_data( x = spp_aoh_data, res = 5000, output_dir = output_dir, cache_dir = cache_dir ) #> ℹ importing global habitat data #> skipping 4 species distributions already processed #> ✔ importing global habitat data [5.4s] #> # plot the data to visualize the range maps and fractional coverage data p <- plot_spp_frc_data(spp_frc_data) print(p) # this plot can be customized using ggplot2 functions # for example, let's style the plot and update the colors ## load ggplot2 package library(ggplot2) ## customize plot p2 <- p + scale_fill_viridis_c() + scale_color_manual(values = c(\"range\" = \"blue\")) + scale_size_manual(values = c(\"range\" = 1.5)) + theme( strip.text = ggplot2::element_text(color = \"white\"), strip.background = ggplot2::element_rect( fill = \"black\", color = \"black\" ) ) ## print customized plot print(p2) # } # \\dontrun{ # we can also plot the data with a base map too ## note that you might need to install ggmap to run this example if (require(ggmap)) { ## create customized map with basemap p3 <- plot_spp_frc_data(spp_frc_data, zoom = 7, maptype = \"stamen_toner\") + scale_fill_viridis_c() + scale_color_manual(values = c(\"range\" = \"red\")) + scale_size_manual(values = c(\"range\" = 1.5)) + theme( strip.text = ggplot2::element_text(color = \"white\"), strip.background = ggplot2::element_rect( fill = \"black\", color = \"black\" ) ) ## print customized plot print(p3) } #> ℹ © Stadia Maps © Stamen Design © OpenMapTiles © OpenStreetMap contributors. #> Coordinate system already present. Adding new coordinate system, which will #> replace the existing one. # }"},{"path":"https://prioritizr.github.io/aoh/reference/read_spp_range_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Read species range data — read_spp_range_data","title":"Read species range data — read_spp_range_data","text":"Import species geographic range (.e., extent occurrence) data obtained International Union Conservation Nature (IUCN) Red List Threatened Species.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/read_spp_range_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read species range data — read_spp_range_data","text":"","code":"read_spp_range_data(path, n = NULL)"},{"path":"https://prioritizr.github.io/aoh/reference/read_spp_range_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read species range data — read_spp_range_data","text":"path character File path data (zip archive) file. n numeric Number features dataset import. Defaults NULL available data imported.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/read_spp_range_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read species range data — read_spp_range_data","text":"sf::sf() object containing dataset.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/read_spp_range_data.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Read species range data — read_spp_range_data","text":"Data amphibians, reptiles, mammals can obtained directly International Union Conservation Nature (IUCN) Red List website (see https://www.iucnredlist.org/resources/spatial-data-download). Data birds can obtained requesting data BirdLife International (see https://datazone.birdlife.org/species/requestdis). standardize data IUCN Red List BirdLife International, \"SISID\" \"SISRecID\" columns renamed \"id_no\".","code":""},{"path":"https://prioritizr.github.io/aoh/reference/read_spp_range_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Read species range data — read_spp_range_data","text":"","code":"# find file path for example range data following IUCN Red List data format ## N.B., the range data were not obtained from the IUCN Red List, ## and were instead based on data from GBIF (https://www.gbif.org/) path <- system.file(\"extdata\", \"EXAMPLE_SPECIES.zip\", package = \"aoh\") # import data spp_range_data <- read_spp_range_data(path) # preview data print(spp_range_data) #> Simple feature collection with 4 features and 26 fields #> Geometry type: POLYGON #> Dimension: XY #> Bounding box: xmin: -9.479736 ymin: 36.59422 xmax: 3.302702 ymax: 43.76455 #> Geodetic CRS: WGS 84 #> # A tibble: 4 × 27 #> id_no binomial presence origin seasonal compiler yrcompiled citation #> #> 1 979 Alytes dickhilleni 1 1 1 Derived… NA NA #> 2 59448 Calotriton asper 1 1 1 Derived… NA NA #> 3 4657 Chioglossa lusita… 1 1 1 Derived… NA NA #> 4 58622 Rana iberica 1 1 1 Derived… NA NA #> # ℹ 19 more variables: subspecies , subpop , source , #> # island , tax_comm , dist_comm , generalisd , #> # legend , kingdom , phylum , class , order_ , #> # family , genus , category , marine , terrestial , #> # freshwater , geometry # plot data plot(spp_range_data[, \"id_no\"])"},{"path":"https://prioritizr.github.io/aoh/reference/simulate_spp_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Simulate species data — simulate_spp_data","title":"Simulate species data — simulate_spp_data","text":"Simulate species data creating Area Habitat data (Brooks et al. 2019). Specifically, data simulated define species geographic ranges, summary information, habitat preferences.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/simulate_spp_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Simulate species data — simulate_spp_data","text":"","code":"simulate_spp_data( n, boundary_data, habitat_data = NULL, elevation_data = NULL, crosswalk_data = NULL, rf_scale_min = 0.5, rf_scale_max = 0.7, cache_dir = tempdir(), habitat_version = \"latest\", force = FALSE, omit_habitat_codes = iucn_habitat_codes_marine(), verbose = TRUE )"},{"path":"https://prioritizr.github.io/aoh/reference/simulate_spp_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Simulate species data — simulate_spp_data","text":"n integer Number species simulate. boundary_data sf::st_sf() Spatial object delineating spatial extent boundary simulating species ranges. habitat_data terra::rast() Raster data indicating presence different habitat classes across world (e.g., Jung et al. 2020a,b; Lumbierres et al. 2021). grid cell contain integer value specifies habitat class present within cell (based argument crosswalk_data). Defaults NULL data automatically obtained (using get_lumb_cgls_habitat_data()). elevation_data terra::rast() Raster data delineating worldwide elevation data (e.g., Robinson et al. 2014). Defaults NULL data automatically obtained (using get_global_elevation_data()). data obtained automatically, preprocessed version habitat data used reduce processing time. crosswalk_data data.frame() Table containing data indicate grid cell values argument habitat_data correspond IUCN habitat classification codes. argument contain code column specifies set IUCN habitat classification codes (see iucn_habitat_data(), value column specifies different values argument habitat_data. Defaults NULL crosswalk default habitat data used (.e., crosswalk_lumb_cgls_data()). rf_scale_min numeric Minimum scaling parameter used control smallest possible level spatial auto-correlation simulated species ranges. Defaults 0.5. rf_scale_max numeric Minimum scaling parameter used control largest possible level spatial auto-correlation simulated species ranges. Defaults 0.7. cache_dir character Folder path downloading caching data. default, temporary directory used (.e., tempdir()). avoid downloading data multiple times, strongly recommended specify persistent storage location (see Examples ). habitat_version character Version habitat dataset used. See documentation version parameter get_lumb_cgls_habitat_data() function details. parameter used habitat data obtained automatically (.e., argument habitat_data NULL). Defaults \"latest\" recent version dataset used data need obtained. force logical data downloaded even data already available? Defaults FALSE. omit_habitat_codes character Habitat classification codes omit resulting Area Habitat data. Please see IUCN Red List Habitat Classification Scheme full range habitat classification codes. example, aim identify natural places contain suitable conditions, areas classified anthropogenically modified (iucn_habitat_codes_artificial()), introduced vegetation (iucn_habitat_codes_introduced(), unknown habitat (iucn_habitat_codes_misc()) excluded. Defaults iucn_habitat_codes_marine(), marine habitats excluded. verbose logical progress displayed processing data? Defaults TRUE.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/simulate_spp_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Simulate species data — simulate_spp_data","text":"list object containing simulated data formatted following conventions used International Union Conservation Nature (IUCN) Red List Threatened Species. contains following elements: spp_range_data sf::st_sf() object containing species' geographic range data. spp_summary_data tibble::tibble() object containing summary information species (including elevational limit information. spp_habitat_data tibble::tibble() object containing habitat preferences species.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/simulate_spp_data.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Simulate species data — simulate_spp_data","text":"Brooks TM, Pimm SL, Akçakaya HR, Buchanan GM, Butchart SHM, Foden W, Hilton-Taylor C, Hoffmann M, Jenkins CN, Joppa L, Li BV, Menon V, Ocampo-Peñuela N, Rondinini C (2019) Measuring terrestrial Area Habitat (AOH) utility IUCN Red List. Trends Ecology & Evolution, 34, 977–986. doi:10.1016/j.tree.2019.06.009","code":""},{"path":[]},{"path":"https://prioritizr.github.io/aoh/reference/simulate_spp_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Simulate species data — simulate_spp_data","text":"","code":"# please ensure that the fields and smoothr packages are installed # to run these examples # \\dontrun{ # define persistent storage location download_dir <- rappdirs::user_data_dir(\"aoh\") # create download directory if needed if (!file.exists(download_dir)) { dir.create(download_dir, showWarnings = FALSE, recursive = TRUE) } # specify file path for boundary data boundary_path <- system.file(\"shape/nc.shp\", package = \"sf\") # import boundary data to simulate species data boundary_data <- sf::st_union(sf::read_sf(boundary_path)) # set random number generator seeds for consistency set.seed(500) # simulate data for 5 species x <- simulate_spp_data( n = 5, boundary_data = boundary_data, cache_dir = download_dir ) #> ℹ importing global elevation data #> ✔ importing global elevation data [7.6s] #> #> ℹ importing global habitat data #> ✔ importing global habitat data [1m 18.3s] #> # preview species range data print(x$spp_range_data) #> Simple feature collection with 17 features and 26 fields #> Geometry type: GEOMETRY #> Dimension: XY #> Bounding box: xmin: -84.31763 ymin: 33.88392 xmax: -75.45658 ymax: 36.5881 #> Geodetic CRS: WGS 84 #> First 10 features: #> id_no seasonal presence origin geometry #> 1 799 1 1 1 POLYGON ((-78.71844 34.0082... #> 2 799 1 3 2 POLYGON ((-78.40331 34.2545... #> 3 2102 1 1 1 MULTIPOLYGON (((-76.49551 3... #> 4 2102 3 1 1 MULTIPOLYGON (((-76.86322 3... #> 5 2102 4 1 1 MULTIPOLYGON (((-82.74959 3... #> 6 2102 3 4 4 MULTIPOLYGON (((-77.15074 3... #> 7 2102 3 3 3 MULTIPOLYGON (((-77.22261 3... #> 8 4082 1 1 1 MULTIPOLYGON (((-78.57828 3... #> 9 4082 1 1 6 MULTIPOLYGON (((-78.49659 3... #> 10 4082 1 4 2 MULTIPOLYGON (((-78.2597 35... #> binomial compiler yrcompiled citation subspecies subpop source #> 1 Simulus spp. 799 Simulation NA #> 2 Simulus spp. 799 Simulation NA #> 3 Simulus spp. 2102 Simulation NA #> 4 Simulus spp. 2102 Simulation NA #> 5 Simulus spp. 2102 Simulation NA #> 6 Simulus spp. 2102 Simulation NA #> 7 Simulus spp. 2102 Simulation NA #> 8 Simulus spp. 4082 Simulation NA #> 9 Simulus spp. 4082 Simulation NA #> 10 Simulus spp. 4082 Simulation NA #> island tax_comm dist_comm generalisd legend kingdom phylum class order_ #> 1 NA #> 2 NA #> 3 NA #> 4 NA #> 5 NA #> 6 NA #> 7 NA #> 8 NA #> 9 NA #> 10 NA #> family genus category marine terrestial freshwater #> 1 Simulus LC false true false #> 2 Simulus LC false true false #> 3 Simulus LC false true false #> 4 Simulus LC false true false #> 5 Simulus LC false true false #> 6 Simulus LC false true false #> 7 Simulus LC false true false #> 8 Simulus VU false true false #> 9 Simulus VU false true false #> 10 Simulus VU false true false # preview species habitat preference data print(x$spp_habitat_data) #> # A tibble: 21 × 6 #> id_no code habitat suitability season majorimportance #> #> 1 799 4.4 Grassland - Temperate Suitable Resid… NA #> 2 799 14.3 Plantations Suitable Resid… NA #> 3 799 14.1 Arable Land Suitable Resid… NA #> 4 2102 4.4 Grassland - Temperate Suitable Resid… NA #> 5 2102 3.4 Shrubland - Temperate Suitable Resid… NA #> 6 2102 5.15 Wetlands (inland) - Seasonal/… Suitable Resid… NA #> 7 2102 3.4 Shrubland - Temperate Suitable Non-b… NA #> 8 2102 14.1 Arable Land Suitable Non-b… NA #> 9 2102 14.3 Plantations Suitable Non-b… NA #> 10 2102 14.3 Plantations Suitable Passa… NA #> # ℹ 11 more rows # preview species summary data print(x$spp_summary_data) #> # A tibble: 5 × 31 #> id_no taxonid scientific_name kingdom phylum class order family genus #> #> 1 799 799 Simulus spp. 799 NA NA NA NA NA Simulus #> 2 2102 2102 Simulus spp. 2102 NA NA NA NA NA Simulus #> 3 4082 4082 Simulus spp. 4082 NA NA NA NA NA Simulus #> 4 5167 5167 Simulus spp. 5167 NA NA NA NA NA Simulus #> 5 5479 5479 Simulus spp. 5479 NA NA NA NA NA Simulus #> # ℹ 22 more variables: main_common_name , authority , #> # published_year , assessment_date , category , #> # criteria , population_trend , marine_system , #> # freshwater_system , terrestrial_system , assessor , #> # reviewer , aoo_km2 , eoo_km2 , elevation_upper , #> # elevation_lower , depth_upper , depth_lower , #> # errata_flag , errata_reason , amended_flag , … # }"},{"path":"https://prioritizr.github.io/aoh/reference/st_repair_geometry.html","id":null,"dir":"Reference","previous_headings":"","what":"Repair geometry — st_repair_geometry","title":"Repair geometry — st_repair_geometry","text":"Repair geometry sf::st_sf() object.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/st_repair_geometry.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Repair geometry — st_repair_geometry","text":"","code":"st_repair_geometry(x, geometry_precision = 1e+05)"},{"path":"https://prioritizr.github.io/aoh/reference/st_repair_geometry.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Repair geometry — st_repair_geometry","text":"x sf::sf() object. geometry_precision numeric level precision processing spatial data (used sf::st_set_precision()). default 100000 (higher values indicate higher precision). Although level precision generally suitable fine-scale analyses, might result unnecessarily long computation times (e.g., 1500 suitable national-scale analyses). encounter geometry errors, increasing argument parameter can sometimes resolve issues.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/st_repair_geometry.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Repair geometry — st_repair_geometry","text":"function works first using sf::st_make_valid() function attempt fix geometry issues. Since sf::st_make_valid() function sometimes produce incorrect geometries rare cases (e.g., fixing invalid geometries cross dateline), function uses st_prepair() function prepr package fix geometries instead (see https://github.com/dickoa/prepr details).","code":""},{"path":"https://prioritizr.github.io/aoh/reference/st_repair_geometry.html","id":"installation","dir":"Reference","previous_headings":"","what":"Installation","title":"Repair geometry — st_repair_geometry","text":"function uses prepr package help repair geometries certain cases. prepr package available Comprehensive R Archive Network (CRAN), must installed online code repository. achieve , please use following code: Note prepr package system dependencies need installed package can installed (see package README file platform-specific instructions).","code":"if (!require(remotes)) install.packages(\"remotes\") remotes::install_github(\"dickoa/prepr\")"},{"path":"https://prioritizr.github.io/aoh/reference/st_repair_geometry.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Repair geometry — st_repair_geometry","text":"","code":"# create sf object p1 <- st_sf( id = 1, geometry = st_as_sfc(\"POLYGON((0 0, 0 10, 10 0, 10 10, 0 0))\", crs = 3857) ) # repair geometry p2 <- st_repair_geometry(p1) # print object print(p2) #> Simple feature collection with 1 feature and 1 field #> Geometry type: MULTIPOLYGON #> Dimension: XY #> Bounding box: xmin: 0 ymin: 0 xmax: 10 ymax: 10 #> Projected CRS: WGS 84 / Pseudo-Mercator #> id geometry #> 1 1 MULTIPOLYGON (((0 0, 0 10, ..."},{"path":"https://prioritizr.github.io/aoh/reference/system_gdal_version.html","id":null,"dir":"Reference","previous_headings":"","what":"System GDAL version — system_gdal_version","title":"System GDAL version — system_gdal_version","text":"Find version Geospatial Data Abstraction Library (GDAL) currently installed system.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/system_gdal_version.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"System GDAL version — system_gdal_version","text":"","code":"system_gdal_version()"},{"path":"https://prioritizr.github.io/aoh/reference/system_gdal_version.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"System GDAL version — system_gdal_version","text":"character value describing version GDAL installed. GDAL installed, missing (NA) value returned.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/system_gdal_version.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"System GDAL version — system_gdal_version","text":"","code":"# show version of GDAL installed print(system_gdal_version()) #> [1] \"3.6.4\""},{"path":"https://prioritizr.github.io/aoh/reference/terra_combine.html","id":null,"dir":"Reference","previous_headings":"","what":"Combine rasters — terra_combine","title":"Combine rasters — terra_combine","text":"Align combine list multiple terra::rast() objects single terra::rast() object multiple layers.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/terra_combine.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Combine rasters — terra_combine","text":"","code":"terra_combine(x)"},{"path":"https://prioritizr.github.io/aoh/reference/terra_combine.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Combine rasters — terra_combine","text":"x list terra::rast() objects.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/terra_combine.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Combine rasters — terra_combine","text":"terra::rast() object.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/terra_combine.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Combine rasters — terra_combine","text":"","code":"# create a raster x <- rast( ncols = 10, nrows = 10, xmin = 0, xmax = 10, ymin = 0, ymax = 10, crs = \"+proj=lcc +lat_1=48 +lat_2=33 +lon_0=-100 +datum=WGS84\" ) values(x) <- runif(ncell(x)) names(x) <- \"lyr1\" print(x) #> class : SpatRaster #> dimensions : 10, 10, 1 (nrow, ncol, nlyr) #> resolution : 1, 1 (x, y) #> extent : 0, 10, 0, 10 (xmin, xmax, ymin, ymax) #> coord. ref. : +proj=lcc +lat_0=0 +lon_0=-100 +lat_1=48 +lat_2=33 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs #> source(s) : memory #> name : lyr1 #> min value : 0.01479463 #> max value : 0.99543629 # create another raster y <- rast( ncols = 5, nrows = 5, xmin = 90, xmax = 95, ymin = 80, ymax = 85, crs = \"+proj=lcc +lat_1=48 +lat_2=33 +lon_0=-100 +datum=WGS84\" ) values(y) <- runif(ncell(y)) names(y) <- \"lyr2\" print(y) #> class : SpatRaster #> dimensions : 5, 5, 1 (nrow, ncol, nlyr) #> resolution : 1, 1 (x, y) #> extent : 90, 95, 80, 85 (xmin, xmax, ymin, ymax) #> coord. ref. : +proj=lcc +lat_0=0 +lon_0=-100 +lat_1=48 +lat_2=33 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs #> source(s) : memory #> name : lyr2 #> min value : 0.02622582 #> max value : 0.96173582 # combine them together z <- terra_combine(list(x, y)) # plot combined raster plot(z)"},{"path":"https://prioritizr.github.io/aoh/reference/terra_gdal_calc.html","id":null,"dir":"Reference","previous_headings":"","what":"GDAL calculate — terra_gdal_calc","title":"GDAL calculate — terra_gdal_calc","text":"function wrapper gdal_calc.py script use terra objects.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/terra_gdal_calc.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GDAL calculate — terra_gdal_calc","text":"","code":"terra_gdal_calc( x, expr, y = NULL, z = NULL, n_threads = 1, filename = tempfile(fileext = \".tif\"), datatype = \"FLT4S\", tiled = FALSE, bigtiff = FALSE, compress = \"LZW\", predictor = 1, nbits = NULL, verbose = TRUE, NAflag = NULL, output_raster = TRUE )"},{"path":"https://prioritizr.github.io/aoh/reference/terra_gdal_calc.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GDAL calculate — terra_gdal_calc","text":"x terra::rast() Raster object source data. expr character Value containing expression. y terra::rast() Optional raster calculations. z terra::rast() Optional raster calculations. n_threads integer Number computational threads use data processing. reduce run time, strongly recommended set parameter based available resources (see Examples section ). Defaults 1. filename character Filename output raster. Defaults tempfile(fileext = \".tif\"). datatype character Value indicating data type saving data. Defaults \"FLT4S\". tiled logical Value indicating GeoTIFF files tiled. Defaults FALSE. bigtiff logical Value indicating data stored BIGTIFF format. Defaults FALSE. compress character Value indicating compression format. Available options include \"LZW\" \"DEFLATE\". Defaults \"LZW\". predictor integer Predictor GeoTIFF compression (see GDAL documentation). Defaults 1 predictor used compression. nbits integer Number bits output data. Defaults NULL number bits automatically determined. verbose logical information displayed processing? Defaults TRUE. NAflag numeric Value representing missing (NA) values. \"none\" value can also used indicate flag set. Defaults NULL value determined automatically. output_raster logical raster (terra::rast()) object returned? FALSE file path resulting file returned. Defaults TRUE.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/terra_gdal_calc.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"GDAL calculate — terra_gdal_calc","text":"terra::rast() raster object.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/terra_gdal_calc.html","id":"troubleshooting","dir":"Reference","previous_headings":"","what":"Troubleshooting","title":"GDAL calculate — terra_gdal_calc","text":"function aims automatically determine best approach run gdal_calc.py script. However, always successful. , several environmental variables can configured manually specify exactly gdal_calc.py script executed. variables specify following behavior. GDAL_PYTHON Specifies file path Python executable used run gdal_calc.py script. example, variable configured : sys.setenv(\"GDAL_PYTHON\", \"python\"), sys.setenv(\"GDAL_PYTHON\", \"python3\"), sys.setenv(\"GDAL_PYTHON\", \"python.exe\"). GDAL_CALC Specifies file path gdal_calc.py script. example, variable configured : sys.setenv(\"GDAL_PYTHON\", \"gdal_calc.py\"), sys.setenv(\"GDAL_PYTHON\", \"C:\\\\OSGeo4W\\\\apps\\\\Python39\\\\Scripts\\\\gdal_calc.py\"). GDAL_ESCAPE Specifies whether symbols mathematical expressions used perform calculations escaped. Windows systems, default behavior escape symbols. behavior can disabled using following code: sys.setenv(\"GDAL_ESCAPE\", \"false\").","code":""},{"path":[]},{"path":"https://prioritizr.github.io/aoh/reference/terra_gdal_calc.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"GDAL calculate — terra_gdal_calc","text":"","code":"# please ensure that the Python and the GDAL system binaries are # installed to run the example, # see ?is_gdal_calc_available for more details # \\dontrun{ # create raster with data x <- rast( ncols = 40, nrows = 40, xmin = -110, xmax = -90, ymin = 40, ymax=60, crs = \"+proj=longlat +datum=WGS84\" ) values(x) <- seq_len(ncell(x)) # run calculation y <- terra_gdal_calc(x, \"(X < 20) * 1\") #> ℹ System command: gdal_calc.py -X \"/tmp/Rtmp06n6tE/file16f3fc7b89b3ae.tif\" --outfile=\"/tmp/Rtmp06n6tE/file16f3fc1ed27cfc.tif\" --calc=\"(X < 20) * 1\" --type=\"Float32\" --co=\"NUM_THREADS=1\" --co=\"COMPRESS=LZW\" --co=\"PREDICTOR=1\" # preview result print(y) #> class : SpatRaster #> dimensions : 40, 40, 1 (nrow, ncol, nlyr) #> resolution : 0.5, 0.5 (x, y) #> extent : -110, -90, 40, 60 (xmin, xmax, ymin, ymax) #> coord. ref. : lon/lat WGS 84 (EPSG:4326) #> source : file16f3fc1ed27cfc.tif #> name : lyr.1 # }"},{"path":"https://prioritizr.github.io/aoh/reference/terra_gdal_crop.html","id":null,"dir":"Reference","previous_headings":"","what":"Crop a raster using GDAL — terra_gdal_crop","title":"Crop a raster using GDAL — terra_gdal_crop","text":"function wrapper gdalUtilities::gdal_translate() use terra objects.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/terra_gdal_crop.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Crop a raster using GDAL — terra_gdal_crop","text":"","code":"terra_gdal_crop( x, ext, n_threads = 1, filename = tempfile(fileext = \".tif\"), datatype = \"FLT4S\", cache_limit = 200, tiled = FALSE, bigtiff = FALSE, compress = \"LZW\", verbose = TRUE, NAflag = NULL, output_raster = TRUE )"},{"path":"https://prioritizr.github.io/aoh/reference/terra_gdal_crop.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Crop a raster using GDAL — terra_gdal_crop","text":"x terra::rast() Raster object source data. ext terra::ext() Raster extent object. n_threads integer Number computational threads use data processing. reduce run time, strongly recommended set parameter based available resources (see Examples section ). Defaults 1. filename character Filename output raster. Defaults tempfile(fileext = \".tif\"). datatype character Value indicating data type saving data. Defaults \"FLT4S\". cache_limit integer Number MB use GDAL caching. Defaults 200. tiled logical Value indicating GeoTIFF files tiled. Defaults FALSE. bigtiff logical Value indicating data stored BIGTIFF format. Defaults FALSE. compress character Value indicating compression format. Available options include \"LZW\" \"DEFLATE\". Defaults \"LZW\". verbose logical information displayed processing? Defaults TRUE. NAflag numeric Value representing missing (NA) values. \"none\" value can also used indicate flag set. Defaults NULL value determined automatically. output_raster logical raster (terra::rast()) object returned? FALSE file path resulting file returned. Defaults TRUE.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/terra_gdal_crop.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Crop a raster using GDAL — terra_gdal_crop","text":"terra::rast() raster object.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/terra_gdal_crop.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Crop a raster using GDAL — terra_gdal_crop","text":"","code":"# please ensure that the gdalUtilities package is installed # to run this example # create raster with data x <- rast( ncols = 40, nrows = 40, xmin = -110, xmax = -90, ymin = 40, ymax=60, crs = \"+proj=longlat +datum=WGS84\" ) values(x) <- seq_len(ncell(x)) # create extent for cropping y <- ext(x) - c(5, 2.5, 1, 1.5) # crop data z <- terra_gdal_crop(x, y) # preview result print(z) #> class : SpatRaster #> dimensions : 35, 25, 1 (nrow, ncol, nlyr) #> resolution : 0.5, 0.5 (x, y) #> extent : -105, -92.5, 41, 58.5 (xmin, xmax, ymin, ymax) #> coord. ref. : lon/lat WGS 84 (EPSG:4326) #> source : file16f3fc6cf6deb5.tif #> name : lyr.1"},{"path":"https://prioritizr.github.io/aoh/reference/terra_gdal_project.html","id":null,"dir":"Reference","previous_headings":"","what":"Project a raster using GDAL — terra_gdal_project","title":"Project a raster using GDAL — terra_gdal_project","text":"function wrapper gdalUtilities::gdalwarp() use terra objects.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/terra_gdal_project.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Project a raster using GDAL — terra_gdal_project","text":"","code":"terra_gdal_project( x, y, method = \"bilinear\", n_threads = 1, filename = tempfile(fileext = \".tif\"), datatype = \"FLT4S\", cache_limit = 200, tiled = FALSE, bigtiff = FALSE, compress = \"LZW\", verbose = TRUE, NAflag = NULL, output_raster = TRUE )"},{"path":"https://prioritizr.github.io/aoh/reference/terra_gdal_project.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Project a raster using GDAL — terra_gdal_project","text":"x terra::rast() Raster object source data. y terra::rast() Raster object specifying spatial properties output data. method character Name interpolation method. n_threads integer Number computational threads use data processing. reduce run time, strongly recommended set parameter based available resources (see Examples section ). Defaults 1. filename character Filename output raster. Defaults tempfile(fileext = \".tif\"). datatype character Value indicating data type saving data. Defaults \"FLT4S\". cache_limit integer Number MB use GDAL caching. Defaults 200. tiled logical Value indicating GeoTIFF files tiled. Defaults FALSE. bigtiff logical Value indicating data stored BIGTIFF format. Defaults FALSE. compress character Value indicating compression format. Available options include \"LZW\" \"DEFLATE\". Defaults \"LZW\". verbose logical information displayed processing? Defaults TRUE. NAflag numeric Value representing missing (NA) values. \"none\" value can also used indicate flag set. Defaults NULL value determined automatically. output_raster logical raster (terra::rast()) object returned? FALSE file path resulting file returned. Defaults TRUE.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/terra_gdal_project.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Project a raster using GDAL — terra_gdal_project","text":"terra::rast() raster object.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/terra_gdal_project.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Project a raster using GDAL — terra_gdal_project","text":"","code":"# please ensure that the gdalUtilities package is installed # to run this example # create raster with data x <- rast( ncols = 40, nrows = 40, xmin = -110, xmax = -90, ymin = 40, ymax=60, crs = \"+proj=longlat +datum=WGS84\" ) values(x) <- seq_len(ncell(x)) # create raster to define spatial properties for projection y <- rast( ncols = 94, nrows = 124, xmin = -944881, xmax = 935118, ymin = 4664377, ymax = 7144377, crs = \"+proj=lcc +lat_1=48 +lat_2=33 +lon_0=-100 +datum=WGS84\" ) # project data z <- terra_gdal_project(x, y) # preview result print(z) #> class : SpatRaster #> dimensions : 124, 94, 1 (nrow, ncol, nlyr) #> resolution : 19999.99, 20000 (x, y) #> extent : -944881, 935118, 4664377, 7144377 (xmin, xmax, ymin, ymax) #> coord. ref. : +proj=lcc +lat_0=0 +lon_0=-100 +lat_1=48 +lat_2=33 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs #> source : file16f3fc7fb3778a.tif #> name : lyr.1"},{"path":"https://prioritizr.github.io/aoh/reference/terra_gdal_rasterize.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert vector data into a raster using GDAL — terra_gdal_rasterize","title":"Convert vector data into a raster using GDAL — terra_gdal_rasterize","text":"function wrapper gdalUtilities::gdal_rasterize() use terra objects.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/terra_gdal_rasterize.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert vector data into a raster using GDAL — terra_gdal_rasterize","text":"","code":"terra_gdal_rasterize( x, sf, burn = 1, init = 0, invert = FALSE, update = FALSE, touches = FALSE, n_threads = 1, filename = tempfile(fileext = \".tif\"), sf_filename = tempfile(fileext = \".gpkg\"), datatype = \"FLT4S\", cache_limit = 200, tiled = FALSE, bigtiff = FALSE, nbits = NULL, compress = \"LZW\", NAflag = NULL, verbose = TRUE, output_raster = TRUE )"},{"path":"https://prioritizr.github.io/aoh/reference/terra_gdal_rasterize.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert vector data into a raster using GDAL — terra_gdal_rasterize","text":"x terra::rast() Raster object source data. sf sf::st_sf() Spatial object rasterize. burn numeric Value encoding vector data. Defaults 1. init numeric Value encoding background cells overlap vector data. Defaults 0. invert logical burn process inverted? Defaults FALSE. update logical result producing updating argument x? FALSE argument x used specify spatial properties resulting raster (.e., values result), Defaults FALSE. touches logical cells x overlap part sf treated covered sf? Defaults FALSE, cells centroid covered sf treated covered. n_threads integer Number computational threads use data processing. reduce run time, strongly recommended set parameter based available resources (see Examples section ). Defaults 1. filename character Filename output raster. Defaults tempfile(fileext = \".tif\"). sf_filename character File name temporarily save argument sf. Defaults temporary (geopackage) file. datatype character Value indicating data type saving data. Defaults \"FLT4S\". cache_limit integer Number MB use GDAL caching. Defaults 200. tiled logical Value indicating GeoTIFF files tiled. Defaults FALSE. bigtiff logical Value indicating data stored BIGTIFF format. Defaults FALSE. nbits integer Number bits output data. Defaults NULL number bits automatically determined. compress character Value indicating compression format. Available options include \"LZW\" \"DEFLATE\". Defaults \"LZW\". NAflag numeric Value representing missing (NA) values. \"none\" value can also used indicate flag set. Defaults NULL value determined automatically. verbose logical information displayed processing? Defaults TRUE. output_raster logical raster (terra::rast()) object returned? FALSE file path resulting file returned. Defaults TRUE.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/terra_gdal_rasterize.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert vector data into a raster using GDAL — terra_gdal_rasterize","text":"terra::rast() raster object.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/terra_gdal_rasterize.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert vector data into a raster using GDAL — terra_gdal_rasterize","text":"","code":"# please ensure that the gdalUtilities package is installed # to run this example # import vector data f <- system.file(\"ex/lux.shp\", package = \"terra\") sf <- read_sf(f) # create template raster x <- rast(vect(sf), ncols = 75, nrows = 100) x <- terra::setValues(x, runif(terra::ncell(x))) # rasterize vector data z <- terra_gdal_rasterize(x, sf, burn = 5) # plot result plot(z)"},{"path":"https://prioritizr.github.io/aoh/news/index.html","id":"aoh-00214","dir":"Changelog","previous_headings":"","what":"aoh 0.0.2.14","title":"aoh 0.0.2.14","text":"Update create_spp_info_data() make data cleaning functionality robust BirdLife species’ range dataset. mammal speices terrestrial marine distributions (see inst/scripts/aoh-data.R) New built-helper script download species identifiers IUCN Red List (see inst/scripts/iucn-species-list.R)","code":""},{"path":"https://prioritizr.github.io/aoh/news/index.html","id":"aoh-00213","dir":"Changelog","previous_headings":"","what":"aoh 0.0.2.13","title":"aoh 0.0.2.13","text":"Update read_spp_range_data() create_spp_info_data() fix incompatibility issue latest version BirdLife species range dataset (#57). Thanks Jianqiao Zhao bug report. Update create_spp_aoh_data() create_spp_frc_data() provide correct error message argument x contain \"id_no\" column.","code":""},{"path":"https://prioritizr.github.io/aoh/news/index.html","id":"aoh-00212","dir":"Changelog","previous_headings":"","what":"aoh 0.0.2.12","title":"aoh 0.0.2.12","text":"Fix bug create_spp_info_data() assigning habitat types resident distributions migratory non-migratory species. bug meant () habitat types resident distributions migratory species include exclusively affiliated species’ passage distributions (ii) habitat types resident distributions non-migratory species include exclusively affiliated species’ passage distributions. Thanks Jianqiao Zhao bug report. Update built-testing data include multiple migratory species. Update internal R script creating test dataset (.e., inst/scripts/test-data.R) compatible current version package. Update is_gdal_calc_available() robust. Fix URLs.","code":""},{"path":"https://prioritizr.github.io/aoh/news/index.html","id":"aoh-00211","dir":"Changelog","previous_headings":"","what":"aoh 0.0.2.11","title":"aoh 0.0.2.11","text":"Fix bug create_spp_info_data() IUCN Red List API key can specified using key parameter. Fix aliasing package manual entry.","code":""},{"path":"https://prioritizr.github.io/aoh/news/index.html","id":"aoh-00210","dir":"Changelog","previous_headings":"","what":"aoh 0.0.2.10","title":"aoh 0.0.2.10","text":"Update prepr ggmap package dependencies.","code":""},{"path":"https://prioritizr.github.io/aoh/news/index.html","id":"aoh-0029","dir":"Changelog","previous_headings":"","what":"aoh 0.0.2.9","title":"aoh 0.0.2.9","text":"Remove rgdal package dependency. Updates URLs. Update functions downloading preprocessed data Zenodo. Update plot_spp_aoh_data() plot_spp_frc_data() compatible changes ggmap package creating maps basemap.","code":""},{"path":"https://prioritizr.github.io/aoh/news/index.html","id":"aoh-0028","dir":"Changelog","previous_headings":"","what":"aoh 0.0.2.8","title":"aoh 0.0.2.8","text":"Fix failing tests continuous integration services (due issues unzipping test files).","code":""},{"path":"https://prioritizr.github.io/aoh/news/index.html","id":"aoh-0027","dir":"Changelog","previous_headings":"","what":"aoh 0.0.2.7","title":"aoh 0.0.2.7","text":"Update read_spp_range_data() can import data zip file contains multiple ESRI Shapefiles (e.g., 2022-2 IUCN Red List release reptile data).","code":""},{"path":"https://prioritizr.github.io/aoh/news/index.html","id":"aoh-0026","dir":"Changelog","previous_headings":"","what":"aoh 0.0.2.6","title":"aoh 0.0.2.6","text":"Update create_spp_aoh_data() create_spp_frc_data() new rasterize_touches parameter (#48). parameter can toggled rasterizing species’ range data, raster cells partially overlap part species’ range treated covered species’ range. functionality may especially useful species small geographic ranges. Fix bug create_spp_aoh_data() create_spp_frc_data() causes Python errors using GDAL engine habitat_data elevation_data raster stored memory (associated file disk). Fix bug create_spp_aoh_data() create_spp_frc_data() causes GRASS engine throws errors. Update package dependency versions.","code":""},{"path":"https://prioritizr.github.io/aoh/news/index.html","id":"aoh-0025","dir":"Changelog","previous_headings":"","what":"aoh 0.0.2.5","title":"aoh 0.0.2.5","text":"Fix compatibility updates terra::compareGeom().","code":""},{"path":"https://prioritizr.github.io/aoh/news/index.html","id":"aoh-0024","dir":"Changelog","previous_headings":"","what":"aoh 0.0.2.4","title":"aoh 0.0.2.4","text":"Update data cleaning procedures create_spp_info_data() useful error message provided species excluded.","code":""},{"path":"https://prioritizr.github.io/aoh/news/index.html","id":"aoh-0023","dir":"Changelog","previous_headings":"","what":"aoh 0.0.2.3","title":"aoh 0.0.2.3","text":"Fix bug create_spp_aoh_data() using GRASS engine caused function throw error failed initialize new GRASS project correctly. Update get_spp_habitat_data(), get_spp_summary_data(), get_spp_threat_data(), get_spp_summary_data() functions throw warnings related dplyr package.","code":""},{"path":"https://prioritizr.github.io/aoh/news/index.html","id":"aoh-0022","dir":"Changelog","previous_headings":"","what":"aoh 0.0.2.2","title":"aoh 0.0.2.2","text":"New iucn_threat_data built-dataset denoting threat information IUCN Red List Threat Classification. Fix compatibility tests updates IUCN Red List. Fix compatibility tidyselect package (>= 1.2.0). Fix badges README. rgrass package now used GRASS functionality (due upcoming deprecation rgrass7 package).","code":""},{"path":"https://prioritizr.github.io/aoh/news/index.html","id":"aoh-0021","dir":"Changelog","previous_headings":"","what":"aoh 0.0.2.1","title":"aoh 0.0.2.1","text":"Update create_spp_info_data() data cleaning procedures replace 0 m lower elevation limits 500 m (#39). IUCN Red List assigns lower limit values 0 m many species parts distribution areas sea level. Update create_spp_info_data() data can processed using EPSG:4326 coordinate reference system. Instead throwing error, function now display alert. Fix bug create_spp_aoh_data() terra engine caused negative elevations rounded zero.","code":""},{"path":"https://prioritizr.github.io/aoh/news/index.html","id":"aoh-0020","dir":"Changelog","previous_headings":"","what":"aoh 0.0.2.0","title":"aoh 0.0.2.0","text":"Initial stable release. Add tests st_repair_geometry(). Add URLs citations README. Update references documentation.","code":""},{"path":"https://prioritizr.github.io/aoh/news/index.html","id":"aoh-0016","dir":"Changelog","previous_headings":"","what":"aoh 0.0.1.6","title":"aoh 0.0.1.6","text":"Fix spelling formatting mistakes vignette. Update st_repair_geometry() robust geometry issues.","code":""},{"path":"https://prioritizr.github.io/aoh/news/index.html","id":"aoh-0015","dir":"Changelog","previous_headings":"","what":"aoh 0.0.1.5","title":"aoh 0.0.1.5","text":"Update documentation create_spp_info_data() function. Update create_spp_info_data() function methodology used correct errors species’ elevational limits now follows best practices. behavior controlled using adjust_elevational_limits. elevational limits altered processing, can specified setting adjust_elevational_limits = FALSE. Update create_spp_info_data() function IUCN habitat codes adjusted assigned based guidelines identification Key Biodiversity Areas. Broadly speaking, guidelines assign IUCN habitat codes species’ distributions manner minimize omission errors. behavior controlled adjust_habitat_codes parameter. habitat codes assigned based exact matches (e.g., Resident distributions associated habitat codes described Resident distributions), can specified setting adjust_habitat_codes = FALSE. Update create_spp_info_data(), create_spp_aoh_data(), create_spp_frc_data(), calc_spp_frc_data() functions returned sf::st_sf() object now contains additional migratory column indicating species processed migratory species . Update create_spp_info_data(), create_spp_aoh_data(), create_spp_frc_data(), calc_spp_frc_data() functions order columns now places IUCN threat status information (.e., \"category\" column) closer start table. Update tests robust Zenodo website outages.","code":""},{"path":"https://prioritizr.github.io/aoh/news/index.html","id":"aoh-0014","dir":"Changelog","previous_headings":"","what":"aoh 0.0.1.4","title":"aoh 0.0.1.4","text":"Updatest_repair_geometry() avoid unneeded geometry duplication. reduces memory requirements forcrate_spp_info_data().","code":""},{"path":"https://prioritizr.github.io/aoh/news/index.html","id":"aoh-0013","dir":"Changelog","previous_headings":"","what":"aoh 0.0.1.3","title":"aoh 0.0.1.3","text":"Fix issues using GDAL engine processing data Windows. Specifically, package now correctly work GDAL Python bindings installed part OSGeo4W software (#32). Fix issues functions downloading datasets fail load data cache, needlessly re-download data. Fix issue attempting download data query data version numbers throw error due errors Zenodo API.","code":""},{"path":"https://prioritizr.github.io/aoh/news/index.html","id":"aoh-0012","dir":"Changelog","previous_headings":"","what":"aoh 0.0.1.2","title":"aoh 0.0.1.2","text":"Suppress meaningless warnings triggered GRASS macOS. Increase version requirement terra package. Fix IUCN Red List API tests.","code":""},{"path":"https://prioritizr.github.io/aoh/news/index.html","id":"aoh-0011","dir":"Changelog","previous_headings":"","what":"aoh 0.0.1.1","title":"aoh 0.0.1.1","text":"Improve test coverage. Convenience functions applying GDAL commands terra package objects now exported. functions include terra_gdal_calc(), terra_gdal_crop(), terra_gdal_project(), terra_gdal_rasterize(). Fix bug terra_gdal_project().","code":""},{"path":"https://prioritizr.github.io/aoh/news/index.html","id":"aoh-0010","dir":"Changelog","previous_headings":"","what":"aoh 0.0.1.0","title":"aoh 0.0.1.0","text":"Initial developmental release.","code":""},{"path":"https://prioritizr.github.io/aoh/news/index.html","id":"aoh-00099999","dir":"Changelog","previous_headings":"","what":"aoh 0.0.0.99999","title":"aoh 0.0.0.99999","text":"Initial work developing package.","code":""}] +[{"path":"https://prioritizr.github.io/aoh/articles/aoh.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Getting started","text":"Area Habitat (AOH) maps aim delineate spatial distribution suitable habitat species (Brooks et al. 2019). used assess performance protected area systems, measure impacts threats biodiversity, identify priorities conservation actions (Tracewski et al. 2016; Rondinini et al. 2005; Durán et al. 2020). maps generally produced obtaining geographic range data species, removing areas contain suitable habitat occur outside known elevational limits species (Brooks et al. 2019). help make maps accessible, aoh R package provides routines automatically creating Area Habitat data based International Union Conservation Nature (IUCN) Red List Threatened Species. manually downloading species range data IUCN Red List, users can import (using read_spp_range_data()), prepare collate additional information subsequent processing (using create_spp_info_data()), create Area Habitat data (using create_spp_aoh_data()). Global elevation habitat classification data automatically downloaded (Robinson et al. 2014; Jung et al. 2020; Lumbierres et al. 2021), data species’ habitat preferences elevational limits obtained automatically using IUCN Red List API. Since accessing IUCN Red List requires token, users may need obtain token update R configuration recognize token (see README details).","code":""},{"path":"https://prioritizr.github.io/aoh/articles/aoh.html","id":"tutorial","dir":"Articles","previous_headings":"","what":"Tutorial","title":"Getting started","text":"provide tutorial using aoh R package. tutorial, generate Area Habitat data following Iberian species: Pyrenean brook salamander (Calotriton asper), Iberian frog (Rana iberica), western spadefoot toad (Pelobates cultripes), golden striped salamnader (Chioglossa lusitanica). start , load package. also load rappdirs R package cache data, terra ggplot2 R packages visualize results. Now import range data species. Although users typically obtain range data International Union Conservation Nature (IUCN) Red List Threatened Species, use built-species range data distributed package convenience. Please note data obtained IUCN Red List, manually generated using occurrence records Global Biodiversity Information Facility. Next, prepare range data generating Area Habitat data. procedure – addition repairing geometry issues spatial data – obtain information species’ habitat preferences elevational limits (via IUCN Red List Threatened Species). also specify folder cache downloaded data won’t need re-download subsequent runs. can now generate Area Habitat data species. default, data generated using elevation data derived Robinson et al. (2014) habitat data derived Lumbierres et al. (2021). Similar , also specify folder cache downloaded datasets won’t need re-downloaded subsequent runs. running code, see displayed message telling us certain habitat classes available (.e., \"7.1\", \"7.2\"). fine. error. reason see message although global habitat dataset contains majority IUCN habitat classes terrestrial environments, contain every single IUCN habitat class (see Lumbierres et al. 2021 details). Upon checking IUCN habitat classes, can see classes correspond artificial aquatic areas also caves subterranean environments. Although failing account habitats potentially issue, assume accounting species’ non-subterranean habitats sufficient describe spatial distribution (Ficetola et al. 2014). generating Area Habitat data, can import . can see Area Habitat data species stored separate spatial (raster) datasets different extents. Although useful drastically reduces total size data species, can make difficult work data multiple species. address , can use terra_combine() function automatically align combine spatial data species’ distributions single spatial dataset. Finally, let’s create maps compare range data Area habitat data. Although create maps manually (e.g., using ggplot2 R package), use plotting function distributed aoh R package convenience.","code":"# load packages library(aoh) library(terra) library(rappdirs) library(ggplot2) # find file path for data path <- system.file(\"extdata\", \"EXAMPLE_SPECIES.zip\", package = \"aoh\") # import data spp_range_data <- read_spp_range_data(path) # preview data print(spp_range_data) ## Simple feature collection with 4 features and 26 fields ## Geometry type: POLYGON ## Dimension: XY ## Bounding box: xmin: -9.479736 ymin: 36.59422 xmax: 3.302702 ymax: 43.76455 ## Geodetic CRS: WGS 84 ## # A tibble: 4 × 27 ## id_no binomial presence origin seasonal compiler yrcompiled citation ## ## 1 979 Alytes dickhilleni 1 1 1 Derived… NA NA ## 2 59448 Calotriton asper 1 1 1 Derived… NA NA ## 3 4657 Chioglossa lusita… 1 1 1 Derived… NA NA ## 4 58622 Rana iberica 1 1 1 Derived… NA NA ## # ℹ 19 more variables: subspecies , subpop , source , ## # island , tax_comm , dist_comm , generalisd , ## # legend , kingdom , phylum , class , order_ , ## # family , genus , category , marine , terrestial , ## # freshwater , geometry # specify cache directory cache_dir <- user_data_dir(\"aoh\") # create cache_dir if needed if (!file.exists(cache_dir)) { dir.create(cache_dir, showWarnings = FALSE, recursive = TRUE) } # prepare information spp_info_data <- create_spp_info_data(spp_range_data, cache_dir = cache_dir) # specify cache directory cache_dir <- user_data_dir(\"aoh\") # specify folder to save Area of Habitat data ## although we use a temporary directory here to avoid polluting your computer ## with examples files, you would normally specify the folder ## on your computer where you want to save data output_dir <- tempdir() # generate Area of Habitat data ## note that this function might take a complete because it will need to ## download the global habitat and elevation data that first time you run it. spp_aoh_data <- create_spp_aoh_data( spp_info_data, output_dir = output_dir, cache_dir = cache_dir ) # preview results ## resulting dataset is a simple features (sf) object containing ## spatial geometries for cleaned versions of the range data ## (in the geometry column) and the following additional columns: ## ## - id_no : IUCN Red List taxon identifier ## - seasonal : integer identifier for seasonal distributions ## - category : character IUCN Red List threat category ## - full_habitat_code: All IUCN Red List codes for suitable habitat classes ## (multiple codes are delimited using \"|\" symbols) ## - habitat_code : IUCN Red List codes for suitable habitat classes ## used to create AOH maps ## - elevation_lower : lower limit for the species on IUCN Red List ## - elevation_upper : upper limit for the species on IUCN Red List ## - xmin : minimum x-coordinate for Area of Habitat data ## - xmax : maximum x-coordinate for Area of Habitat data ## - ymin : minimum y-coordinate for Area of Habitat data ## - ymax : maximum y-coordinate for Area of Habitat data ## - path : file path for Area of Habitat data (GeoTIFF format) ## ## since data obtained from the IUCN Red List cannot be redistributed, ## we will only show some of the columns in this object ## ## N.B., you can view all columns on your computer with: ##> print(spp_aoh_data, width = Inf) print(spp_aoh_data[, c(\"id_no\", \"binomial\", \"seasonal\", \"path\")]) ## Simple feature collection with 4 features and 4 fields ## Geometry type: POLYGON ## Dimension: XY ## Bounding box: xmin: -914664.9 ymin: 4364387 xmax: 318665.2 ymax: 5066721 ## Projected CRS: World_Behrmann ## # A tibble: 4 × 5 ## id_no binomial seasonal path geometry ## ## 1 979 Alytes dickhilleni 1 /tmp/Rtmp5rXUb… ((-105506.8 4465112, -10… ## 2 59448 Calotriton asper 1 /tmp/Rtmp5rXUb… ((-238681 5029057, -2377… ## 3 4657 Chioglossa lusitanica 1 /tmp/Rtmp5rXUb… ((-859201.6 4559278, -85… ## 4 58622 Rana iberica 1 /tmp/Rtmp5rXUb… ((-849801.9 4614149, -84… # import the Area of Habitat data ## since the data for each species have a different spatial extent ## (to reduce file sizes), we will import each dataset separately in a list spp_aoh_rasters <- lapply(spp_aoh_data$path, rast) # preview raster data print(spp_aoh_rasters) ## [[1]] ## class : SpatRaster ## dimensions : 2593, 3701, 1 (nrow, ncol, nlyr) ## resolution : 100, 100 (x, y) ## extent : -467931, -97831, 4364377, 4623677 (xmin, xmax, ymin, ymax) ## coord. ref. : World_Behrmann ## source : 979_1.tif ## name : lyr1 ## min value : 0 ## max value : 1 ## ## [[2]] ## class : SpatRaster ## dimensions : 2266, 5670, 1 (nrow, ncol, nlyr) ## resolution : 100, 100 (x, y) ## extent : -248331, 318669, 4838277, 5064877 (xmin, xmax, ymin, ymax) ## coord. ref. : World_Behrmann ## source : 59448_1.tif ## name : lyr1 ## min value : 0 ## max value : 1 ## ## [[3]] ## class : SpatRaster ## dimensions : 5149, 5361, 1 (nrow, ncol, nlyr) ## resolution : 100, 100 (x, y) ## extent : -914731, -378631, 4551877, 5066777 (xmin, xmax, ymin, ymax) ## coord. ref. : World_Behrmann ## source : 4657_1.tif ## name : lyr1 ## min value : 0 ## max value : 1 ## ## [[4]] ## class : SpatRaster ## dimensions : 4978, 7512, 1 (nrow, ncol, nlyr) ## resolution : 100, 100 (x, y) ## extent : -904331, -153131, 4568977, 5066777 (xmin, xmax, ymin, ymax) ## coord. ref. : World_Behrmann ## source : 58622_1.tif ## name : lyr1 ## min value : 0 ## max value : 1 # combine raster data spp_aoh_rasters <- terra_combine(spp_aoh_rasters) # assign identifiers to layer names names(spp_aoh_rasters) <- paste0( \"AOH_\", spp_aoh_data$id_no, \"_\", spp_aoh_data$seasonal ) # preview raster data print(spp_aoh_rasters) ## class : SpatRaster ## dimensions : 7024, 12334, 4 (nrow, ncol, nlyr) ## resolution : 100, 100 (x, y) ## extent : -914731, 318669, 4364377, 5066777 (xmin, xmax, ymin, ymax) ## coord. ref. : World_Behrmann ## source(s) : memory ## varnames : 979_1 ## 59448_1 ## 4657_1 ## ... ## names : AOH_979_1, AOH_59448_1, AOH_4657_1, AOH_58622_1 ## min values : 0, 0, 0, 0 ## max values : 1, 1, 1, 1 # create maps ## N.B. you might need to install the ggmap package to create the maps map <- plot_spp_aoh_data( spp_aoh_data, zoom = 6, maptype = \"stamen_toner_background\" ) + scale_fill_viridis_d() + scale_color_manual(values = c(\"range\" = \"red\")) + scale_size_manual(values = c(\"range\" = 0.5)) + theme( axis.title = element_blank(), axis.text = element_text(size = 6), strip.text = element_text(color = \"white\"), strip.background = element_rect(fill = \"black\", color = \"black\") ) ## |---------|---------|---------|---------|========================================= # display maps print(map)"},{"path":"https://prioritizr.github.io/aoh/articles/aoh.html","id":"frequently-asked-questions","dir":"Articles","previous_headings":"","what":"Frequently asked questions","title":"Getting started","text":"provide answers frequently asked questions encountered using package. see following error message Error: need API key Red List data, resolve ? error message indicates need obtain token access IUCN Red List API, need complete setup process R can use token. details resolving issue, please see details obtaining access IUCN Red List API. previously completed set procedures still receive error message, please try completing . obtain access IUCN Red List API? need obtain token access IUCN Red List API (one already). achieve , please visit IUCN API website (https://apiv3.iucnredlist.org/), click “Generate token” link top web page, fill form apply token. receive token shortly completing form (immediately). receiving token, need complete additional steps R can use token access IUCN Red List API. Please open .Renviron file computer (e.g., using usethis::edit_r_environ()). Next, please add following text file (replacing string token) save file: Please restart R session. now able access IUCN Red List API. verify , please try running following R code – assuming everything works correctly – see current version IUCN Red List: instructions work, please consult documentation rredlist R package details. can find species range data generating Area Habitat data? Species range data can obtained IUCN Red List (see Spatial Data Download resources). can also obtained data sources (see question details). keep seeing message Error x$.self$finalize() : attempt apply non-function, mean? message commonly encountered using terra package large datasets. Although currently known solution prevent message appearing, message can safely ignored (see details). message stop R completing spatial data processing – meaning R continue processing data even message displayed – underlying cause message thought result incorrect calculations. Can produce Area Habitat data thousands species globally? Yes, package can generate Area Habitat data terrestrial amphibians, mammals, birds, reptiles. accomplish , need system least 16 Gb RAM 65 Gb disk space. processing take couple days (e.g., processing amphibian species) weeks (e.g., processing bird species) complete. example script processing global data available online code repository (see ). Additionally, since lot memory required process data bird species globally, recommended split full dataset containing bird species multiple chunks (e.g., six chunks) process chunks separately. can speed processing Area Habitat data? create_spp_aoh_data() function can use different software engines data processing (specified via engine parameter). Although engine produces results, engines computationally efficient others. default \"terra\" engine uses terra package processing. Although engine easy install fast small datasets, scale well larger datasets. generally recommended use \"gdal\" engine cases possible. Although \"gdal\" engine requires installation additional software (see package README instructions), much faster engines. Additionally, \"grass\" engine also available. engine can faster \"terra\" engine processing many species across large spatial extents. However, benchmarks indicate slower \"gdal\" engine. Can use species range data data sources (instead IUCN Red List)? Yes, can use species range data variety sources. example, species range data obtained governmental (e.g., data federally listed species Canada available Government Canada data portal) non-governmental organizations (e.g., Botanical Information Ecology Network Map Life). data can also produced using observation records (e.g., following Palacio et al. 2021) data repositories (e.g., Global Biodiversity Information Facility Atlas Living Australia). obtaining species range data, need formatted follow data format conventions used IUCN Red List. means species range data must contain following columns: id_no, presence, origin, seasonal, terrestrial (terrestial), freshwater, marine. details values columns contain, please see Species range data format section documentation create_spp_info_data() IUCN Red List documentation. Additionally, note wish use IUCN Red List specifying habitat preference data, please ensure id_no specified species follows taxon identifiers used IUCN Red List. example, tutorial used manually generated species range data Pyrenean brook salamander (Calotriton asper). ensure correct habitat preference data obtained species IUCN Red List, id_no value specified species specified 59448. Can use species elevational limit data sources? Yes, can use elevational limit data sources. example, birds important use “Occasional minimum altitude” “Occasional maximum altitude” estimates species coded IUCN Red List. data available request BirdLife International (please contact science@birdlife.org). use data, need manually create table containing species’ summary information. table need contain information species’ elevational limits, well habitat preferences threat status (see get_spp_summary_data() correct format). preparing data, can used collate information needed processing Area Habitat data (via create_spp_info_data()) , turn, create Area Habitat data (via create_spp_aoh_data()). Can use elevation data data sources? Yes, can use elevation data variety sources. example, elevation data derived NASA’s Shuttle Radar Topography Mission (SRTM). preparing elevation data, can used create Area Habitat data (via create_spp_aoh_data()). information, see Customization vignette. Can use habitat classification data data sources? Yes, can use habitat classification data variety sources. example, habitat classification data derived Copernicus Corine Land Cover, MODIS Land Cover data (MCD12Q1)). use data, also need develop crosswalk table specify land cover (habitat) classes correspond habitat classes defined IUCN Red List Habitat Classification Scheme (e.g., see Tracewski et al. 2016; Lumbierres et al. 2021). preparing habitat classification data crosswalk table, can used create Area Habitat data (via create_spp_aoh_data()). information, see Customization vignette. output Area Habitat data different spatial extents, can combine together? terra_combine() function can used align combine list raster terra::rast() objects single object. Note procedure recommended species occur geographic region. Please see tutorial example using function combine Area Habitat data multiple species single object.","code":"IUCN_REDLIST_KEY=\"your_actual_token_not_this_string\" # verify access to IUCN Red List API rredlist::rl_version()"},{"path":"https://prioritizr.github.io/aoh/articles/aoh.html","id":"conclusion","dir":"Articles","previous_headings":"","what":"Conclusion","title":"Getting started","text":"Hopefully, vignette provided useful introduction package. encounter issues running code tutorial – adapting code work – please see following section. Additionally, questions using package suggestions improving , please file issue package’s online code repository.","code":""},{"path":[]},{"path":"https://prioritizr.github.io/aoh/articles/customization.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Customization","text":"aoh R package provides flexible framework generating Area Habitat data. default, use elevation data derived Robinson et al. (2014) habitat classification data derived Lumbierres et al. (2021). defaults also include using species’ elevational limit habitat preference data International Union Conservation Nature (IUCN) Red List Threatened Species. addition defaults, provides built-functions use habitat classification derived data sources (e.g., Jung et al. 2020). package can also used generate Area Habitat data using datasets manually created user. example, used produce Area Habitat data using habitat classification data derived Copernicus Corine Land Cover data species’ elevational limit data BirdLife Data Zone.","code":""},{"path":"https://prioritizr.github.io/aoh/articles/customization.html","id":"tutorial","dir":"Articles","previous_headings":"","what":"Tutorial","title":"Customization","text":"show Area Habitat data can generated using particular datasets (rather default datasets). tutorial, manually import data use generate Area Habitat data. previously read Getting started vignette, strongly recommended provide introduction package. start , load package. also load rappdirs package cache data, tibble package storing tabular data, terra ggplot2 R packages visualize results. Now import geographic range data species. Although users typically obtain data IUCN Red List, import example data distributed package. Please note data obtained IUCN Red List, generated using random simulations. Next, import data describe species’ habitat preferences. Although data automatically obtained IUCN Red List default (using get_spp_habitat_data() function), import example data distributed package. , please note data obtained IUCN Red List, randomly generated. wish use data, please ensure follow exactly conventions (e.g., column names, data types, character values \"suitability\" \"season\" columns). Next, import data describe species’ elevational limits. Although data automatically obtained IUCN Red List default (using get_spp_summary_data() function), import example data distributed package. , please note data obtained IUCN Red List, randomly generated. Since dataset contains additional columns aren’t strictly necessary, also update include necessary columns. wish use data, please ensure follow conventions (e.g., column names, data types). importing datasets species data, important ensure every species associated geographic range, habitat preference, summary data. , \"id_no\" column values used denote different taxa—meaning species unique identifier. identifiers used cross-referencing datasets. example, species named \"Simulus spp. 670\" identifier (\"id_no\" value) 670, identifier used denote range spp_range_data dataset, habitat preferences spp_habitat_data dataset, elevational limits spp_summary_data dataset. can verify species required information across three datasets using following code. now import elevation data. Although data automatically imported default (using get_global_elevation_data() function), import example data distributed package. Next, import habitat classification data. Although data automatically imported default (using get_lumb_cgls_habitat_data() function), import example data distributed package. Critically, elevation data habitat classification data must exactly spatial properties. means must coordinate reference system, resolution, spatial extent. using elevation habitat classification data previously prepared (manually download online sources), may need resample (reproject) data ensure datasets spatial properties using geographic information system (GIS). example, data resampled using ESRI ArcGIS, QGIS, terra R package, gdalUtilities R package. can verify elevation habitat classification datasets spatial properties using following code. now import crosswalk table habitat classification data. crosswalk table specifies pixel values habitat classification data correspond IUCN habitat classes. table can specify one--one relationships (e.g., pixel value 12 corresponds IUCN class 1.1), one--many relationships (e.g., pixel values 12 corresponds IUCN classes 1.1 1.2), many--many relationships (e.g., pixel values 12 13 correspond IUCN classes 1.1 1.2). Although data automatically imported default (.e., crosswalk_lumb_cgls_data built-dataset), import example data distributed package. using habitat classification data, please ensure follows format (.e., column names data types). importing data, can clean collate information together generating Area Habitat data. Next, can generate Area Habitat data. Finally, let’s create maps compare range data Area habitat data. Although create maps manually (e.g., using ggplot2 R package), use plotting function distributed aoh R package convenience. Although full dataset contains many species; brevity, show first four species’ seasonal distributions.","code":"# load packages library(aoh) library(terra) library(tibble) library(rappdirs) library(ggplot2) # find file path for data spp_range_path <- system.file( \"testdata\", \"SIMULATED_SPECIES.zip\", package = \"aoh\" ) # import data spp_range_data <- read_spp_range_data(spp_range_path) # preview data ## dataset follows the same format as the IUCN Red List spatial data print(spp_range_data) ## Simple feature collection with 34 features and 26 fields ## Geometry type: MULTIPOLYGON ## Dimension: XY ## Bounding box: xmin: -9.497 ymin: 36.01108 xmax: 3.318 ymax: 43.793 ## Geodetic CRS: WGS 84 ## # A tibble: 34 × 27 ## id_no seasonal presence origin binomial compiler yrcompiled citation ## ## 1 670 2 1 1 Simulus spp. 670 Simulat… NA NA ## 2 670 3 1 1 Simulus spp. 670 Simulat… NA NA ## 3 670 4 1 1 Simulus spp. 670 Simulat… NA NA ## 4 2072 1 1 1 Simulus spp. 2072 Simulat… NA NA ## 5 2072 1 4 4 Simulus spp. 2072 Simulat… NA NA ## 6 2072 1 3 3 Simulus spp. 2072 Simulat… NA NA ## 7 2072 1 3 5 Simulus spp. 2072 Simulat… NA NA ## 8 2374 1 1 1 Simulus spp. 2374 Simulat… NA NA ## 9 2374 1 4 2 Simulus spp. 2374 Simulat… NA NA ## 10 2374 1 5 2 Simulus spp. 2374 Simulat… NA NA ## # ℹ 24 more rows ## # ℹ 19 more variables: subspecies , subpop , source , ## # island , tax_comm , dist_comm , generalisd , ## # legend , kingdom , phylum , class , order_ , ## # family , genus , category , marine , terrestial , ## # freshwater , geometry # visualize data ## each panel corresponds to a different seasonal distribution of a species map <- ggplot() + geom_sf(data = spp_range_data, fill = \"darkblue\") + facet_wrap(~ id_no + seasonal) print(map) # find file path for species habitat preference data spp_habitat_path <- system.file( \"testdata\", \"sim_spp_habitat_data.csv\", package = \"aoh\" ) # import species habitat preference data spp_habitat_data <- read.csv(spp_habitat_path, sep = \",\", header = TRUE) spp_habitat_data <- as_tibble(spp_habitat_data) # preview data print(spp_habitat_data, n = Inf) ## # A tibble: 42 × 6 ## id_no code habitat suitability season majorimportance ## ## 1 670 14.5 Urban Areas Suitable Breed… NA ## 2 670 14.2 Pastureland Suitable Breed… NA ## 3 670 4.4 Grassland - Temperate Suitable Non-b… NA ## 4 670 3.5 Shrubland - Subtropical/tropi… Suitable Non-b… NA ## 5 670 6 Rocky Areas (e.g., inland cli… Suitable Non-b… NA ## 6 670 1.5 Forest - Subtropical/tropical… Suitable Passa… NA ## 7 670 3.8 Shrubland - Mediterranean-typ… Suitable Passa… NA ## 8 670 3.4 Shrubland - Temperate Suitable Passa… NA ## 9 2072 3.8 Shrubland - Mediterranean-typ… Suitable Resid… NA ## 10 2072 1.4 Forest - Temperate Suitable Resid… NA ## 11 2072 2.1 Savanna - Dry Suitable Resid… NA ## 12 2374 4.4 Grassland - Temperate Suitable Resid… NA ## 13 2374 2.1 Savanna - Dry Suitable Resid… NA ## 14 2374 14.5 Urban Areas Suitable Resid… NA ## 15 3667 1.4 Forest - Temperate Suitable Resid… NA ## 16 3667 3.5 Shrubland - Subtropical/tropi… Suitable Resid… NA ## 17 3667 3.8 Shrubland - Mediterranean-typ… Suitable Resid… NA ## 18 4421 3.5 Shrubland - Subtropical/tropi… Suitable Resid… NA ## 19 4421 4.4 Grassland - Temperate Suitable Resid… NA ## 20 4650 3.8 Shrubland - Mediterranean-typ… Suitable Resid… NA ## 21 4650 4.4 Grassland - Temperate Suitable Resid… NA ## 22 4650 14.5 Urban Areas Suitable Resid… NA ## 23 5808 14.5 Urban Areas Suitable Resid… NA ## 24 5808 14.1 Arable Land Suitable Resid… NA ## 25 5808 14.2 Pastureland Suitable Resid… NA ## 26 5808 3.8 Shrubland - Mediterranean-typ… Suitable Breed… NA ## 27 5808 4.1 Grassland - Tundra Suitable Breed… NA ## 28 5808 2.1 Savanna - Dry Suitable Breed… NA ## 29 5808 14.1 Arable Land Suitable Non-b… NA ## 30 5808 5.5 Wetlands (inland) - Permanent… Suitable Non-b… NA ## 31 5808 3.8 Shrubland - Mediterranean-typ… Suitable Passa… NA ## 32 5808 5.5 Wetlands (inland) - Permanent… Suitable Passa… NA ## 33 5808 4 Grassland Suitable Passa… NA ## 34 6701 3.8 Shrubland - Mediterranean-typ… Suitable Resid… NA ## 35 6701 5.5 Wetlands (inland) - Permanent… Suitable Resid… NA ## 36 6701 4.1 Grassland - Tundra Suitable Resid… NA ## 37 8110 3.8 Shrubland - Mediterranean-typ… Suitable Resid… NA ## 38 8110 1.4 Forest - Temperate Suitable Resid… NA ## 39 8110 14.5 Urban Areas Suitable Resid… NA ## 40 8644 3.4 Shrubland - Temperate Suitable Resid… NA ## 41 8644 14.5 Urban Areas Suitable Resid… NA ## 42 8644 5 Wetlands (inland) Suitable Resid… NA # find file path for species habitat preference data spp_summary_path <- system.file( \"testdata\", \"sim_spp_summary_data.csv\", package = \"aoh\" ) # import species habitat preference data spp_summary_data <- read.csv(spp_summary_path, sep = \",\", header = TRUE) spp_summary_data <- as_tibble(spp_summary_data) # extract only necessary columns col_names <- c(\"id_no\", \"elevation_lower\", \"elevation_upper\", \"category\") spp_summary_data <- spp_summary_data[, col_names, drop = FALSE] # preview data print(spp_summary_data, n = Inf) ## # A tibble: 10 × 4 ## id_no elevation_lower elevation_upper category ## ## 1 670 82 942 LC ## 2 2072 46 907 NT ## 3 2374 65 1020 VU ## 4 3667 15 598 EN ## 5 4421 85 949 VU ## 6 4650 54 951 NT ## 7 5808 91 974 VU ## 8 6701 221 1069 EN ## 9 8110 75 991 VU ## 10 8644 182 1183 LC # verify all identifiers in range data are present in habitat preference data ## if we see TRUE: then this means both datasets have the same taxa identifiers ## if we see FALSE: then some taxa identifiers are missing from one dataset setequal(spp_range_data$id_no, spp_habitat_data$id_no) ## [1] TRUE # verify all identifiers in range data are present in summary data ## if we see TRUE: then this means both datasets have the same taxa identifiers ## if we see FALSE: then some taxa identifiers are missing from one dataset setequal(spp_range_data$id_no, spp_summary_data$id_no) ## [1] TRUE # find file path for elevation data elevation_path <- system.file( \"testdata\", \"sim_elevation_data.tif\", package = \"aoh\" ) # import elevation data elevation_data <- rast(elevation_path) # preview data print(elevation_data) ## class : SpatRaster ## dimensions : 792, 1268, 1 (nrow, ncol, nlyr) ## resolution : 1000, 1000 (x, y) ## extent : -929631, 338369, 4289077, 5081077 (xmin, xmax, ymin, ymax) ## coord. ref. : World_Behrmann ## source : sim_elevation_data.tif ## name : dem-100m-esri54017 ## min value : -4 ## max value : 3260 # visualize data plot(elevation_data, main = \"Elevation data\") # find file path for elevation data habitat_path <- system.file( \"testdata\", \"sim_habitat_data.tif\", package = \"aoh\" ) # import habitat classification data habitat_data <- rast(habitat_path) # preview data print(habitat_data) ## class : SpatRaster ## dimensions : 792, 1268, 1 (nrow, ncol, nlyr) ## resolution : 1000, 1000 (x, y) ## extent : -929631, 338369, 4289077, 5081077 (xmin, xmax, ymin, ymax) ## coord. ref. : World_Behrmann ## source : sim_habitat_data.tif ## name : jung-lvl2-10-5281_zenodo-4058819 ## min value : 104 ## max value : 1405 # visualize data plot(habitat_data, main = \"Habitat classification data\") # verify that elevation and habitat classification data have same properties ## if we see TRUE, this means they have the same spatial properties. ## otherwise, if we see an error, then this means that they do not have ## have the same spatial properties and require updating compareGeom(elevation_data, habitat_data) ## [1] TRUE # find file path for crosswalk data crosswalk_path <- system.file( \"testdata\", \"sim_crosswalk.csv\", package = \"aoh\" ) # import crosswalk data crosswalk_data <- read.csv(crosswalk_path, sep = \",\", header = TRUE) crosswalk_data <- as_tibble(crosswalk_data) # print table ## code column contains codes for the IUCN habitat classes ## value column contains values in the habitat classification data print(crosswalk_data, n = Inf) ## # A tibble: 126 × 2 ## code value ## ## 1 1 100 ## 2 1.1 101 ## 3 1.2 102 ## 4 1.3 103 ## 5 1.4 104 ## 6 1.5 105 ## 7 1.6 106 ## 8 1.7 107 ## 9 1.8 108 ## 10 1.9 109 ## 11 2 200 ## 12 2.1 201 ## 13 2.2 202 ## 14 3 300 ## 15 3.1 301 ## 16 3.2 302 ## 17 3.3 303 ## 18 3.4 304 ## 19 3.5 305 ## 20 3.6 306 ## 21 3.7 307 ## 22 3.8 308 ## 23 4 400 ## 24 4.1 401 ## 25 4.2 402 ## 26 4.3 403 ## 27 4.4 404 ## 28 4.5 405 ## 29 4.6 406 ## 30 4.7 407 ## 31 5 500 ## 32 5.1 501 ## 33 5.2 502 ## 34 5.3 503 ## 35 5.4 504 ## 36 5.5 505 ## 37 5.6 506 ## 38 5.7 507 ## 39 5.8 508 ## 40 5.9 509 ## 41 5.10 510 ## 42 5.11 511 ## 43 5.12 512 ## 44 5.13 513 ## 45 5.14 514 ## 46 5.15 515 ## 47 5.16 516 ## 48 5.17 517 ## 49 5.18 518 ## 50 6 600 ## 51 7 700 ## 52 7.1 701 ## 53 7.2 702 ## 54 8 800 ## 55 8.1 801 ## 56 8.2 802 ## 57 8.3 803 ## 58 9 900 ## 59 9.1 901 ## 60 9.2 902 ## 61 9.3 903 ## 62 9.4 904 ## 63 9.5 905 ## 64 9.6 906 ## 65 9.7 907 ## 66 9.8 908 ## 67 9.8.1 981 ## 68 9.8.2 982 ## 69 9.8.3 983 ## 70 9.8.4 984 ## 71 9.8.5 985 ## 72 9.8.6 986 ## 73 9.9 909 ## 74 9.10 910 ## 75 10 1000 ## 76 10.1 1001 ## 77 10.2 1002 ## 78 10.3 1003 ## 79 10.4 1004 ## 80 11 1100 ## 81 11.1 1101 ## 82 11.1.1 1111 ## 83 11.2 1102 ## 84 11.1.2 1112 ## 85 11.3 1103 ## 86 11.4 1104 ## 87 11.5 1105 ## 88 11.6 1106 ## 89 12 1200 ## 90 12.1 1201 ## 91 12.2 1202 ## 92 12.3 1203 ## 93 12.4 1204 ## 94 12.5 1205 ## 95 12.7 1207 ## 96 12.6 1206 ## 97 13 1300 ## 98 13.1 1301 ## 99 13.2 1302 ## 100 13.3 1303 ## 101 13.4 1304 ## 102 13.5 1305 ## 103 14 1400 ## 104 14.1 1401 ## 105 14.2 1402 ## 106 14.3 1403 ## 107 14.4 1404 ## 108 14.5 1405 ## 109 14.6 1406 ## 110 15 1500 ## 111 15.1 1501 ## 112 15.2 1502 ## 113 15.3 1503 ## 114 15.4 1504 ## 115 15.5 1505 ## 116 15.6 1506 ## 117 15.7 1507 ## 118 15.8 1508 ## 119 15.9 1509 ## 120 15.10 1510 ## 121 15.11 1511 ## 122 15.12 1512 ## 123 15.13 1513 ## 124 16 1600 ## 125 17 1700 ## 126 18 1800 # create data with information for Area of Habitat data spp_info_data <- create_spp_info_data( spp_range_data, spp_summary_data = spp_summary_data, spp_habitat_data = spp_habitat_data ) # preview data print(spp_info_data, width = Inf) ## Simple feature collection with 15 features and 8 fields ## Geometry type: MULTIPOLYGON ## Dimension: XY ## Bounding box: xmin: -916330.2 ymin: 4304151 xmax: 320141.5 ymax: 5069358 ## Projected CRS: World_Behrmann ## # A tibble: 15 × 9 ## id_no binomial category migratory seasonal ## ## 1 670 Simulus spp. 670 LC TRUE 2 ## 2 670 Simulus spp. 670 LC TRUE 3 ## 3 670 Simulus spp. 670 LC TRUE 4 ## 4 2072 Simulus spp. 2072 NT FALSE 1 ## 5 2374 Simulus spp. 2374 VU FALSE 1 ## 6 3667 Simulus spp. 3667 EN FALSE 1 ## 7 4421 Simulus spp. 4421 VU FALSE 1 ## 8 4650 Simulus spp. 4650 NT FALSE 1 ## 9 5808 Simulus spp. 5808 VU TRUE 1 ## 10 5808 Simulus spp. 5808 VU TRUE 2 ## 11 5808 Simulus spp. 5808 VU TRUE 3 ## 12 5808 Simulus spp. 5808 VU TRUE 4 ## 13 6701 Simulus spp. 6701 EN FALSE 1 ## 14 8110 Simulus spp. 8110 VU FALSE 1 ## 15 8644 Simulus spp. 8644 LC FALSE 1 ## full_habitat_code elevation_lower elevation_upper ## ## 1 14.2|14.5 82 942 ## 2 3.5|4.4|6 82 942 ## 3 1.5|3.4|3.8 82 942 ## 4 1.4|2.1|3.8 46 907 ## 5 2.1|4.4|14.5 65 1020 ## 6 1.4|3.5|3.8 15 598 ## 7 3.5|4.4 85 949 ## 8 3.8|4.4|14.5 54 951 ## 9 2.1|3.8|4.1|5.5|14.1|14.2|14.5 91 974 ## 10 2.1|3.8|4.1|14.1|14.2|14.5 91 974 ## 11 5.5|14.1|14.2|14.5 91 974 ## 12 3.8|4|5.5|14.1|14.2|14.5 91 974 ## 13 3.8|4.1|5.5 221 1069 ## 14 1.4|3.8|14.5 75 991 ## 15 3.4|5|14.5 182 1183 ## geometry ## ## 1 (((-744167.8 5065733, -744758.3 5065030, -745429.8 5064437, -745619 5064063,… ## 2 (((27902.87 4746365, 27056.68 4747482, 26787.49 4748880, 27030.63 4750311, 2… ## 3 (((-463308.8 4832969, -462721.2 4833049, -461995.6 4833183, -461258.5 483323… ## 4 (((-415672.5 4377074, -416862.2 4377160, -416399.1 4377219, -415731.4 437712… ## 5 (((-568331.2 4328892, -568572.4 4330309, -568690.1 4331566, -568471.1 433245… ## 6 (((-598890.3 4658362, -599068.8 4657037, -598638.5 4656082, -597329.2 465567… ## 7 (((-862522.7 4407131, -862193.7 4407172, -862201.4 4407165, -862640.4 440702… ## 8 (((-613250.4 4368112, -611865.8 4368219, -610831.5 4368152, -610384.8 436778… ## 9 (((-604205.8 4355480, -604258.8 4354866, -604481.7 4354214, -604629.3 435369… ## 10 (((-214939.6 4390035, -213485.5 4389897, -212252.4 4389503, -211509.5 438892… ## 11 (((-712163.3 4853217, -712938.1 4854392, -714015.8 4854814, -715276.9 485473… ## 12 (((-853538.9 4415882, -853532.1 4415239, -853670.1 4414456, -853800.3 441371… ## 13 (((-501888.8 5040197, -501188.3 5040426, -500444.4 5040511, -499781.6 504024… ## 14 (((-259653.3 4377133, -259650.4 4376545, -259928.2 4375843, -260216.7 437513… ## 15 (((166524.7 4944201, 165755.7 4943358, 165117 4942089, 164815 4940646, 16505… # specify folder to save Area of Habitat data ## although we use a temporary directory here to avoid polluting your computer ## with examples files, you would normally specify the folder ## on your computer where you want to save data output_dir <- tempdir() # generate Area of Habitat data spp_aoh_data <- create_spp_aoh_data( spp_info_data, elevation_data = elevation_data, habitat_data = habitat_data, crosswalk_data = crosswalk_data, output_dir = output_dir ) # preview results ## resulting dataset is a simple features (sf) object containing ## spatial geometries for cleaned versions of the range data ## (in the geometry column) and the following additional columns: ## ## - id_no : IUCN Red List taxon identifier ## - seasonal : integer identifier for seasonal distributions ## - category : character IUCN Red List threat category ## - full_habitat_code: All IUCN Red List codes for suitable habitat classes ## (multiple codes are delimited using \"|\" symbols) ## - habitat_code : IUCN Red List codes for suitable habitat classes ## used to create AOH maps ## - elevation_lower : lower limit for the species on IUCN Red List ## - elevation_upper : upper limit for the species on IUCN Red List ## - xmin : minimum x-coordinate for Area of Habitat data ## - xmax : maximum x-coordinate for Area of Habitat data ## - ymin : minimum y-coordinate for Area of Habitat data ## - ymax : maximum y-coordinate for Area of Habitat data ## - path : file path for Area of Habitat data (GeoTIFF format) print(spp_aoh_data, width = Inf) ## Simple feature collection with 15 features and 14 fields ## Geometry type: MULTIPOLYGON ## Dimension: XY ## Bounding box: xmin: -916330.2 ymin: 4304151 xmax: 320141.5 ymax: 5069358 ## Projected CRS: World_Behrmann ## # A tibble: 15 × 15 ## id_no binomial category migratory seasonal ## * ## 1 670 Simulus spp. 670 LC TRUE 2 ## 2 670 Simulus spp. 670 LC TRUE 3 ## 3 670 Simulus spp. 670 LC TRUE 4 ## 4 2072 Simulus spp. 2072 NT FALSE 1 ## 5 2374 Simulus spp. 2374 VU FALSE 1 ## 6 3667 Simulus spp. 3667 EN FALSE 1 ## 7 4421 Simulus spp. 4421 VU FALSE 1 ## 8 4650 Simulus spp. 4650 NT FALSE 1 ## 9 5808 Simulus spp. 5808 VU TRUE 1 ## 10 5808 Simulus spp. 5808 VU TRUE 2 ## 11 5808 Simulus spp. 5808 VU TRUE 3 ## 12 5808 Simulus spp. 5808 VU TRUE 4 ## 13 6701 Simulus spp. 6701 EN FALSE 1 ## 14 8110 Simulus spp. 8110 VU FALSE 1 ## 15 8644 Simulus spp. 8644 LC FALSE 1 ## full_habitat_code habitat_code elevation_lower ## * ## 1 14.2|14.5 14.2|14.5 82 ## 2 3.5|4.4|6 3.5|4.4|6 82 ## 3 1.5|3.4|3.8 1.5|3.4|3.8 82 ## 4 1.4|2.1|3.8 1.4|2.1|3.8 46 ## 5 2.1|4.4|14.5 2.1|4.4|14.5 65 ## 6 1.4|3.5|3.8 1.4|3.5|3.8 15 ## 7 3.5|4.4 3.5|4.4 85 ## 8 3.8|4.4|14.5 3.8|4.4|14.5 54 ## 9 2.1|3.8|4.1|5.5|14.1|14.2|14.5 2.1|3.8|4.1|5.5|14.1|14.2|14.5 91 ## 10 2.1|3.8|4.1|14.1|14.2|14.5 2.1|3.8|4.1|14.1|14.2|14.5 91 ## 11 5.5|14.1|14.2|14.5 5.5|14.1|14.2|14.5 91 ## 12 3.8|4|5.5|14.1|14.2|14.5 3.8|4|5.5|14.1|14.2|14.5 91 ## 13 3.8|4.1|5.5 3.8|4.1|5.5 221 ## 14 1.4|3.8|14.5 1.4|3.8|14.5 75 ## 15 3.4|5|14.5 3.4|5|14.5 182 ## elevation_upper xmin xmax ymin ymax path ## * ## 1 942 -896631 -648631 4946077 5067077 /tmp/Rtmpp2hyni/670_2.tif ## 2 942 -417631 320369 4742077 5033077 /tmp/Rtmpp2hyni/670_3.tif ## 3 942 -527631 -312631 4664077 4840077 /tmp/Rtmpp2hyni/670_4.tif ## 4 907 -916631 39369 4328077 5070077 /tmp/Rtmpp2hyni/2072_1.tif ## 5 1020 -868631 320369 4304077 5070077 /tmp/Rtmpp2hyni/2374_1.tif ## 6 598 -794631 -305631 4334077 4678077 /tmp/Rtmpp2hyni/3667_1.tif ## 7 949 -863631 -8631 4400077 5062077 /tmp/Rtmpp2hyni/4421_1.tif ## 8 951 -916631 203369 4304077 5070077 /tmp/Rtmpp2hyni/4650_1.tif ## 9 974 -621631 -354631 4304077 4456077 /tmp/Rtmpp2hyni/5808_1.tif ## 10 974 -375631 -201631 4373077 4519077 /tmp/Rtmpp2hyni/5808_2.tif ## 11 974 -771631 -651631 4781077 4861077 /tmp/Rtmpp2hyni/5808_3.tif ## 12 974 -868631 275369 4406077 5058077 /tmp/Rtmpp2hyni/5808_4.tif ## 13 1069 -896631 -74631 4634077 5070077 /tmp/Rtmpp2hyni/6701_1.tif ## 14 991 -868631 291369 4304077 5044077 /tmp/Rtmpp2hyni/8110_1.tif ## 15 1183 -402631 183369 4624077 5000077 /tmp/Rtmpp2hyni/8644_1.tif ## geometry ## * ## 1 (((-744167.8 5065733, -744758.3 5065030, -745429.8 5064437, -745619 5064063,… ## 2 (((27902.87 4746365, 27056.68 4747482, 26787.49 4748880, 27030.63 4750311, 2… ## 3 (((-463308.8 4832969, -462721.2 4833049, -461995.6 4833183, -461258.5 483323… ## 4 (((-415672.5 4377074, -416862.2 4377160, -416399.1 4377219, -415731.4 437712… ## 5 (((-568331.2 4328892, -568572.4 4330309, -568690.1 4331566, -568471.1 433245… ## 6 (((-598890.3 4658362, -599068.8 4657037, -598638.5 4656082, -597329.2 465567… ## 7 (((-862522.7 4407131, -862193.7 4407172, -862201.4 4407165, -862640.4 440702… ## 8 (((-613250.4 4368112, -611865.8 4368219, -610831.5 4368152, -610384.8 436778… ## 9 (((-604205.8 4355480, -604258.8 4354866, -604481.7 4354214, -604629.3 435369… ## 10 (((-214939.6 4390035, -213485.5 4389897, -212252.4 4389503, -211509.5 438892… ## 11 (((-712163.3 4853217, -712938.1 4854392, -714015.8 4854814, -715276.9 485473… ## 12 (((-853538.9 4415882, -853532.1 4415239, -853670.1 4414456, -853800.3 441371… ## 13 (((-501888.8 5040197, -501188.3 5040426, -500444.4 5040511, -499781.6 504024… ## 14 (((-259653.3 4377133, -259650.4 4376545, -259928.2 4375843, -260216.7 437513… ## 15 (((166524.7 4944201, 165755.7 4943358, 165117 4942089, 164815 4940646, 16505… # create maps ## N.B. you might need to install the ggmap package to create the maps map <- plot_spp_aoh_data( spp_aoh_data[1:4, ], zoom = 6, maptype = \"stamen_toner_background\", maxcell = Inf ) + scale_fill_viridis_d() + scale_color_manual(values = c(\"range\" = \"red\")) + scale_size_manual(values = c(\"range\" = 0.5)) + theme( axis.title = element_blank(), axis.text = element_text(size = 6), strip.text = element_text(color = \"white\"), strip.background = element_rect(fill = \"black\", color = \"black\") ) # display maps print(map)"},{"path":"https://prioritizr.github.io/aoh/articles/customization.html","id":"conclusion","dir":"Articles","previous_headings":"","what":"Conclusion","title":"Customization","text":"Hopefully, vignette provided useful overview customizing Area Habitat data. questions suggestions additional elevation, habitat classification, crosswalk datasets included package, please file issue package’s online code repository.","code":""},{"path":[]},{"path":"https://prioritizr.github.io/aoh/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Jeffrey O Hanson. Author, maintainer.","code":""},{"path":"https://prioritizr.github.io/aoh/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Hanson JO (2024) aoh: Create Area Habitat Data. R package version 0.0.2.14. Available https://github.com/prioritizr/aoh. IUCN [insert year] IUCN Red List Threatened Species. Version [insert version]. Available www.iucnredlist.org. BirdLife International Handbook Birds World ([insert year]) Bird species distribution maps world. Version [insert version]. Available https://datazone.birdlife.org/species/requestdis. Jung M, Dahal PR, Butchart SHM, Donald PF, De Lamo X, Lesiv M, Kapos V, Rondinini C, Visconti P (2020). “global map terrestrial habitat types.” Scientific Data, 7(1), 256. doi:10.1038/s41597-020-00599-8. Jung M, Dahal PR, Butchart SHM, Donald PF, De Lamo X, Lesiv M, Kapos V, Rondinini C, Visconti P (2020b) global map terrestrial habitat types (insert version) [Data set]. Zenodo. Available https://doi.org/10.5281/zenodo.4058819. Lumbierres M, Dahal PR, Di Marco M, Butchart SHM, Donald PF, Rondinini C (2021). “Translating habitat class land cover map area habitat terrestrial vertebrates.” Conservation Biology, 36(3), e13851. doi:10.1111/cobi.13851. Robinson N, Regetz J, Guralnick RP (2014). “EarthEnv-DEM90: nearly-global, void-free, multi-scale smoothed 90m digital elevation model fused ASTER SRTM data.” ISPRS Journal Photogrammetry Remote Sensing, 87(1), 57–67. doi:10.1016/j.isprsjprs.2013.11.002.","code":"@Manual{, author = {Jeffrey O Hanson}, title = {aoh: Create Area of Habitat Data}, year = {2024}, note = {R package version 0.0.2.14}, url = {https://github.com/prioritizr/aoh}, } @Manual{, author = {{IUCN}}, title = {IUCN Red List of Threatened Species}, year = {[insert year]}, note = {Version [insert version]}, url = {www.iucnredlist.org}, } @Manual{, author = {{BirdLife International} and {Handbook of the Birds of the World}}, title = {Bird species distribution maps of the world}, year = {[insert year]}, note = {Version [insert version]}, url = {https://datazone.birdlife.org/species/requestdis}, } @Article{, author = {Martin Jung and Prabhat Raj Dahal and Stuart H. M. Butchart and Paul F. Donald and Xavier {De Lamo} and Myroslava Lesiv and Valerie Kapos and Carlo Rondinini and Piero Visconti}, title = {A global map of terrestrial habitat types}, year = {2020}, journal = {Scientific Data}, volume = {7}, number = {1}, pages = {256}, doi = {10.1038/s41597-020-00599-8}, } @Manual{, author = {Martin Jung and Prabhat Raj Dahal and Stuart H. M. Butchart and Paul F. Donald and Xavier {De Lamo} and Myroslava Lesiv and Valerie Kapos and Carlo Rondinini and Piero Visconti}, title = {A global map of terrestrial habitat types [Data set]}, year = {[insert year]}, note = {Zenodo}, doi = {10.5281/zenodo.4058819}, } @Article{, author = {Maria Lumbierres and Prabhat Raj Dahal and Moreno {Di Marco} and Stuart H. M. Butchart and Paul F. Donald and Carlo Rondinini}, title = {Translating habitat class to land cover to map area of habitat of terrestrial vertebrates}, year = {2021}, journal = {Conservation Biology}, volume = {36}, number = {3}, pages = {e13851}, doi = {10.1111/cobi.13851}, } @Article{, author = {Natalie Robinson and James Regetz and Robert P Guralnick}, title = {EarthEnv-DEM90: A nearly-global, void-free, multi-scale smoothed 90m digital elevation model from fused ASTER and SRTM data}, journal = {ISPRS Journal of Photogrammetry and Remote Sensing}, year = {2014}, volume = {87}, number = {1}, pages = {57--67}, doi = {10.1016/j.isprsjprs.2013.11.002}, }"},{"path":[]},{"path":"https://prioritizr.github.io/aoh/index.html","id":"overview","dir":"","previous_headings":"aoh: Create Area of Habitat Data","what":"Overview","title":"Create Area of Habitat Data","text":"Area Habitat (AOH) maps aim delineate spatial distribution suitable habitat species (Brooks et al. 2019). used assess performance protected area systems, measure impacts threats biodiversity, identify priorities conservation actions (e.g., Rondinini et al. 2005; Tracewski et al. 2016; Durán et al. 2021). maps generally produced obtaining geographic range data species, removing areas contain suitable habitat occur outside known elevational limits species (Brooks et al. 2019). help make maps accessible, aoh R package provides routines automatically creating Area Habitat data based International Union Conservation Nature (IUCN) Red List Threatened Species. manually downloading species range data IUCN Red List, users can import (using read_spp_range_data()), prepare collate additional information subsequent processing (using create_spp_info_data()), create Area Habitat data (using create_spp_aoh_data()). Global elevation habitat classification data (Jung et al. 2020; Lumbierres et al. 2021; Robinson et al. 2014) automatically downloaded, data species’ habitat preferences elevational limits obtained automatically using IUCN Red List API. Since accessing IUCN Red List requires token, users may need obtain token update R configuration recognize token (see installation instructions details).","code":""},{"path":[]},{"path":"https://prioritizr.github.io/aoh/index.html","id":"package-installation","dir":"","previous_headings":"aoh: Create Area of Habitat Data > Installation","what":"Package installation","title":"Create Area of Habitat Data","text":"latest developmental version aoh R package can installed using following R code. Please note requires sf, terra, zen4R R packages, may require additional software installed. encounter problems installing dependencies, please consult installation instructions.","code":"if (!require(remotes)) install.packages(\"remotes\") remotes::install_github(\"prioritizr/aoh\")"},{"path":"https://prioritizr.github.io/aoh/index.html","id":"optional-dependencies","dir":"","previous_headings":"aoh: Create Area of Habitat Data > Installation","what":"Optional dependencies","title":"Create Area of Habitat Data","text":"aoh R package can leverage prepr R package augment data cleaning procedures. Since prepr R package available Comprehensive R Archive Network (CRAN), listed optional dependency. cases, prepr R package required complete data cleaning procedures (e.g., fix especially extreme geometry issues) aoh R package throw error package available. install prepr R package, please use following R code. Note prepr R package system dependencies need installed package can installed (see platform-specific instructions). package can also leverage Geospatial Data Abstraction Library (GDAL) Geographic Resources Analysis Support System (GRASS) help reduce processing time. Although use software optional, can help improve computational performance processing data across large spatial extents. provide platform-specific instructions install dependencies prepr R package, GDAL, GRASS.","code":"if (!require(remotes)) install.packages(\"remotes\") remotes::install_github(\"prioritizr/prepr\")"},{"path":"https://prioritizr.github.io/aoh/index.html","id":"windows","dir":"","previous_headings":"aoh: Create Area of Habitat Data > Installation > Optional dependencies","what":"Windows","title":"Create Area of Habitat Data","text":"Rtools software needs installed install prepr R package package. software provides system requirements rwinlib. Additionally, easiest way install GDAL GRASS OSGeo4W. Download OSGeo4W installer, select “Express Install” option, follow prompts complete installation. installation process finished, please restart computer. aoh::is_gdal_calc_available() function find GDAL, may also need update PATH environmental variable contains folder path GDAL (default folder path C:\\OSGeo4W\\bin),","code":""},{"path":"https://prioritizr.github.io/aoh/index.html","id":"ubuntu","dir":"","previous_headings":"aoh: Create Area of Habitat Data > Installation > Optional dependencies","what":"Ubuntu","title":"Create Area of Habitat Data","text":"recent versions Ubuntu (18.04 later), libraries available official repositories. can installed using following system commands.","code":"apt-get -y update apt-get install -y \\ libgdal-dev libgeos-dev libproj-dev gdal-bin grass \\ libgmp3-dev libmpfr-dev libudunits2-dev"},{"path":"https://prioritizr.github.io/aoh/index.html","id":"linux","dir":"","previous_headings":"aoh: Create Area of Habitat Data > Installation > Optional dependencies","what":"Linux","title":"Create Area of Habitat Data","text":"Unix-alikes, gdal (>= 3.0.2), gmp (>= 4.2.3), grass (>= 7.8.7), mpfr (>= 3.0.0) required.","code":""},{"path":"https://prioritizr.github.io/aoh/index.html","id":"macos","dir":"","previous_headings":"aoh: Create Area of Habitat Data > Installation > Optional dependencies","what":"MacOS","title":"Create Area of Habitat Data","text":"easiest way install libraries using HomeBrew. installing HomeBrew, libraries can installed using following system commands.","code":"brew tap osgeo/osgeo4mac brew install pkg-config brew install gdal brew install osgeo-grass brew install gmp brew install mpfr"},{"path":"https://prioritizr.github.io/aoh/index.html","id":"accessing-the-iucn-red-list-api","dir":"","previous_headings":"aoh: Create Area of Habitat Data > Installation","what":"Accessing the IUCN Red List API","title":"Create Area of Habitat Data","text":"installing aoh R package, need obtain token IUCN Red List API (one already). , please visit IUCN API website (https://apiv3.iucnredlist.org/), click “Generate token” link top web page, fill form apply token. receive token shortly completing form (immediately). receiving token, please open .Renviron file computer (e.g., using usethis::edit_r_environ()). Next, please add following text file (replacing string token) save file, using token place string . Please restart R session. now able access IUCN Red List API. verify , please try running following R code – assuming everything works correctly – output . instructions work, please consult documentation rredlist R package details.","code":"IUCN_REDLIST_KEY=\"your_actual_token_not_this_string\" # verify access to IUCN Red List API is_iucn_rl_api_available()"},{"path":"https://prioritizr.github.io/aoh/index.html","id":"usage","dir":"","previous_headings":"aoh: Create Area of Habitat Data","what":"Usage","title":"Create Area of Habitat Data","text":"provide short example using aoh R package. example, generate Area Habitat data following Iberian species: Pyrenean brook salamander (Calotriton asper), Iberian frog (Rana iberica), western spadefoot toad (Pelobates cultripes), golden striped salamnader (Chioglossa lusitanica). Please note example abridged version tutorial provided package vignette, please consult package vignette detailed tutorial using package. start , load package several packages help data processing visualization. Now import range data species. Although users typically obtain range data International Union Conservation Nature (IUCN) Red List Threatened Species, use built-species range data distributed package convenience. Please note data obtained IUCN Red List, manually generated using occurrence records Global Biodiversity Information Facility. Next, prepare range data generating Area Habitat data. procedure – addition repairing geometry issues spatial data – obtain information species’ habitat preferences elevational limits (via IUCN Red List Threatened Species). also specify folder cache downloaded data won’t need re-download subsequent runs. can now generate Area Habitat data species. default, data generated using elevation data derived Robinson et al. (2014) habitat data derived Lumbierres et al. (2021). Similar , also specify folder cache downloaded datasets won’t need re-downloaded subsequent runs. generating Area Habitat data, can import . Finally, let’s create maps compare range data Area habitat data.","code":"# load packages library(aoh) library(terra) library(rappdirs) library(ggplot2) # find file path for data path <- system.file(\"extdata\", \"EXAMPLE_SPECIES.zip\", package = \"aoh\") # import data spp_range_data <- read_spp_range_data(path) # preview data print(spp_range_data) ## Simple feature collection with 4 features and 26 fields ## Geometry type: POLYGON ## Dimension: XY ## Bounding box: xmin: -9.479736 ymin: 36.59422 xmax: 3.302702 ymax: 43.76455 ## Geodetic CRS: WGS 84 ## # A tibble: 4 × 27 ## id_no binomial presence origin seasonal compiler yrcompiled citation ## ## 1 979 Alytes dickhilleni 1 1 1 Derived… NA ## 2 59448 Calotriton asper 1 1 1 Derived… NA ## 3 4657 Chioglossa lusita… 1 1 1 Derived… NA ## 4 58622 Rana iberica 1 1 1 Derived… NA ## # ℹ 19 more variables: subspecies , subpop , source , ## # island , tax_comm , dist_comm , generalisd , ## # legend , kingdom , phylum , class , order_ , ## # family , genus , category , marine , terrestial , ## # freshwater , geometry # specify cache directory cache_dir <- user_data_dir(\"aoh\") # create cache_dir if needed if (!file.exists(cache_dir)) { dir.create(cache_dir, showWarnings = FALSE, recursive = TRUE) } # prepare information spp_info_data <- create_spp_info_data(spp_range_data, cache_dir = cache_dir) # specify cache directory cache_dir <- user_data_dir(\"aoh\") # specify folder to save Area of Habitat data ## although we use a temporary directory here to avoid polluting your ## with examples files, you would normally specify the folder ## on your computer where you want to save data output_dir <- tempdir() # generate Area of Habitat data ## note that this function might take a complete because it will need to ## download the global habitat and elevation data that first time you run it. spp_aoh_data <- create_spp_aoh_data( spp_info_data, output_dir = output_dir, cache_dir = cache_dir ) # preview results print(spp_aoh_data[, c(\"id_no\", \"seasonal\", \"path\")]) # import the Area of Habitat data spp_aoh_rasters <- lapply(spp_aoh_data$path, rast) # preview raster data print(spp_aoh_rasters) ## [[1]] ## class : SpatRaster ## dimensions : 2593, 3701, 1 (nrow, ncol, nlyr) ## resolution : 100, 100 (x, y) ## extent : -467931, -97831, 4364377, 4623677 (xmin, xmax, ymin, ymax) ## coord. ref. : World_Behrmann ## source : 979_1.tif ## name : lyr1 ## min value : 0 ## max value : 1 ## ## [[2]] ## class : SpatRaster ## dimensions : 2266, 5670, 1 (nrow, ncol, nlyr) ## resolution : 100, 100 (x, y) ## extent : -248331, 318669, 4838277, 5064877 (xmin, xmax, ymin, ymax) ## coord. ref. : World_Behrmann ## source : 59448_1.tif ## name : lyr1 ## min value : 0 ## max value : 1 ## ## [[3]] ## class : SpatRaster ## dimensions : 5149, 5361, 1 (nrow, ncol, nlyr) ## resolution : 100, 100 (x, y) ## extent : -914731, -378631, 4551877, 5066777 (xmin, xmax, ymin, ymax) ## coord. ref. : World_Behrmann ## source : 4657_1.tif ## name : lyr1 ## min value : 0 ## max value : 1 ## ## [[4]] ## class : SpatRaster ## dimensions : 4978, 7512, 1 (nrow, ncol, nlyr) ## resolution : 100, 100 (x, y) ## extent : -904331, -153131, 4568977, 5066777 (xmin, xmax, ymin, ymax) ## coord. ref. : World_Behrmann ## source : 58622_1.tif ## name : lyr1 ## min value : 0 ## max value : 1 # create maps ## N.B. you might need to install the ggmap package map <- plot_spp_aoh_data( spp_aoh_data, zoom = 6, maptype = \"stamen_toner_background\" ) + scale_fill_viridis_d() + scale_color_manual(values = c(\"range\" = \"red\")) + scale_size_manual(values = c(\"range\" = 0.5)) + theme( axis.title = element_blank(), axis.text = element_text(size = 6), strip.text = element_text(color = \"white\"), strip.background = element_rect(fill = \"black\", color = \"black\") ) # display maps print(map)"},{"path":"https://prioritizr.github.io/aoh/index.html","id":"citation","dir":"","previous_headings":"aoh: Create Area of Habitat Data","what":"Citation","title":"Create Area of Habitat Data","text":"Please cite aoh R package underlying datasets used produce Area Habitat data.","code":"Area of Habitat data are created using a range of different datasets. Depending on which datasets are used, please cite the aoh package and relevant data using: Hanson JO (2024) aoh: Create Area of Habitat Data. R package version 0.0.2.14. Available at https://github.com/prioritizr/aoh. IUCN [insert year] IUCN Red List of Threatened Species. Version [insert version]. Available at www.iucnredlist.org. BirdLife International and Handbook of the Birds of the World ([insert year]) Bird species distribution maps of the world. Version [insert version]. Available at https://datazone.birdlife.org/species/requestdis. Jung M, Dahal PR, Butchart SHM, Donald PF, De Lamo X, Lesiv M, Kapos V, Rondinini C, Visconti P (2020). \"A global map of terrestrial habitat types.\" _Scientific Data_, *7*(1), 256. doi:10.1038/s41597-020-00599-8 . Jung M, Dahal PR, Butchart SHM, Donald PF, De Lamo X, Lesiv M, Kapos V, Rondinini C, and Visconti P (2020b) A global map of terrestrial habitat types (insert version) [Data set]. Zenodo. Available at https://doi.org/10.5281/zenodo.4058819. Lumbierres M, Dahal PR, Di Marco M, Butchart SHM, Donald PF, Rondinini C (2021). \"Translating habitat class to land cover to map area of habitat of terrestrial vertebrates.\" _Conservation Biology_, *36*(3), e13851. doi:10.1111/cobi.13851 . Robinson N, Regetz J, Guralnick RP (2014). \"EarthEnv-DEM90: A nearly-global, void-free, multi-scale smoothed 90m digital elevation model from fused ASTER and SRTM data.\" _ISPRS Journal of Photogrammetry and Remote Sensing_, *87*(1), 57-67. doi:10.1016/j.isprsjprs.2013.11.002 . To see these entries in BibTeX format, use 'print(, bibtex=TRUE)', 'toBibtex(.)', or set 'options(citation.bibtex.max=999)'."},{"path":"https://prioritizr.github.io/aoh/index.html","id":"getting-help","dir":"","previous_headings":"","what":"Getting help","title":"Create Area of Habitat Data","text":"Please refer package website information. questions using package suggestions improving , please file issue package’s online code repository.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/aoh.html","id":null,"dir":"Reference","previous_headings":"","what":"aoh: Create Area of Habitat Data — aoh","title":"aoh: Create Area of Habitat Data — aoh","text":"Area Habitat (AOH) maps aim delineate spatial distribution suitable habitat species (Brooks et al. 2019). used help understand impacts habitat loss species, prioritize areas conservation (e.g., Tracewski et al. 2016; Rondinini et al. 2005). maps generally produced obtaining geographic range data species, removing areas contain suitable habitat occur outside known elevational limits species (Brooks et al. 2019). help make maps accessible, package provides routines automatically creating Area Habitat data based International Union Conservation Nature (IUCN) Red List Threatened Species. manually downloading species range data IUCN Red List, users can import (using read_spp_range_data()), prepare collate additional information subsequent processing (using create_spp_info_data()), create Area Habitat data (using create_spp_aoh_data()). Global elevation habitat classification data (Jung et al. 2020a,b; Lumbierres *et al. 2021; Robinson et al. 2014) automatically downloaded, data species' habitat preferences elevational limits obtained automatically using IUCN Red List API. Since accessing IUCN Red List API requires token, users may need obtain token update R configuration recognize token (see instructions details).","code":""},{"path":"https://prioritizr.github.io/aoh/reference/aoh.html","id":"accessing-the-iucn-red-list-api","dir":"Reference","previous_headings":"","what":"Accessing the IUCN Red List API","title":"aoh: Create Area of Habitat Data — aoh","text":"need obtain token IUCN Red List API (one already). achieve , please visit IUCN API website (https://apiv3.iucnredlist.org/), click \"Generate token\" link top web page, fill form apply token. receive token shortly completing form (immediately). receiving token, please open .Renviron file computer (e.g., using usethis::edit_r_environ()). Next, please add following text file (replacing string token) save file: Please restart R session. now able access IUCN Red List API. verify , please try running following R code – assuming everything works correctly – see TRUE output: instructions work, please consult documentation rredlist package details.","code":"IUCN_REDLIST_KEY=\"your_actual_token_not_this_string\" # verify access to IUCN Red List API is_iucn_rl_available()"},{"path":"https://prioritizr.github.io/aoh/reference/aoh.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"aoh: Create Area of Habitat Data — aoh","text":"Brooks TM, Pimm SL, Akçakaya HR, Buchanan GM, Butchart SHM, Foden W, Hilton-Taylor C, Hoffmann M, Jenkins CN, Joppa L, Li BV, Menon V, Ocampo-Peñuela N, Rondinini C (2019) Measuring terrestrial Area Habitat (AOH) utility IUCN Red List. Trends Ecology & Evolution, 34, 977–986. doi:10.1016/j.tree.2019.06.009 Jung M, Dahal PR, Butchart SHM, Donald PF, De Lamo X, Lesiv M, Kapos V, Rondinini C, Visconti P (2020a) global map terrestrial habitat types. Scientific data, 7, 1–8. doi:10.1038/s41597-020-00599-8 Jung M, Dahal PR, Butchart SHM, Donald PF, De Lamo X, Lesiv M, Kapos V, Rondinini C, Visconti P (2020b) global map terrestrial habitat types (insert version) [Data set]. Zenodo. doi:10.5281/zenodo.4058819 Lumbierres M, Dahal PR, Di Marco M, Butchart SHM, Donald PF, Rondinini C (2021) Translating habitat class land cover map area habitat terrestrial vertebrates. Conservation Biology, 36, e13851. doi:10.1111/cobi.13851 Robinson N, Regetz J, Guralnick RP (2014) EarthEnv-DEM90: nearly- global, void-free, multi-scale smoothed, 90m digital elevation model fused ASTER SRTM data. ISPRS Journal Photogrammetry Remote Sensing, 87:57–67. doi:10.1016/j.isprsjprs.2013.11.002 Rondinini C, Stuart S, Boitani L (2005) Habitat suitability models shortfall conservation planning African vertebrates. Conservation Biology, 19, 1488–1497. doi:10.1111/j.1523-1739.2005.00204 Tracewski Ł, Butchart SHM, Di Marco M, Ficetola GF, Rondinini C, Symes , Wheatley H, Beresford AE, Buchanan GM (2016) Toward quantification impact 21st‐century deforestation extinction risk terrestrial vertebrates. Conservation Biology, 30, 1070–1079. doi:10.1111/cobi.12715","code":""},{"path":[]},{"path":"https://prioritizr.github.io/aoh/reference/aoh.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"aoh: Create Area of Habitat Data — aoh","text":"Maintainer: Jeffrey O Hanson jeffrey.hanson@uqconnect.edu.au (ORCID)","code":""},{"path":"https://prioritizr.github.io/aoh/reference/calc_spp_frc_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate fractional coverage data — calc_spp_frc_data","title":"Calculate fractional coverage data — calc_spp_frc_data","text":"Calculate fractional coverage species' Area Habitat.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/calc_spp_frc_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate fractional coverage data — calc_spp_frc_data","text":"","code":"calc_spp_frc_data( x, res, output_dir, template_data = NULL, cache_dir = tempdir(), force = FALSE, n_threads = 1, engine = \"terra\", cache_limit = 1000, verbose = TRUE, ... )"},{"path":"https://prioritizr.github.io/aoh/reference/calc_spp_frc_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate fractional coverage data — calc_spp_frc_data","text":"x sf::st_sf() Object containing species data. object produced using create_spp_aoh_data() function. res numeric Resolution computing fractional coverage. Note argument res must factor resolution underlying Area Habitat data. example, value 5000 valid argument underlying data resolution 100 m. output_dir character character Folder path save raster (GeoTIFF) files containing fractional coverage data. template_data terra::rast() Raster data use template computing fractional coverage. Note argument spatial properties elevation habitat data used generate Area Habitat data. Defaults NULL template data automatically imported default global habitat dataset (using get_lumb_cgls_habitat_data()). cache_dir character Folder path downloading caching data. default, temporary directory used (.e., tempdir()). avoid downloading data multiple times, strongly recommended specify persistent storage location (see Examples ). force logical data downloaded even data already available? Defaults FALSE. n_threads integer Number computational threads use data processing. reduce run time, strongly recommended set parameter based available resources (see Examples section ). Note parallel processing used processing habitat classification elevation data. , parameter influence using preprocessed datasets. Defaults 1. engine character Value indicating name software use data processing. Available options include \"terra\" \"gdal\". Defaults \"terra\". cache_limit integer Amount memory (Mb) caching processing spatial data Geospatial Data Abstraction Library (GDAL). parameter used using \"gdal\" engine. possible, recommended set parameter 5000 (assuming least 8Gb memory available system). Defaults 1000. verbose logical progress displayed processing data? Defaults TRUE. ... Arguments passed get_lumb_cgls_habitat_data().","code":""},{"path":"https://prioritizr.github.io/aoh/reference/calc_spp_frc_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate fractional coverage data — calc_spp_frc_data","text":"updated version argument x updated values path, xmin, xmax, ymin, ymax columns. ","code":""},{"path":"https://prioritizr.github.io/aoh/reference/calc_spp_frc_data.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Calculate fractional coverage data — calc_spp_frc_data","text":"function works () creating template grid based specified resolution, (ii) aggregating Area Habitat data match spatial origin resolution template grid, (iii) dividing aggregated values based aggregation factor express values fractional coverage.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/calc_spp_frc_data.html","id":"output-file-format","dir":"Reference","previous_headings":"","what":"Output file format","title":"Calculate fractional coverage data — calc_spp_frc_data","text":"Fractional coverage data stored separate raster (GeoTIFF) file seasonal distribution species. raster file assigned file name based prefix combination species' taxon identifier (per id_no/SISID column x) identifier seasonal distribution (per seasonality x) (.e., file names named according FRC_{$id_no}_${seasonality}.tif). given raster file, grid cell values denote proportion suitable habitat located within cell. example, value 0 corresponds 0% fractional coverage, 0.5 50% fractional coverage, 1 100% fractional coverage. Missing (NA) values correspond grid cells located entirely outside species' distribution.","code":""},{"path":[]},{"path":"https://prioritizr.github.io/aoh/reference/calc_spp_frc_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Calculate fractional coverage data — calc_spp_frc_data","text":"","code":"# \\dontrun{ # find file path for example range data following IUCN Red List data format ## N.B., the range data were not obtained from the IUCN Red List, ## and were instead based on data from GBIF (https://www.gbif.org/) path <- system.file(\"extdata\", \"EXAMPLE_SPECIES.zip\", package = \"aoh\") # import data spp_range_data <- read_spp_range_data(path) # specify settings for data processing output_aoh_dir <- tempdir() # folder to save AOH data output_frc_dir <- tempdir() # folder to save coverage data cache_dir <- rappdirs::user_data_dir(\"aoh\") # persistent storage location n_threads <- parallel::detectCores() - 1 # speed up analysis # create cache directory if needed if (!file.exists(cache_dir)) { dir.create(cache_dir, showWarnings = FALSE, recursive = TRUE) } # create species information data spp_info_data <- create_spp_info_data( x = spp_range_data, cache_dir = cache_dir ) #> ℹ initializing #> ✔ initializing [1.5s] #> #> ℹ cleaning species range data #> ✔ cleaning species range data [2s] #> #> ℹ importing species summary data #> ✔ importing species summary data [480ms] #> #> ℹ importing species habitat data #> ✔ importing species habitat data [335ms] #> #> ℹ collating species data #> ✔ collating species data [188ms] #> #> ℹ post-processing results #> ✔ post-processing results [12ms] #> #> ✔ finished # create Area of Habitat data for species spp_aoh_data <- create_spp_aoh_data( x = spp_info_data, output_dir = output_aoh_dir, n_threads = n_threads, cache_dir = cache_dir ) #> ℹ initializing #> ✔ initializing [5ms] #> #> ℹ importing global elevation data #> ✔ importing global elevation data [8s] #> #> ℹ importing global habitat data #> ! argument to \"crosswalk_data\" is missing the following 2 habitat classification codes: \"7.1\", \"7.2\" #> ℹ importing global habitat data #> ✔ importing global habitat data [5s] #> #> ℹ generating Area of Habitat data #> ℹ processing ■■■■■■■■■ [ 25% | ETA: 13s] #> ℹ processing ■■■■■■■■■■■■■■■■ [ 50% | ETA: 8s] #> ℹ processing ■■■■■■■■■■■■■■■■■■■■■■■ [ 75% | ETA: 5s] #> ✔ processing [25.2s] #> #> ℹ generating Area of Habitat data #> ✔ generating Area of Habitat data [25.2s] #> #> ℹ post-processing results #> ✔ post-processing results [13ms] #> #> ✔ finished # compute fractional coverage across a 5 x 5 km spatial grid spp_aoh_frc_data <- calc_spp_frc_data( x = spp_aoh_data, output_dir = output_frc_dir, res = 5000, cache_dir = cache_dir ) #> ℹ importing global habitat data #> ✔ importing global habitat data [5.8s] #> # } if (FALSE) { # interactive() # \\dontrun{ # preview data print(spp_aoh_frc_data) # } } # \\dontrun{ # plot the data to visualize the range maps and fractional coverage data plot_spp_frc_data(spp_aoh_frc_data) # }"},{"path":"https://prioritizr.github.io/aoh/reference/create_spp_aoh_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Create Area of Habitat data — create_spp_aoh_data","title":"Create Area of Habitat data — create_spp_aoh_data","text":"Create Area Habitat (AOH) data species(Brooks et al. 2019). Briefly, function creates Area Habitat data seasonal distribution species stores results raster files disk. Please note procedures designed terrestrial species, apply marine freshwater species.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/create_spp_aoh_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create Area of Habitat data — create_spp_aoh_data","text":"","code":"create_spp_aoh_data( x, output_dir, elevation_data = NULL, habitat_data = NULL, crosswalk_data = NULL, cache_dir = tempdir(), habitat_version = \"latest\", elevation_version = \"latest\", force = FALSE, n_threads = 1, cache_limit = 1000, engine = \"terra\", rasterize_touches = FALSE, verbose = TRUE )"},{"path":"https://prioritizr.github.io/aoh/reference/create_spp_aoh_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create Area of Habitat data — create_spp_aoh_data","text":"x sf::sf() Spatial data delineating species' geographic ranges, habitat preferences, elevational limits. object created using create_spp_info_data() function. output_dir character Folder path save raster (GeoTIFF) files containing Area Habitat data. elevation_data terra::rast() Raster data delineating worldwide elevation data (e.g., Robinson et al. 2014). Defaults NULL data automatically obtained (using get_global_elevation_data()). data obtained automatically, preprocessed version habitat data used reduce processing time. habitat_data terra::rast() Raster data indicating presence different habitat classes across world (e.g., Jung et al. 2020a,b; Lumbierres et al. 2021). grid cell contain integer value specifies habitat class present within cell (based argument crosswalk_data). Defaults NULL data automatically obtained (using get_lumb_cgls_habitat_data()). crosswalk_data data.frame() Table containing data indicate grid cell values argument habitat_data correspond IUCN habitat classification codes. argument contain code column specifies set IUCN habitat classification codes (see iucn_habitat_data(), value column specifies different values argument habitat_data. Defaults NULL crosswalk default habitat data used (.e., crosswalk_lumb_cgls_data()). cache_dir character Folder path downloading caching data. default, temporary directory used (.e., tempdir()). avoid downloading data multiple times, strongly recommended specify persistent storage location (see Examples ). habitat_version character Version habitat dataset used. See documentation version parameter get_lumb_cgls_habitat_data() function details. parameter used habitat data obtained automatically (.e., argument habitat_data NULL). Defaults \"latest\" recent version dataset used data need obtained. elevation_version character Version elevation dataset used. See documentation version parameter get_global_elevation_data() function details. parameter used elevation data obtained automatically (.e., argument elevation_data NULL). Defaults \"latest\" recent version dataset used data need obtained. force logical data downloaded even data already available? Defaults FALSE. n_threads integer Number computational threads use data processing. reduce run time, strongly recommended set parameter based available resources (see Examples section ). Note parallel processing used processing habitat classification elevation data. , parameter influence using preprocessed datasets. Defaults 1. cache_limit integer Amount memory (Mb) caching processing spatial data Geospatial Data Abstraction Library (GDAL). parameter used using \"gdal\" engine. possible, recommended set parameter 5000 (assuming least 8Gb memory available system). Defaults 1000. engine character Value indicating name software use data processing. Available options include \"terra\", \"gdal\", \"grass\" (see details). Defaults \"terra\". rasterize_touches logical x (species' range data) rasterized overlapped elevation habitat raster data? rasterize_touches = FALSE, species' range data treated overlapping raster cell, range data overlap centroid raster cell. rasterize_touches = TRUE, species' range data treated overlapping raster cell, range data overlap part raster cell. Since species' ranges might small overlap centroid raster cells (meaning output Area Habitat map contain suitable habitat species), may preferable use rasterize_touches = TRUE. Note rasterize_touches = TRUE compatible GRASS engine. Defaults FALSE (following Lumbierres et al. 2022). verbose logical progress displayed processing data? Defaults TRUE.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/create_spp_aoh_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create Area of Habitat data — create_spp_aoh_data","text":"sf::st_sf() object. object updated version argument x, contains additional columns describing output raster files. Specifically, contains following columns: id_no numeric species' taxon identifier IUCN Red List. binomial character species name. category character IUCN Red List threat category. migratory logical indicating species processed migratory species (.e., breeding, non-breeding, passage seasonal distribution). seasonal numeric seasonal distribution code. full_habitat_code character habitat classification codes contain suitable habitat species. given species multiple suitable habitat classes, denoted using pipe-delimited format. example, habitat classes denoted codes \"1.5\" \"1.9\" considered suitable given species, codes indicated \"1.5|1.9\". habitat_code character habitat codes used create species' Area Habitat data. Since argument habitat_data may contain habitat classes suitable habitats given species (e.g., default dataset contain subterranean cave systems), column contains subset habitat codes listed \"full_habitat_code\" column used processing. elevation_lower numeric lower elevation threshold used create species' Area Habitat data. elevation_upper numeric upper elevation threshold used create species' Area Habitat data. elevation_upper numeric upper elevation threshold used create species' Area Habitat data. xmin numeric value describing spatial extent output raster file. xmax numeric value describing spatial extent output raster file. ymin numeric value describing spatial extent output raster file. ymax numeric value describing spatial extent output raster file. path character file paths output raster files (see Output file format section details).","code":""},{"path":"https://prioritizr.github.io/aoh/reference/create_spp_aoh_data.html","id":"engines","dir":"Reference","previous_headings":"","what":"Engines","title":"Create Area of Habitat data — create_spp_aoh_data","text":"function can use different software engines data processing (specified via argument engine). Although engine produces results, engines computationally efficient others. default \"terra\" engine uses terra package processing. Although engine easy install fast small datasets, scale well larger datasets. generally recommended use \"gdal\" engine perform data processing Geospatial Data Abstraction Library (GDAL) can used data processing. \"grass\" engine can also used perform data processing Geographic Resources Analysis Support System (GRASS). Note \"grass\" engine requires GDAL GRASS software installed. instructions installing dependencies engines, please see README file.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/create_spp_aoh_data.html","id":"data-processing","dir":"Reference","previous_headings":"","what":"Data processing","title":"Create Area of Habitat data — create_spp_aoh_data","text":"Area Habitat data produced using following procedures. data generated, stored files disk (see Output file format section details). Global elevation habitat classification imported, (needed,, see get_global_elevation_data() get_lumb_cgls_habitat_data(), details)., data available cache directory, (.e. argument cache_dir), automatically downloaded, cache directory., Note elevation habitat data supplied, (.e. arguments elevation_data habitat_data), , user-supplied datasets used generate Area Habitat data., , Area Habitat data generated seasonal, distribution species. given species' distribution,, data generated , () cropping habitat classification elevation data spatial, extent species' seasonal distribution;, (ii) converting habitat classification data binary layer, denoting suitable habitat species' distribution, (using habitat affiliation data species' distribution);, (iii) creating mask based species' elevational limits, elevation data, using mask set values, binary layer zero outside species', limits;, (iv) creating mask rasterizing species' seasonal, distribution, using mask set values binary, layer missing (NA) values outside species', distribution;, (v) saving binary layer Area Habitat data, species' distribution., Note species' distributions already Area Habitat data, available output directory skipped, (unless argument force TRUE). Post-processing routines used prepare results. routines involve updating collated species data include file names spatial metadata Area Habitat data.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/create_spp_aoh_data.html","id":"output-file-format","dir":"Reference","previous_headings":"","what":"Output file format","title":"Create Area of Habitat data — create_spp_aoh_data","text":"Area Habitat data stored separate raster (GeoTIFF) file seasonal distribution species. raster file assigned file name based prefix combination species' taxon identifier (per id_no/SISID column x) identifier seasonal distribution (per seasonality x) (.e., file names named according AOH_{$id_no}_${seasonality}.tif). given raster file, grid cell values denote presence (using value 1) absence (using value 0) suitable habitat inside given species' distribution. Missing (NA) values correspond grid cells located outside species' distribution.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/create_spp_aoh_data.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Create Area of Habitat data — create_spp_aoh_data","text":"Brooks TM, Pimm SL, Akçakaya HR, Buchanan GM, Butchart SHM, Foden W, Hilton-Taylor C, Hoffmann M, Jenkins CN, Joppa L, Li BV, Menon V, Ocampo-Peñuela N, Rondinini C (2019) Measuring terrestrial Area Habitat (AOH) utility IUCN Red List. Trends Ecology & Evolution, 34, 977–986. doi:10.1016/j.tree.2019.06.009 Jung M, Dahal PR, Butchart SHM, Donald PF, De Lamo X, Lesiv M, Kapos V, Rondinini C, Visconti P (2020a) global map terrestrial habitat types. Scientific Data, 7, 1–8. doi:10.1038/s41597-020-00599-8 Jung M, Dahal PR, Butchart SHM, Donald PF, De Lamo X, Lesiv M, Kapos V, Rondinini C, Visconti P (2020b) global map terrestrial habitat types (insert version) [Data set]. Zenodo. doi:10.5281/zenodo.4058819 Lumbierres M, Dahal PR, Di Marco M, Butchart SHM, Donald PF, Rondinini C (2021) Translating habitat class land cover map area habitat terrestrial vertebrates. Conservation Biology, 36, e13851. doi:10.1111/cobi.13851 Lumbierres M, Dahal PR, Soria CD, Di Marco M, Butchart SHM, Donald PF, Rondinini C (2022) Area Habitat maps world’s terrestrial birds mammals. Scientific Data, 9, 749. Robinson N, Regetz J, Guralnick RP (2014) EarthEnv-DEM90: nearly- global, void-free, multi-scale smoothed, 90m digital elevation model fused ASTER SRTM data. ISPRS Journal Photogrammetry Remote Sensing, 87, 57–67. doi:10.1016/j.isprsjprs.2013.11.002","code":""},{"path":"https://prioritizr.github.io/aoh/reference/create_spp_aoh_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create Area of Habitat data — create_spp_aoh_data","text":"","code":"# \\dontrun{ # find file path for example range data following IUCN Red List data format ## N.B., the range data were not obtained from the IUCN Red List, ## and were instead based on data from GBIF (https://www.gbif.org/) path <- system.file(\"extdata\", \"EXAMPLE_SPECIES.zip\", package = \"aoh\") # import data spp_range_data <- read_spp_range_data(path) # specify settings for data processing output_dir <- tempdir() # folder to save AOH data cache_dir <- rappdirs::user_data_dir(\"aoh\") # persistent storage location n_threads <- parallel::detectCores() - 1 # speed up analysis # create cache directory if needed if (!file.exists(cache_dir)) { dir.create(cache_dir, showWarnings = FALSE, recursive = TRUE) } # create species information data spp_info_data <- create_spp_info_data( x = spp_range_data, cache_dir = cache_dir ) #> ℹ initializing #> ✔ initializing [330ms] #> #> ℹ cleaning species range data #> ✔ cleaning species range data [3.1s] #> #> ℹ importing species summary data #> ✔ importing species summary data [329ms] #> #> ℹ importing species habitat data #> ✔ importing species habitat data [330ms] #> #> ℹ collating species data #> ✔ collating species data [230ms] #> #> ℹ post-processing results #> ✔ post-processing results [12ms] #> #> ✔ finished # create Area of Habitat data for species # N.B., the default based on Lumbierres et al. (2021) spp_aoh_data <- create_spp_aoh_data( x = spp_info_data, output_dir = output_dir, n_threads = n_threads, cache_dir = cache_dir ) #> ℹ initializing #> ✔ initializing [5ms] #> #> ℹ importing global elevation data #> ✔ importing global elevation data [7s] #> #> ℹ importing global habitat data #> ! argument to \"crosswalk_data\" is missing the following 2 habitat classification codes: \"7.1\", \"7.2\" #> ℹ importing global habitat data #> ✔ importing global habitat data [5.2s] #> #> ℹ generating Area of Habitat data #> skipping 4 species distributions already processed #> ✔ generating Area of Habitat data [33ms] #> #> ℹ post-processing results #> ✔ post-processing results [12ms] #> #> ✔ finished # } if (FALSE) { # interactive() # \\dontrun{ # preview data print(spp_aoh_data) # } } # \\dontrun{ # import AOH data as a list of terra::rast() objects spp_aoh_rasters <- lapply(spp_aoh_data$path, terra::rast) # print AOH data list print(spp_aoh_rasters) #> [[1]] #> class : SpatRaster #> dimensions : 2593, 3701, 1 (nrow, ncol, nlyr) #> resolution : 100, 100 (x, y) #> extent : -467931, -97831, 4364377, 4623677 (xmin, xmax, ymin, ymax) #> coord. ref. : World_Behrmann #> source : 979_1.tif #> name : lyr1 #> min value : 0 #> max value : 1 #> #> [[2]] #> class : SpatRaster #> dimensions : 2266, 5670, 1 (nrow, ncol, nlyr) #> resolution : 100, 100 (x, y) #> extent : -248331, 318669, 4838277, 5064877 (xmin, xmax, ymin, ymax) #> coord. ref. : World_Behrmann #> source : 59448_1.tif #> name : lyr1 #> min value : 0 #> max value : 1 #> #> [[3]] #> class : SpatRaster #> dimensions : 5149, 5361, 1 (nrow, ncol, nlyr) #> resolution : 100, 100 (x, y) #> extent : -914731, -378631, 4551877, 5066777 (xmin, xmax, ymin, ymax) #> coord. ref. : World_Behrmann #> source : 4657_1.tif #> name : lyr1 #> min value : 0 #> max value : 1 #> #> [[4]] #> class : SpatRaster #> dimensions : 4978, 7512, 1 (nrow, ncol, nlyr) #> resolution : 100, 100 (x, y) #> extent : -904331, -153131, 4568977, 5066777 (xmin, xmax, ymin, ymax) #> coord. ref. : World_Behrmann #> source : 58622_1.tif #> name : lyr1 #> min value : 0 #> max value : 1 #> # plot the data to visualize the range maps and AOH data plot_spp_aoh_data(spp_aoh_data) # }"},{"path":"https://prioritizr.github.io/aoh/reference/create_spp_frc_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Create fractional coverage data — create_spp_frc_data","title":"Create fractional coverage data — create_spp_frc_data","text":"Create fractional coverage data describe species' Area Habitat (AOH) across large spatial scales. Briefly, function creates Area Habitat data seasonal distribution species, overlays Area Habitat data spatial grid, computes proportion suitable habitat available within grid cell (species separately), stores results raster files disk. reduce data storage requirements, Area Habitat data automatically deleted processing. Please note procedures designed terrestrial species, apply marine freshwater species.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/create_spp_frc_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create fractional coverage data — create_spp_frc_data","text":"","code":"create_spp_frc_data( x, output_dir, res, elevation_data = NULL, habitat_data = NULL, crosswalk_data = NULL, cache_dir = tempdir(), habitat_version = \"latest\", elevation_version = \"latest\", force = FALSE, n_threads = 1, cache_limit = 1000, engine = \"terra\", rasterize_touches = FALSE, verbose = TRUE )"},{"path":"https://prioritizr.github.io/aoh/reference/create_spp_frc_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create fractional coverage data — create_spp_frc_data","text":"x sf::sf() Spatial data delineating species' geographic ranges, habitat preferences, elevational limits. object created using create_spp_info_data() function. output_dir character Folder path save raster (GeoTIFF) files containing fractional coverage data. res numeric Resolution computing fractional coverage. Note argument res must factor resolution underlying Area Habitat data. example, value 5000 valid argument underlying data resolution 100 m. elevation_data terra::rast() Raster data delineating worldwide elevation data (e.g., Robinson et al. 2014). Defaults NULL data automatically obtained (using get_global_elevation_data()). data obtained automatically, preprocessed version habitat data used reduce processing time. habitat_data terra::rast() Raster data indicating presence different habitat classes across world (e.g., Jung et al. 2020a,b; Lumbierres et al. 2021). grid cell contain integer value specifies habitat class present within cell (based argument crosswalk_data). Defaults NULL data automatically obtained (using get_lumb_cgls_habitat_data()). crosswalk_data data.frame() Table containing data indicate grid cell values argument habitat_data correspond IUCN habitat classification codes. argument contain code column specifies set IUCN habitat classification codes (see iucn_habitat_data(), value column specifies different values argument habitat_data. Defaults NULL crosswalk default habitat data used (.e., crosswalk_lumb_cgls_data()). cache_dir character Folder path downloading caching data. default, temporary directory used (.e., tempdir()). avoid downloading data multiple times, strongly recommended specify persistent storage location (see Examples ). habitat_version character Version habitat dataset used. See documentation version parameter get_lumb_cgls_habitat_data() function details. parameter used habitat data obtained automatically (.e., argument habitat_data NULL). Defaults \"latest\" recent version dataset used data need obtained. elevation_version character Version elevation dataset used. See documentation version parameter get_global_elevation_data() function details. parameter used elevation data obtained automatically (.e., argument elevation_data NULL). Defaults \"latest\" recent version dataset used data need obtained. force logical data downloaded even data already available? Defaults FALSE. n_threads integer Number computational threads use data processing. reduce run time, strongly recommended set parameter based available resources (see Examples section ). Note parallel processing used processing habitat classification elevation data. , parameter influence using preprocessed datasets. Defaults 1. cache_limit integer Amount memory (Mb) caching processing spatial data Geospatial Data Abstraction Library (GDAL). parameter used using \"gdal\" engine. possible, recommended set parameter 5000 (assuming least 8Gb memory available system). Defaults 1000. engine character Value indicating name software use data processing. Available options include \"terra\", \"gdal\", \"grass\" (see details). Defaults \"terra\". rasterize_touches logical x (species' range data) rasterized overlapped elevation habitat raster data? rasterize_touches = FALSE, species' range data treated overlapping raster cell, range data overlap centroid raster cell. rasterize_touches = TRUE, species' range data treated overlapping raster cell, range data overlap part raster cell. Since species' ranges might small overlap centroid raster cells (meaning output Area Habitat map contain suitable habitat species), may preferable use rasterize_touches = TRUE. Note rasterize_touches = TRUE compatible GRASS engine. Defaults FALSE (following Lumbierres et al. 2022). verbose logical progress displayed processing data? Defaults TRUE.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/create_spp_frc_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create fractional coverage data — create_spp_frc_data","text":"sf::st_sf() object. object updated version argument x, contains additional columns describing output raster files. Specifically, contains following columns: id_no numeric species' taxon identifier IUCN Red List. binomial character species name. category character IUCN Red List threat category. migratory logical indicating species processed migratory species (.e., breeding, non-breeding, passage seasonal distribution). seasonal numeric seasonal distribution code. full_habitat_code character habitat classification codes contain suitable habitat species. given species multiple suitable habitat classes, denoted using pipe-delimited format. example, habitat classes denoted codes \"1.5\" \"1.9\" considered suitable given species, codes indicated \"1.5|1.9\". habitat_code character habitat codes used create species' Area Habitat data. Since argument habitat_data may contain habitat classes suitable habitats given species (e.g., default dataset contain subterranean cave systems), column contains subset habitat codes listed \"full_habitat_code\" column used processing. elevation_lower numeric lower elevation threshold used create species' Area Habitat data. elevation_upper numeric upper elevation threshold used create species' Area Habitat data. elevation_upper numeric upper elevation threshold used create species' Area Habitat data. xmin numeric value describing spatial extent output raster file. xmax numeric value describing spatial extent output raster file. ymin numeric value describing spatial extent output raster file. ymax numeric value describing spatial extent output raster file. path character file paths output raster files (see Output file format section details).","code":""},{"path":"https://prioritizr.github.io/aoh/reference/create_spp_frc_data.html","id":"data-processing","dir":"Reference","previous_headings":"","what":"Data processing","title":"Create fractional coverage data — create_spp_frc_data","text":"fractional coverage data generated using following procedures. data generated, stored files disk (see Output file format section details). Global elevation habitat classification imported, (needed,, see get_global_elevation_data() get_lumb_cgls_habitat_data(), details)., data available cache directory, (.e. argument cache_dir), automatically downloaded, cache directory., Note elevation habitat data supplied, (.e. arguments elevation_data habitat_data), , user-supplied datasets used generate Area Habitat data., , Area Habitat data generated seasonal, distribution species. given species' distribution,, data generated , () cropping habitat classification elevation data spatial, extent species' seasonal distribution;, (ii) converting habitat classification data binary layer, denoting suitable habitat species' distribution, (using habitat affiliation data species' distribution);, (iii) creating mask based species' elevational limits, elevation data, using mask set values, binary layer zero outside species', limits;, (iv) creating mask rasterizing species' seasonal, distribution, using mask set values binary, layer missing (NA) values outside species', distribution;, (v) saving binary layer Area Habitat data, species' distribution., Note species' distributions already Area Habitat data, available output directory skipped, (unless argument force TRUE). terra::rast() object created define standardized grid calculating fractional coverage data. Specifically, grid created aggregating habitat data (per argument habitat_data) specified resolution (per argument res). Area Habitat data used compute fractional coverage data. Specifically, seasonal distribution species, Area Habitat data overlaid standardized grid calculate proportion grid cell contains suitable habitat. Post-processing routines used prepare results. routines involve updating collated species data include file names spatial metadata fractional coverage data.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/create_spp_frc_data.html","id":"output-file-format","dir":"Reference","previous_headings":"","what":"Output file format","title":"Create fractional coverage data — create_spp_frc_data","text":"Fractional coverage data stored separate raster (GeoTIFF) file seasonal distribution species. raster file assigned file name based prefix combination species' taxon identifier (per id_no/SISID column x) identifier seasonal distribution (per seasonality x) (.e., file names named according FRC_{$id_no}_${seasonality}.tif). given raster file, grid cell values denote proportion suitable habitat located within cell. example, value 0 corresponds 0% fractional coverage, 0.5 50% fractional coverage, 1 100% fractional coverage. Missing (NA) values correspond grid cells located entirely outside species' distribution.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/create_spp_frc_data.html","id":"engines","dir":"Reference","previous_headings":"","what":"Engines","title":"Create fractional coverage data — create_spp_frc_data","text":"function can use different software engines data processing (specified via argument engine). Although engine produces results, engines computationally efficient others. default \"terra\" engine uses terra package processing. Although engine easy install fast small datasets, scale well larger datasets. generally recommended use \"gdal\" engine perform data processing Geospatial Data Abstraction Library (GDAL) can used data processing. \"grass\" engine can also used perform data processing Geographic Resources Analysis Support System (GRASS). Note \"grass\" engine requires GDAL GRASS software installed. instructions installing dependencies engines, please see README file.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/create_spp_frc_data.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Create fractional coverage data — create_spp_frc_data","text":"Brooks TM, Pimm SL, Akçakaya HR, Buchanan GM, Butchart SHM, Foden W, Hilton-Taylor C, Hoffmann M, Jenkins CN, Joppa L, Li BV, Menon V, Ocampo-Peñuela N, Rondinini C (2019) Measuring terrestrial Area Habitat (AOH) utility IUCN Red List. Trends Ecology & Evolution, 34, 977–986. doi:10.1016/j.tree.2019.06.009 Jung M, Dahal PR, Butchart SHM, Donald PF, De Lamo X, Lesiv M, Kapos V, Rondinini C, Visconti P (2020a) global map terrestrial habitat types. Scientific Data, 7, 1–8. doi:10.1038/s41597-020-00599-8 Jung M, Dahal PR, Butchart SHM, Donald PF, De Lamo X, Lesiv M, Kapos V, Rondinini C, Visconti P (2020b) global map terrestrial habitat types (insert version) [Data set]. Zenodo. doi:10.5281/zenodo.4058819 Lumbierres M, Dahal PR, Di Marco M, Butchart SHM, Donald PF, Rondinini C (2021) Translating habitat class land cover map area habitat terrestrial vertebrates. Conservation Biology, 36, e13851. doi:10.1111/cobi.13851 Lumbierres M, Dahal PR, Soria CD, Di Marco M, Butchart SHM, Donald PF, Rondinini C (2022) Area Habitat maps world’s terrestrial birds mammals. Scientific Data, 9, 749. Robinson N, Regetz J, Guralnick RP (2014) EarthEnv-DEM90: nearly- global, void-free, multi-scale smoothed, 90m digital elevation model fused ASTER SRTM data. ISPRS Journal Photogrammetry Remote Sensing, 87, 57–67. doi:10.1016/j.isprsjprs.2013.11.002","code":""},{"path":[]},{"path":"https://prioritizr.github.io/aoh/reference/create_spp_frc_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create fractional coverage data — create_spp_frc_data","text":"","code":"# \\dontrun{ # find file path for example range data following IUCN Red List data format ## N.B., the range data were not obtained from the IUCN Red List, ## and were instead based on data from GBIF (https://www.gbif.org/) path <- system.file(\"extdata\", \"EXAMPLE_SPECIES.zip\", package = \"aoh\") # import data spp_range_data <- read_spp_range_data(path) # specify settings for data processing output_dir <- tempdir() # folder to save coverage data cache_dir <- rappdirs::user_data_dir(\"aoh\") # persistent storage location n_threads <- parallel::detectCores() - 1 # speed up analysis # create cache directory if needed if (!file.exists(cache_dir)) { dir.create(cache_dir, showWarnings = FALSE, recursive = TRUE) } # create species' information data spp_info_data <- create_spp_info_data( x = spp_range_data, cache_dir = cache_dir ) #> ℹ initializing #> ✔ initializing [338ms] #> #> ℹ cleaning species range data #> ✔ cleaning species range data [3.1s] #> #> ℹ importing species summary data #> ✔ importing species summary data [331ms] #> #> ℹ importing species habitat data #> ✔ importing species habitat data [327ms] #> #> ℹ collating species data #> ✔ collating species data [221ms] #> #> ℹ post-processing results #> ✔ post-processing results [10ms] #> #> ✔ finished # create fractional coverage data spp_frc_data <- create_spp_frc_data( x = spp_info_data, res = 5000, output_dir = output_dir, n_threads = n_threads, cache_dir = cache_dir ) #> ℹ initializing #> ✔ initializing [4ms] #> #> ℹ importing global elevation data #> ✔ importing global elevation data [7.2s] #> #> ℹ importing global habitat data #> ! argument to \"crosswalk_data\" is missing the following 2 habitat classification codes: \"7.1\", \"7.2\" #> ℹ importing global habitat data #> ✔ importing global habitat data [5s] #> #> ℹ generating Area of Habitat data #> skipping 4 species distributions already processed #> ✔ generating Area of Habitat data [32ms] #> #> ℹ post-processing results #> ✔ post-processing results [32ms] #> #> ✔ finished # } if (FALSE) { # interactive() # \\dontrun{ # preview data print(spp_frc_data) # } } # \\dontrun{ # import fractional coverage data as a list of terra::rast() objects spp_frc_rasters <- lapply(spp_frc_data$path, terra::rast) # print list of rasters print(spp_frc_rasters) #> [[1]] #> class : SpatRaster #> dimensions : 53, 75, 1 (nrow, ncol, nlyr) #> resolution : 5000, 5000 (x, y) #> extent : -472531, -97531, 4362077, 4627077 (xmin, xmax, ymin, ymax) #> coord. ref. : World_Behrmann #> source : FRC_979_1.tif #> name : lyr.1 #> min value : 0.0000 #> max value : 0.9968 #> #> [[2]] #> class : SpatRaster #> dimensions : 46, 115, 1 (nrow, ncol, nlyr) #> resolution : 5000, 5000 (x, y) #> extent : -252531, 322469, 4837077, 5067077 (xmin, xmax, ymin, ymax) #> coord. ref. : World_Behrmann #> source : FRC_59448_1.tif #> name : lyr.1 #> min value : 0 #> max value : 1 #> #> [[3]] #> class : SpatRaster #> dimensions : 104, 108, 1 (nrow, ncol, nlyr) #> resolution : 5000, 5000 (x, y) #> extent : -917531, -377531, 4547077, 5067077 (xmin, xmax, ymin, ymax) #> coord. ref. : World_Behrmann #> source : FRC_4657_1.tif #> name : lyr.1 #> min value : 0.0000 #> max value : 0.9932 #> #> [[4]] #> class : SpatRaster #> dimensions : 100, 151, 1 (nrow, ncol, nlyr) #> resolution : 5000, 5000 (x, y) #> extent : -907531, -152531, 4567077, 5067077 (xmin, xmax, ymin, ymax) #> coord. ref. : World_Behrmann #> source : FRC_58622_1.tif #> name : lyr.1 #> min value : 0 #> max value : 1 #> # plot the data to visualize the range maps and fractional coverage data plot_spp_frc_data(spp_frc_data) # }"},{"path":"https://prioritizr.github.io/aoh/reference/create_spp_info_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Create species' information data — create_spp_info_data","title":"Create species' information data — create_spp_info_data","text":"Create data collate information needed generate Area Habitat data (Brooks et al. 2019). Briefly, function cleans collates data describing species' geographic ranges, habitat preferences, elevational limits. Please note procedures designed terrestrial species, apply marine freshwater species.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/create_spp_info_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create species' information data — create_spp_info_data","text":"","code":"create_spp_info_data( x, spp_summary_data = NULL, spp_habitat_data = NULL, cache_dir = tempdir(), iucn_version = \"latest\", key = NULL, force = FALSE, keep_iucn_rl_presence = c(1, 2), keep_iucn_rl_origin = c(1, 2, 6), keep_iucn_rl_seasonal = c(1, 2, 3, 4), omit_habitat_codes = iucn_habitat_codes_marine(), adjust_elevational_limits = TRUE, adjust_habitat_codes = TRUE, crs = sf::st_crs(\"ESRI:54017\"), geometry_precision = 1e+05, verbose = TRUE )"},{"path":"https://prioritizr.github.io/aoh/reference/create_spp_info_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create species' information data — create_spp_info_data","text":"x sf::sf() Spatial data delineating species geographic ranges obtained IUCN Red List. See details. spp_summary_data tibble::tibble() Table containing summary information species (argument x). Specifically, argument contain following columns: \"id_no\", \"elevation_lower\", \"elevation_upper\" columns. , \"id_no\" corresponds species' taxon identifier (also present x), \"elevation_lower\" \"elevation_upper\" columns indicate lowest highest elevations contain habitat species. Defaults NULL data automatically obtained latest version IUCN Red List. spp_habitat_data tibble::tibble() Table containing habitat preference information species (argument x). Specifically, argument contain following columns: \"id_no\", \"code\", \"suitability\", \"season\" columns. , \"id_no\" corresponds species' taxon identifier (also present x), \"code\" indicates habitat classification code suitable species (.e., based layer names argument habitat_data), \"suitability\" indicates level suitability habitat class given species (e.g., using values \"Suitable\" \"Marginal\"), \"season\" indicates habitat class suitable particular seasonal distribution (e.g., \"Breeding\"). Defaults NULL data automatically obtained latest version IUCN Red List. cache_dir character Folder path downloading caching data. default, temporary directory used (.e., tempdir()). avoid downloading data multiple times, strongly recommended specify persistent storage location (see Examples ). iucn_version character Version IUCN Red List dataset used. See documentation version parameter get_spp_summary_data() function details. Defaults \"latest\" recent version dataset used. key character Token querying IUCN Red List API. Defaults NULL token accessed \"IUCN_REDLIST_KEY\" environmental variable (can specified .Renviron file). force logical data downloaded even data already available? Defaults FALSE. keep_iucn_rl_presence integer IUCN Red List presence codes retain (see IUCN SSC Red List Technical Working Group 2021 details). Species' ranges associated codes excluded data cleaning procedures. Defaults numeric vector containing 1 2 (corresponding extant probably extant). keep_iucn_rl_origin integer IUCN Red List origin codes retain (see IUCN SSC Red List Technical Working Group 2021 details). Species' ranges associated codes excluded data cleaning procedures. Defaults numeric vector containing 1, 2, 6. (corresponding native, reintroduced, assisted colonization). keep_iucn_rl_seasonal integer IUCN Red List seasonal codes retain (see IUCN SSC Red List Technical Working Group 2021 details). Species' ranges associated codes excluded data cleaning procedures. Defaults numeric vector containing 1, 2, 3, 4. (corresponding resident, breeding season, non-breeding season, passage distributions). omit_habitat_codes character Habitat classification codes omit resulting Area Habitat data. Please see IUCN Red List Habitat Classification Scheme full range habitat classification codes. example, aim identify natural places contain suitable conditions, areas classified anthropogenically modified (iucn_habitat_codes_artificial()), introduced vegetation (iucn_habitat_codes_introduced(), unknown habitat (iucn_habitat_codes_misc()) excluded. Defaults iucn_habitat_codes_marine(), marine habitats excluded. adjust_elevational_limits logical elevation limits adjusted correct errors? Defaults TRUE automatically fix errors (see Data processing section details). adjust_habitat_codes logical habitat codes adjusted assigned species' distributions following guidelines Key Biodiversity areas? Defaults TRUE (see Data processing section details). Otherwise, FALSE, habitat codes assigned species' distributions following exact matches (e.g., codes described resident distribution assigned resident distribution). crs st_crs() object containing coordinate reference system reprojecting species' range data. coordinate reference system elevation habitat classification data subsequently used generate Area Habitat data (using create_spp_aoh_data() create_spp_frc_data() functions). Defaults World Behrmann coordinate reference system (ESRI:54017), appropriate elevation habitat datasets available package (e.g., using get_global_elevation_data() get_lumb_cgls_habitat_data() functions). geometry_precision numeric level precision processing spatial data (used sf::st_set_precision()). default 100000 (higher values indicate higher precision). Although level precision generally suitable fine-scale analyses, might result unnecessarily long computation times (e.g., 1500 suitable national-scale analyses). encounter geometry errors, increasing argument parameter can sometimes resolve issues. verbose logical progress displayed processing data? Defaults TRUE.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/create_spp_info_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create species' information data — create_spp_info_data","text":"sf::st_sf() object containing information needed create Area Habitat data. contains cleaned versions species' range maps columns containing species' elevational limits habitat preferences. Specifically, object contains following columns: id_no numeric species' taxon identifier IUCN Red List. binomial character species name. category character IUCN Red List threat category. migratory logical indicating species processed migratory species (.e., breeding, non-breeding, passage seasonal distribution). seasonal numeric seasonal distribution code. full_habitat_code character habitat classification codes contain suitable habitat species. given species multiple suitable habitat classes, denoted using pipe-delimited format. example, habitat classes denoted codes \"1.5\" \"1.9\" considered suitable given species, codes indicated \"1.5|1.9\". elevation_lower numeric lower elevation threshold used create species' Area Habitat data. elevation_upper numeric upper elevation threshold used create species' Area Habitat data. geometry sf::st_sfc() geometries species' distributions.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/create_spp_info_data.html","id":"species-range-data-format","dir":"Reference","previous_headings":"","what":"Species range data format","title":"Create species' information data — create_spp_info_data","text":"Species range data expected follow data format conventions IUCN Red List (see IUCN Red List documentation details). Specifically, argument x sf::st_sf() object following columns: id_no, presence, origin, seasonal. can also contain following optional columns: terrestrial (terrestial), freshwater, marine. provide brief description column: id_no numeric taxon identifier IUCN Red List. presence numeric identifier describing information presence taxon range data. origin numeric identifier describing species native location(s) described range data. seasonality numeric identifier describing species occupied location(s) describe range data throughout whole year, certain seasons. terrestial character value indicating range data pertain terrestrial environments (\"true\" \"false\" values.) freshwater character value indicating range data pertain freshwater environments (\"true\" \"false\" values.) marine character value indicating range data pertain marine environments (\"true\" \"false\" values.)","code":""},{"path":"https://prioritizr.github.io/aoh/reference/create_spp_info_data.html","id":"data-processing","dir":"Reference","previous_headings":"","what":"Data processing","title":"Create species' information data — create_spp_info_data","text":"species' information data produced using following procedures. Species range data cleaned. default, range data cleaned following guidelines identification Key Biodiversity Areas (KBA Standards Appeals Committee IUCN SSC/WCPA 2022). Specifically, default cleaning procedures involves excluding places () species' presence extant probably extant (.e. filtering based presence == 1 presence == 2); (ii) species' origin native, reintroduced, result assisted colonization (.e. filtering based origin == 1, origin == 2, origin == 6); (iii) available information species' seasonal distribution uncertain (.e. filtering based seasonal != 5); (iv) species' distribution terrestrial (.e. filtering based terrestrial == \"true\"). Additionally, species' range data spatially dissolved seasonal distribution taxon represented separate geometry. Finally, geoprocessing routines used detect repair invalid geometries. Species summary habitat preferences data imported (needed, see get_spp_summary_data() get_spp_habitat_data() details). data available cache directory (.e. argument cache_dir), automatically downloaded cache directory. specified (per adjust_elevational_limits = TRUE), elevational limit values species summary data adjusted correct errors. adjustments applied based following procedures: () species lacks lower upper elevational limits, limits -500 m 9,000 m assumed (respectively); (ii) since IUCN Red List assigns lower limit values 0 m many species parts distribution areas sea level, lower elevational limit values equal 0 m replaced -500 m; (iii) lower elevational limit values -500 m replaced -500 m; (iv) upper elevational limit values 9000 replaced 9000 m; (v) lower elevational limit greater upper elevational limit, limits -500 m 9000 m assumed (respectively); (vi) lower elevational limit within 50 m upper elevational limit, limits adjusted 50 m difference . Otherwise, FALSE, elevation limit values altered. species classified either migratory non-migratory, based presence breeding, non-breeding, passage distributions species range data (.e., x`). example, species resident distribution species range data, classified non-migratory species. species resident breeding distribution species range data, classified migratory species. specified (per adjust_habitat_codes = TRUE), habitat codes species habitat preferences data adjusted based guidelines identification Key Biodiversity Areas (KBA Standards Appeals Committee IUCN SSC/WCPA 2022). adjustments based following procedures: () resident distributions non-migratory species assigned habitat codes described species habitat preference data species' resident, breeding, non-breeding, passage, seasonal occurrence uncertain, missing (NA) seasonal distributions; (ii) resident distributions migratory species assigned habitat codes described species habitat preference data species' resident, breeding, non-breeding, seasonal occurrence uncertain, missing (NA) seasonal distributions; (ii) breeding distributions assigned habitat codes described species' resident, breeding, seasonal occurrence uncertain missing (NA) seasonal distributions; (iii) non-breeding distributions assigned habitat codes described species' resident, non-breeding, seasonal occurrence uncertain, missing (NA) seasonal distributions; (iv) passage distributions assigned habitat codes described species' resident, passage, seasonal occurrence uncertain, missing (NA) seasonal distributions. adjustments applied (per adjust_habitat_codes = FALSE), habitat codes assigned species' distributions based exact matches (e.g., codes described resident distribution assigned resident distribution). Species information collated single dataset containing geographic ranges, migratory status, habitat preferences, elevational limits. Specifically, taxon identifiers (per id_no/SISID columns) used merge datasets together. Post-processing routines used prepare output data.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/create_spp_info_data.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Create species' information data — create_spp_info_data","text":"Brooks TM, Pimm SL, Akçakaya HR, Buchanan GM, Butchart SHM, Foden W, Hilton-Taylor C, Hoffmann M, Jenkins CN, Joppa L, Li BV, Menon V, Ocampo-Peñuela N, Rondinini C (2019) Measuring terrestrial Area Habitat (AOH) utility IUCN Red List. Trends Ecology & Evolution, 34, 977–986. doi:10.1016/j.tree.2019.06.009 KBA Standards Appeals Committee IUCN SSC/WCPA (2022). Guidelines using Global Standard Identification Key Biodiversity Areas. Version 1.2. Gland, Switzerland: IUCN.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/create_spp_info_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create species' information data — create_spp_info_data","text":"","code":"# \\dontrun{ # find file path for example range data following IUCN Red List data format ## N.B., the range data were not obtained from the IUCN Red List, ## and were instead based on data from GBIF (https://www.gbif.org/) path <- system.file(\"extdata\", \"EXAMPLE_SPECIES.zip\", package = \"aoh\") # import data spp_range_data <- read_spp_range_data(path) # specify persistent storage location for data processing cache_dir <- rappdirs::user_data_dir(\"aoh\") # create cache directory if needed if (!file.exists(cache_dir)) { dir.create(cache_dir, showWarnings = FALSE, recursive = TRUE) } # create species information data spp_info_data <- create_spp_info_data( x = spp_range_data, cache_dir = cache_dir ) #> ℹ initializing #> ✔ initializing [351ms] #> #> ℹ cleaning species range data #> ✔ cleaning species range data [3.3s] #> #> ℹ importing species summary data #> ✔ importing species summary data [338ms] #> #> ℹ importing species habitat data #> ✔ importing species habitat data [329ms] #> #> ℹ collating species data #> ✔ collating species data [237ms] #> #> ℹ post-processing results #> ✔ post-processing results [12ms] #> #> ✔ finished # } if (FALSE) { # interactive() # \\dontrun{ # preview data print(spp_info_data) # } }"},{"path":"https://prioritizr.github.io/aoh/reference/crosswalk_jung_lvl1_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Crosswalk data for Jung et al. (2020) (level 1 classification) — crosswalk_jung_lvl1_data","title":"Crosswalk data for Jung et al. (2020) (level 1 classification) — crosswalk_jung_lvl1_data","text":"International Union Conservation Nature (IUCN) Red List Threatened Species provides habitat classification scheme different habitat types. map spatial location habitat classes, Jung et al. (2020a) developed global raster dataset combining range different land use land cover data (Jung et al. 2020b). created two habitat classification schemes – termed level 1 level 2 classification schemes – describe coarse-scale fine-scale differences habitat classes. dataset provides crosswalk table associate values level 1 raster dataset IUCN habitat classes.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/crosswalk_jung_lvl1_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Crosswalk data for Jung et al. (2020) (level 1 classification) — crosswalk_jung_lvl1_data","text":"","code":"data(crosswalk_jung_lvl1_data)"},{"path":"https://prioritizr.github.io/aoh/reference/crosswalk_jung_lvl1_data.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Crosswalk data for Jung et al. (2020) (level 1 classification) — crosswalk_jung_lvl1_data","text":"data frame (tibble::tibble()) object 126 rows 2 columns. row corresponds different IUCN habitat class. following columns: code character code given IUCN habitat class. value numeric value assigned grid cells raster data contain IUCN habitat class (see get_jung_lvl1_habitat_data()).","code":""},{"path":"https://prioritizr.github.io/aoh/reference/crosswalk_jung_lvl1_data.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Crosswalk data for Jung et al. (2020) (level 1 classification) — crosswalk_jung_lvl1_data","text":"data obtained Jung et al. (2020b).","code":""},{"path":"https://prioritizr.github.io/aoh/reference/crosswalk_jung_lvl1_data.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Crosswalk data for Jung et al. (2020) (level 1 classification) — crosswalk_jung_lvl1_data","text":"Jung M, Dahal PR, Butchart SHM, Donald PF, De Lamo X, Lesiv M, Kapos V, Rondinini C, Visconti P (2020a) global map terrestrial habitat types. Scientific Data, 7, 1–8. doi:10.1038/s41597-020-00599-8 Jung M, Dahal PR, Butchart SHM, Donald PF, De Lamo X, Lesiv M, Kapos V, Rondinini C, Visconti P (2020b) global map terrestrial habitat types (insert version) [Data set]. Zenodo. doi:10.5281/zenodo.4058819","code":""},{"path":[]},{"path":"https://prioritizr.github.io/aoh/reference/crosswalk_jung_lvl1_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Crosswalk data for Jung et al. (2020) (level 1 classification) — crosswalk_jung_lvl1_data","text":"","code":"# load data data(crosswalk_jung_lvl1_data) # print data print(crosswalk_jung_lvl1_data) #> # A tibble: 126 × 2 #> code value #> #> 1 1 100 #> 2 1.1 100 #> 3 1.2 100 #> 4 1.3 100 #> 5 1.4 100 #> 6 1.5 100 #> 7 1.6 100 #> 8 1.7 100 #> 9 1.8 100 #> 10 1.9 100 #> # ℹ 116 more rows"},{"path":"https://prioritizr.github.io/aoh/reference/crosswalk_jung_lvl2_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Crosswalk data for Jung et al. (2020) (level 2 classification) — crosswalk_jung_lvl2_data","title":"Crosswalk data for Jung et al. (2020) (level 2 classification) — crosswalk_jung_lvl2_data","text":"International Union Conservation Nature (IUCN) Red List Threatened Species provides habitat classification scheme different habitat types. map spatial location habitat classes, Jung et al. (2020a) developed global raster dataset combining range different land use land cover data (Jung et al. 2020b). created two habitat classification schemes – termed level 1 level 2 classification schemes – describe coarse-scale fine-scale differences habitat classes. dataset provides crosswalk table associate values level 2 raster dataset IUCN habitat classes.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/crosswalk_jung_lvl2_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Crosswalk data for Jung et al. (2020) (level 2 classification) — crosswalk_jung_lvl2_data","text":"","code":"data(crosswalk_jung_lvl2_data)"},{"path":"https://prioritizr.github.io/aoh/reference/crosswalk_jung_lvl2_data.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Crosswalk data for Jung et al. (2020) (level 2 classification) — crosswalk_jung_lvl2_data","text":"data frame (tibble::tibble()) object 126 rows 2 columns. row corresponds different IUCN habitat class. following columns: code character code given IUCN habitat class. value numeric value assigned grid cells raster data contain IUCN habitat class (see get_jung_lvl2_habitat_data()).","code":""},{"path":"https://prioritizr.github.io/aoh/reference/crosswalk_jung_lvl2_data.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Crosswalk data for Jung et al. (2020) (level 2 classification) — crosswalk_jung_lvl2_data","text":"data obtained Jung et al. (2020b).","code":""},{"path":"https://prioritizr.github.io/aoh/reference/crosswalk_jung_lvl2_data.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Crosswalk data for Jung et al. (2020) (level 2 classification) — crosswalk_jung_lvl2_data","text":"Jung M, Dahal PR, Butchart SHM, Donald PF, De Lamo X, Lesiv M, Kapos V, Rondinini C, Visconti P (2020a) global map terrestrial habitat types. Scientific Data, 7, 1–8. doi:10.1038/s41597-020-00599-8 Jung M, Dahal PR, Butchart SHM, Donald PF, De Lamo X, Lesiv M, Kapos V, Rondinini C, Visconti P (2020b) global map terrestrial habitat types (insert version) [Data set]. Zenodo. doi:10.5281/zenodo.4058819","code":""},{"path":[]},{"path":"https://prioritizr.github.io/aoh/reference/crosswalk_jung_lvl2_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Crosswalk data for Jung et al. (2020) (level 2 classification) — crosswalk_jung_lvl2_data","text":"","code":"# load data data(crosswalk_jung_lvl2_data) # print data print(crosswalk_jung_lvl2_data) #> # A tibble: 126 × 2 #> code value #> #> 1 1 100 #> 2 1.1 101 #> 3 1.2 102 #> 4 1.3 103 #> 5 1.4 104 #> 6 1.5 105 #> 7 1.6 106 #> 8 1.7 107 #> 9 1.8 108 #> 10 1.9 109 #> # ℹ 116 more rows"},{"path":"https://prioritizr.github.io/aoh/reference/crosswalk_jung_plvl1_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Crosswalk data for Jung (2020) potential habitat classification (level 1) — crosswalk_jung_plvl1_data","title":"Crosswalk data for Jung (2020) potential habitat classification (level 1) — crosswalk_jung_plvl1_data","text":"International Union Conservation Nature (IUCN) Red List Threatened Species provides habitat classification scheme different habitat types. map spatial location restoration actions might produce habitat classes, Jung (2020) developed global raster dataset based potential vegetation data.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/crosswalk_jung_plvl1_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Crosswalk data for Jung (2020) potential habitat classification (level 1) — crosswalk_jung_plvl1_data","text":"","code":"data(crosswalk_jung_plvl1_data)"},{"path":"https://prioritizr.github.io/aoh/reference/crosswalk_jung_plvl1_data.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Crosswalk data for Jung (2020) potential habitat classification (level 1) — crosswalk_jung_plvl1_data","text":"data frame (tibble::tibble()) object 126 rows 2 columns. row corresponds different IUCN habitat class. following columns: code character code given IUCN habitat class. value numeric value assigned grid cells raster data contain IUCN habitat class (see get_jung_plvl1_habitat_data()).","code":""},{"path":"https://prioritizr.github.io/aoh/reference/crosswalk_jung_plvl1_data.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Crosswalk data for Jung (2020) potential habitat classification (level 1) — crosswalk_jung_plvl1_data","text":"data obtained Jung (2020).","code":""},{"path":"https://prioritizr.github.io/aoh/reference/crosswalk_jung_plvl1_data.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Crosswalk data for Jung (2020) potential habitat classification (level 1) — crosswalk_jung_plvl1_data","text":"Jung M (2020) layer global potential habitats (insert version) [Data set]. Zenodo. doi:10.5281/zenodo.4038749","code":""},{"path":[]},{"path":"https://prioritizr.github.io/aoh/reference/crosswalk_jung_plvl1_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Crosswalk data for Jung (2020) potential habitat classification (level 1) — crosswalk_jung_plvl1_data","text":"","code":"# load data data(crosswalk_jung_plvl1_data) # print data print(crosswalk_jung_plvl1_data) #> # A tibble: 126 × 2 #> code value #> #> 1 1 100 #> 2 1.1 100 #> 3 1.2 100 #> 4 1.3 100 #> 5 1.4 100 #> 6 1.5 100 #> 7 1.6 100 #> 8 1.7 100 #> 9 1.8 100 #> 10 1.9 100 #> # ℹ 116 more rows"},{"path":"https://prioritizr.github.io/aoh/reference/crosswalk_lumb_cgls_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Crosswalk data for CGLS based on Lumbierres et al. (2021) — crosswalk_lumb_cgls_data","title":"Crosswalk data for CGLS based on Lumbierres et al. (2021) — crosswalk_lumb_cgls_data","text":"International Union Conservation Nature (IUCN) Red List Threatened Species provides habitat classification scheme different habitat types. map spatial location habitat classes, Lumbierres et al. (2021) developed global habitat classification dataset using Copernicus Global Land Service Land Cover (CGLS-LC100) dataset (Buchhorn et al., 2019; Buchhorn et al., 20200). dataset provides crosswalk table associate values raster dataset IUCN habitat classes.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/crosswalk_lumb_cgls_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Crosswalk data for CGLS based on Lumbierres et al. (2021) — crosswalk_lumb_cgls_data","text":"","code":"data(crosswalk_lumb_cgls_data)"},{"path":"https://prioritizr.github.io/aoh/reference/crosswalk_lumb_cgls_data.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Crosswalk data for CGLS based on Lumbierres et al. (2021) — crosswalk_lumb_cgls_data","text":"data frame (tibble::tibble()) object 159 rows 2 columns. row corresponds different IUCN habitat class. following columns: code character code given IUCN habitat class. value numeric value assigned grid cells raster data contain IUCN habitat class (see get_lumb_cgls_habitat_data()).","code":""},{"path":"https://prioritizr.github.io/aoh/reference/crosswalk_lumb_cgls_data.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Crosswalk data for CGLS based on Lumbierres et al. (2021) — crosswalk_lumb_cgls_data","text":"data derived Lumbierres et al. (2021).","code":""},{"path":"https://prioritizr.github.io/aoh/reference/crosswalk_lumb_cgls_data.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Crosswalk data for CGLS based on Lumbierres et al. (2021) — crosswalk_lumb_cgls_data","text":"Buchhorn M, Smets B, Bertels L, Lesiv M, Tsendbazar N-E, Herold M, Fritz SA (2019) Copernicus Global Land Service: Land Cover 100m: Epoch 2015: Globe. Dataset global component Copernicus Land Monitoring Service. doi:10.5281/zenodo.3243508 Buchhorn M, Smets B, Bertels L, de Roo B, Lesiv M, Tsendbazar N-E, Linlin L, Tarko (2020) Copernicus Global Land Service: Land Cover 100m: Version 3 Globe 2015–2019: Product User Manual. Geneve: Zenodo. doi:10.5281/zenodo.3606295 Lumbierres M, Dahal PR, Di Marco M, Butchart SHM, Donald PF, Rondinini C (2021) Translating habitat class land cover map area habitat terrestrial vertebrates. Conservation Biology, 36, e13851. doi:10.1111/cobi.13851","code":""},{"path":[]},{"path":"https://prioritizr.github.io/aoh/reference/crosswalk_lumb_cgls_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Crosswalk data for CGLS based on Lumbierres et al. (2021) — crosswalk_lumb_cgls_data","text":"","code":"# load data data(crosswalk_lumb_cgls_data) # print data print(crosswalk_lumb_cgls_data) #> # A tibble: 159 × 2 #> code value #> #> 1 1 100 #> 2 1.1 100 #> 3 1.2 100 #> 4 1.3 100 #> 5 1.4 100 #> 6 1.5 100 #> 7 1.6 100 #> 8 1.7 100 #> 9 1.8 100 #> 10 1.9 100 #> # ℹ 149 more rows"},{"path":"https://prioritizr.github.io/aoh/reference/get_global_elevation_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Get global elevation data — get_global_elevation_data","title":"Get global elevation data — get_global_elevation_data","text":"Import elevation data derived Robinson et al. (2014). data available locally, downloaded Zenodo repository (doi:10.5281/zenodo.5719984 ).","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_global_elevation_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get global elevation data — get_global_elevation_data","text":"","code":"get_global_elevation_data( dir = tempdir(), version = \"latest\", force = FALSE, verbose = TRUE )"},{"path":"https://prioritizr.github.io/aoh/reference/get_global_elevation_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get global elevation data — get_global_elevation_data","text":"dir character Folder path downloading caching data. default, data downloaded temporary directory (.e., tempdir()). avoid downloading data multiple times, strongly recommended specify persistent storage location (see Examples ). version character Value indicating specific version dataset downloaded. version indicated using Digital Object Identifier specific version required (e.g. \"10.5281/zenodo.3673586\"). Defaults \"latest\" latest release dataset available habitat data used. force logical data downloaded even data already available? Defaults FALSE. verbose logical progress displayed downloading data? Defaults TRUE.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_global_elevation_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get global elevation data — get_global_elevation_data","text":"terra::rast() object containing elevation data (100 m resolution). Pixel values indicate elevation (m).","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_global_elevation_data.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get global elevation data — get_global_elevation_data","text":"data produced () obtaining raw elevation data EarthEnv project, (ii) collating data single raster (GeoTIFF) file, (iii) reprojecting data World Behrmannn coordinate reference systems (ESRI:54017). details, see online repository containing code used process data.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_global_elevation_data.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Get global elevation data — get_global_elevation_data","text":"Robinson N, Regetz J, Guralnick RP (2014) EarthEnv-DEM90: nearly- global, void-free, multi-scale smoothed, 90m digital elevation model fused ASTER SRTM data. ISPRS Journal Photogrammetry Remote Sensing, 87:57–67. doi:10.1016/j.isprsjprs.2013.11.002","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_global_elevation_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get global elevation data — get_global_elevation_data","text":"","code":"# \\dontrun{ # define persistent storage location download_dir <- rappdirs::user_data_dir(\"aoh\") # create download directory if needed if (!file.exists(download_dir)) { dir.create(download_dir, showWarnings = FALSE, recursive = TRUE) } # download and import elevation data elev_data <- get_global_elevation_data(download_dir) # preview data print(elev_data) #> class : SpatRaster #> dimensions : 132926, 347351, 1 (nrow, ncol, nlyr) #> resolution : 100, 100 (x, y) #> extent : -17367531, 17367569, -6005523, 7287077 (xmin, xmax, ymin, ymax) #> coord. ref. : World_Behrmann #> source : dem-100m-esri54017.tif #> name : dem-100m-esri54017 # plot data plot(elev_data) # }"},{"path":"https://prioritizr.github.io/aoh/reference/get_jung_lvl1_habitat_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Jung et al. (2020) habitat classification data (level 1) — get_jung_lvl1_habitat_data","title":"Get Jung et al. (2020) habitat classification data (level 1) — get_jung_lvl1_habitat_data","text":"Import habitat classification data (level 1) derived Jung et al. (2020a). data available locally, downloaded Zenodo repository (doi:10.5281/zenodo.6622029 ).","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_jung_lvl1_habitat_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Jung et al. (2020) habitat classification data (level 1) — get_jung_lvl1_habitat_data","text":"","code":"get_jung_lvl1_habitat_data( dir = tempdir(), version = \"latest\", force = FALSE, verbose = TRUE )"},{"path":"https://prioritizr.github.io/aoh/reference/get_jung_lvl1_habitat_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get Jung et al. (2020) habitat classification data (level 1) — get_jung_lvl1_habitat_data","text":"dir character Folder path downloading caching data. default, data downloaded temporary directory (.e., tempdir()). avoid downloading data multiple times, strongly recommended specify persistent storage location (see Examples ). version character Value indicating specific version dataset downloaded. version indicated using Digital Object Identifier specific version required (e.g. \"10.5281/zenodo.3673586\"). Defaults \"latest\" latest release dataset available habitat data used. force logical data downloaded even data already available? Defaults FALSE. verbose logical progress displayed downloading data? Defaults TRUE.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_jung_lvl1_habitat_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get Jung et al. (2020) habitat classification data (level 1) — get_jung_lvl1_habitat_data","text":"terra::rast() object containing habitat data (100 m resolution). Pixel values indicate habitat classification codes.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_jung_lvl1_habitat_data.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get Jung et al. (2020) habitat classification data (level 1) — get_jung_lvl1_habitat_data","text":"data produced obtaining level 1 habitat classification data Zenodo repository (Jung et al. 2020b), resampling data (using nearest neighbor interpolation) World Behrmannn coordinate reference systems (ESRI:54017).","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_jung_lvl1_habitat_data.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Get Jung et al. (2020) habitat classification data (level 1) — get_jung_lvl1_habitat_data","text":"Jung M, Dahal PR, Butchart SHM, Donald PF, De Lamo X, Lesiv M, Kapos V, Rondinini C, Visconti P (2020a) global map terrestrial habitat types. Scientific Data, 7, 1–8. doi:10.1038/s41597-020-00599-8 Jung M, Dahal PR, Butchart SHM, Donald PF, De Lamo X, Lesiv M, Kapos V, Rondinini C, Visconti P (2020b) global map terrestrial habitat types (insert version) [Data set]. Zenodo. doi:10.5281/zenodo.4058819","code":""},{"path":[]},{"path":"https://prioritizr.github.io/aoh/reference/get_jung_lvl1_habitat_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get Jung et al. (2020) habitat classification data (level 1) — get_jung_lvl1_habitat_data","text":"","code":"# \\dontrun{ # define persistent storage location download_dir <- rappdirs::user_data_dir(\"aoh\") # create download directory if needed if (!file.exists(download_dir)) { dir.create(download_dir, showWarnings = FALSE, recursive = TRUE) } # download and import habitat data habitat_data <- get_jung_lvl1_habitat_data(download_dir, version = \"latest\") # preview data print(habitat_data) #> class : SpatRaster #> dimensions : 132926, 347351, 1 (nrow, ncol, nlyr) #> resolution : 100, 100 (x, y) #> extent : -17367531, 17367569, -6005523, 7287077 (xmin, xmax, ymin, ymax) #> coord. ref. : World_Behrmann #> source : jung-lvl1-10-5281_zenodo-4058819.tif #> name : jung-lvl1-10-5281_zenodo-4058819 # plot data plot(habitat_data) # }"},{"path":"https://prioritizr.github.io/aoh/reference/get_jung_lvl2_habitat_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Jung et al. (2020) habitat classification data (level 2) — get_jung_lvl2_habitat_data","title":"Get Jung et al. (2020) habitat classification data (level 2) — get_jung_lvl2_habitat_data","text":"Import habitat classification data (level 2) derived Jung et al. (2020a). data available locally, downloaded Zenodo repository (doi:10.5281/zenodo.6622029 ).","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_jung_lvl2_habitat_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Jung et al. (2020) habitat classification data (level 2) — get_jung_lvl2_habitat_data","text":"","code":"get_jung_lvl2_habitat_data( dir = tempdir(), version = \"latest\", force = FALSE, verbose = TRUE )"},{"path":"https://prioritizr.github.io/aoh/reference/get_jung_lvl2_habitat_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get Jung et al. (2020) habitat classification data (level 2) — get_jung_lvl2_habitat_data","text":"dir character Folder path downloading caching data. default, data downloaded temporary directory (.e., tempdir()). avoid downloading data multiple times, strongly recommended specify persistent storage location (see Examples ). version character Value indicating specific version dataset downloaded. version indicated using Digital Object Identifier specific version required (e.g. \"10.5281/zenodo.3673586\"). Defaults \"latest\" latest release dataset available habitat data used. force logical data downloaded even data already available? Defaults FALSE. verbose logical progress displayed downloading data? Defaults TRUE.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_jung_lvl2_habitat_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get Jung et al. (2020) habitat classification data (level 2) — get_jung_lvl2_habitat_data","text":"terra::rast() object containing habitat data (100 m resolution). Pixel values indicate habitat classification codes.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_jung_lvl2_habitat_data.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get Jung et al. (2020) habitat classification data (level 2) — get_jung_lvl2_habitat_data","text":"data produced obtaining level 2 habitat classification data Zenodo repository (Jung et al. 2020b), resampling data (using nearest neighbor interpolation) World Behrmannn coordinate reference systems (ESRI:54017).","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_jung_lvl2_habitat_data.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Get Jung et al. (2020) habitat classification data (level 2) — get_jung_lvl2_habitat_data","text":"Jung M, Dahal PR, Butchart SHM, Donald PF, De Lamo X, Lesiv M, Kapos V, Rondinini C, Visconti P (2020a) global map terrestrial habitat types. Scientific Data, 7, 1–8. doi:10.1038/s41597-020-00599-8 Jung M, Dahal PR, Butchart SHM, Donald PF, De Lamo X, Lesiv M, Kapos V, Rondinini C, Visconti P (2020b) global map terrestrial habitat types (insert version) [Data set]. Zenodo. doi:10.5281/zenodo.4058819","code":""},{"path":[]},{"path":"https://prioritizr.github.io/aoh/reference/get_jung_lvl2_habitat_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get Jung et al. (2020) habitat classification data (level 2) — get_jung_lvl2_habitat_data","text":"","code":"# \\dontrun{ # define persistent storage location download_dir <- rappdirs::user_data_dir(\"aoh\") # create download directory if needed if (!file.exists(download_dir)) { dir.create(download_dir, showWarnings = FALSE, recursive = TRUE) } # download and import habitat data habitat_data <- get_jung_lvl2_habitat_data(download_dir, version = \"latest\") # preview data print(habitat_data) #> class : SpatRaster #> dimensions : 132926, 347351, 1 (nrow, ncol, nlyr) #> resolution : 100, 100 (x, y) #> extent : -17367531, 17367569, -6005523, 7287077 (xmin, xmax, ymin, ymax) #> coord. ref. : World_Behrmann #> source : jung-lvl2-10-5281_zenodo-4058819.tif #> name : jung-lvl2-10-5281_zenodo-4058819 # plot data plot(habitat_data) # }"},{"path":"https://prioritizr.github.io/aoh/reference/get_jung_plvl1_habitat_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Jung (2020) potential habitat classification data (level 1) — get_jung_plvl1_habitat_data","title":"Get Jung (2020) potential habitat classification data (level 1) — get_jung_plvl1_habitat_data","text":"Import potential habitat classification data derived Jung (2020). data available locally, downloaded Zenodo repository (doi:10.5281/zenodo.6622090 ).","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_jung_plvl1_habitat_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Jung (2020) potential habitat classification data (level 1) — get_jung_plvl1_habitat_data","text":"","code":"get_jung_plvl1_habitat_data( dir = tempdir(), version = \"latest\", force = FALSE, verbose = TRUE )"},{"path":"https://prioritizr.github.io/aoh/reference/get_jung_plvl1_habitat_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get Jung (2020) potential habitat classification data (level 1) — get_jung_plvl1_habitat_data","text":"dir character Folder path downloading caching data. default, data downloaded temporary directory (.e., tempdir()). avoid downloading data multiple times, strongly recommended specify persistent storage location (see Examples ). version character Value indicating specific version dataset downloaded. version indicated using Digital Object Identifier specific version required (e.g. \"10.5281/zenodo.3673586\"). Defaults \"latest\" latest release dataset available habitat data used. force logical data downloaded even data already available? Defaults FALSE. verbose logical progress displayed downloading data? Defaults TRUE.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_jung_plvl1_habitat_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get Jung (2020) potential habitat classification data (level 1) — get_jung_plvl1_habitat_data","text":"terra::rast() object containing potential habitat data (100 m resolution). Pixel values indicate potential habitat classification codes.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_jung_plvl1_habitat_data.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get Jung (2020) potential habitat classification data (level 1) — get_jung_plvl1_habitat_data","text":"data predict potential habitat types available given location anthropogenic activities (see Hengl et al. 2018 details). , can used identify locations restoration activities produce certain habitat types. means can, turn, used predict location suitable habitat species following restoration activities. Since data show historic distribution habitat types, used examine patterns habitat loss. data produced obtaining level 1 habitat classification data Zenodo repository (Jung 2020), resampling data (using nearest neighbor interpolation) World Behrmannn coordinate reference systems (ESRI:54017).","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_jung_plvl1_habitat_data.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Get Jung (2020) potential habitat classification data (level 1) — get_jung_plvl1_habitat_data","text":"Jung M (2020) layer global potential habitats (insert version) [Data set]. Zenodo. doi:10.5281/zenodo.4038749","code":""},{"path":[]},{"path":"https://prioritizr.github.io/aoh/reference/get_jung_plvl1_habitat_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get Jung (2020) potential habitat classification data (level 1) — get_jung_plvl1_habitat_data","text":"","code":"# \\dontrun{ # define persistent storage location download_dir <- rappdirs::user_data_dir(\"aoh\") # create download directory if needed if (!file.exists(download_dir)) { dir.create(download_dir, showWarnings = FALSE, recursive = TRUE) } # download and import potential habitat data ph_data <- get_jung_plvl1_habitat_data(download_dir, version = \"latest\") # preview data print(ph_data) #> class : SpatRaster #> dimensions : 132926, 347351, 1 (nrow, ncol, nlyr) #> resolution : 100, 100 (x, y) #> extent : -17367531, 17367569, -6005523, 7287077 (xmin, xmax, ymin, ymax) #> coord. ref. : World_Behrmann #> source : jung-plvl1-10-5281_zenodo-4038749.tif #> name : jung-plvl1-10-5281_zenodo-4038749 # plot data plot(ph_data) # }"},{"path":"https://prioritizr.github.io/aoh/reference/get_lumb_cgls_habitat_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Lumbierres et al. (2021) CGLS habitat classification data — get_lumb_cgls_habitat_data","title":"Get Lumbierres et al. (2021) CGLS habitat classification data — get_lumb_cgls_habitat_data","text":"Import habitat classification data derived Copernicus Global Land Service Land Cover (CGLS-LC100) dataset (Buchhorn et al., 2019; Buchhorn et al., 20200) following Lumbierres et al. (2021). data available locally, downloaded Zenodo repository (doi:10.5281/zenodo.6622059 ).","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_lumb_cgls_habitat_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Lumbierres et al. (2021) CGLS habitat classification data — get_lumb_cgls_habitat_data","text":"","code":"get_lumb_cgls_habitat_data( dir = tempdir(), version = \"latest\", force = FALSE, verbose = TRUE )"},{"path":"https://prioritizr.github.io/aoh/reference/get_lumb_cgls_habitat_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get Lumbierres et al. (2021) CGLS habitat classification data — get_lumb_cgls_habitat_data","text":"dir character Folder path downloading caching data. default, data downloaded temporary directory (.e., tempdir()). avoid downloading data multiple times, strongly recommended specify persistent storage location (see Examples ). version character Value indicating specific version dataset downloaded. version indicated using Digital Object Identifier specific version required (e.g. \"10.5281/zenodo.3673586\"). Defaults \"latest\" latest release dataset available habitat data used. force logical data downloaded even data already available? Defaults FALSE. verbose logical progress displayed downloading data? Defaults TRUE.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_lumb_cgls_habitat_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get Lumbierres et al. (2021) CGLS habitat classification data — get_lumb_cgls_habitat_data","text":"terra::rast() object containing habitat data (100 m resolution). Pixel values indicate habitat classification codes.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_lumb_cgls_habitat_data.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get Lumbierres et al. (2021) CGLS habitat classification data — get_lumb_cgls_habitat_data","text":"data produced obtaining level 1 habitat classification data (derived Lumbierres et al. 2021), resampling data (using nearest neighbor interpolation) World Behrmannn coordinate reference system (ESRI:54017).","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_lumb_cgls_habitat_data.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Get Lumbierres et al. (2021) CGLS habitat classification data — get_lumb_cgls_habitat_data","text":"Buchhorn M, Smets B, Bertels L, Lesiv M, Tsendbazar N-E, Herold M, Fritz SA (2019) Copernicus Global Land Service: Land Cover 100m: Epoch 2015: Globe. Dataset global component Copernicus Land Monitoring Service. doi:10.5281/zenodo.3243508 Buchhorn M, Smets B, Bertels L, de Roo B, Lesiv M, Tsendbazar N-E, Linlin L, Tarko (2020) Copernicus Global Land Service: Land Cover 100m: Version 3 Globe 2015–2019: Product User Manual. Geneve: Zenodo. doi:10.5281/zenodo.3606295 Lumbierres M, Dahal PR, Di Marco M, Butchart SHM, Donald PF, Rondinini C (2021) Translating habitat class land cover map area habitat terrestrial vertebrates. Conservation Biology, 36, e13851. doi:10.1111/cobi.13851","code":""},{"path":[]},{"path":"https://prioritizr.github.io/aoh/reference/get_lumb_cgls_habitat_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get Lumbierres et al. (2021) CGLS habitat classification data — get_lumb_cgls_habitat_data","text":"","code":"# \\dontrun{ # define persistent storage location download_dir <- rappdirs::user_data_dir(\"aoh\") # create download directory if needed if (!file.exists(download_dir)) { dir.create(download_dir, showWarnings = FALSE, recursive = TRUE) } # download and import habitat data habitat_data <- get_lumb_cgls_habitat_data(download_dir, version = \"latest\") # preview data print(habitat_data) #> class : SpatRaster #> dimensions : 132926, 347351, 1 (nrow, ncol, nlyr) #> resolution : 100, 100 (x, y) #> extent : -17367531, 17367569, -6005523, 7287077 (xmin, xmax, ymin, ymax) #> coord. ref. : World_Behrmann #> source : lumbierres-10-5281_zenodo-5146073-v2.tif #> name : habitat_CGLS # plot data plot(habitat_data) # }"},{"path":"https://prioritizr.github.io/aoh/reference/get_spp_habitat_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Get species habitat data — get_spp_habitat_data","title":"Get species habitat data — get_spp_habitat_data","text":"Import species habitat preference data obtained International Union Conservation Nature (IUCN) Red List Threatened Species. Please note token required download data IUCN Red List API (see instructions obtain token).","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_spp_habitat_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get species habitat data — get_spp_habitat_data","text":"","code":"get_spp_habitat_data( x, dir = tempdir(), version = \"latest\", key = NULL, delay = 2, force = FALSE, verbose = TRUE )"},{"path":"https://prioritizr.github.io/aoh/reference/get_spp_habitat_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get species habitat data — get_spp_habitat_data","text":"x integer Taxon identifier species International Union Conservation Nature (IUCN) Red List Threatened Species. example, taxon identifier species Loxodonta africana 181008073. dir character Folder path data downloaded. default, data downloaded temporary directory (.e., tempdir()). avoid downloading data multiple times, strongly recommended specify persistent storage location (see Examples ). data already available folder specified version, data imported re-downloaded IUCN Red List. version character Value indicating version IUCN Red List obtaining data (e.g., \"2021-2\"). Although possible query past versions IUCN Red List, functionality useful accessing data previously downloaded IUCN Red List. Defaults \"latest\" data downloaded recent version IUCN Red List. key character Token querying IUCN Red List API. Defaults NULL token accessed \"IUCN_REDLIST_KEY\" environmental variable (can specified .Renviron file). delay integer Number seconds wait subsequent calls IUCN Red List API. Defaults 2 seconds (recommended rredlist package; https://docs.ropensci.org/rredlist/articles/rredlist.html). force logical data downloaded even data already available? Defaults FALSE. verbose logical progress displayed downloading data? Defaults TRUE.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_spp_habitat_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get species habitat data — get_spp_habitat_data","text":"table (tibble::tibble()) object.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_spp_habitat_data.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get species habitat data — get_spp_habitat_data","text":"Data downloaded IUCN Red List using rredlist::rl_habitats(). function essentially wrapper designed help download data multiple species provide caching previously downloaded data.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_spp_habitat_data.html","id":"accessing-the-iucn-red-list-api","dir":"Reference","previous_headings":"","what":"Accessing the IUCN Red List API","title":"Get species habitat data — get_spp_habitat_data","text":"need obtain token IUCN Red List API (one already). achieve , please visit IUCN API website (https://apiv3.iucnredlist.org/), click \"Generate token\" link top web page, fill form apply token. receive token shortly completing form (immediately). receiving token, please open .Renviron file computer (e.g., using usethis::edit_r_environ()). Next, please add following text file (replacing string token) save file: Please restart R session. now able access IUCN Red List API. verify , please try running following R code – assuming everything works correctly – see TRUE output: instructions work, please consult documentation rredlist package details.","code":"IUCN_REDLIST_KEY=\"your_actual_token_not_this_string\" # verify access to IUCN Red List API is_iucn_rl_available()"},{"path":"https://prioritizr.github.io/aoh/reference/get_spp_habitat_data.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Get species habitat data — get_spp_habitat_data","text":"Please use following citation data obtained IUCN Red List: IUCN (insert year). IUCN Red List Threatened Species. Version (insert version). Available . obtain version number latest version, use rredlist::rl_version().","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_spp_habitat_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get species habitat data — get_spp_habitat_data","text":"","code":"# \\dontrun{ # define species to download data for based on taxon identifiers spp_ids <- c(18, 22694927) # define persistent storage location download_dir <- rappdirs::user_data_dir(\"aoh\") # create download directory if needed if (!file.exists(download_dir)) { dir.create(download_dir, showWarnings = FALSE, recursive = TRUE) } # download and import habitat preference data result <- get_spp_habitat_data(spp_ids, download_dir) # } if (FALSE) { # interactive() # \\dontrun{ # preview data print(result) # } }"},{"path":"https://prioritizr.github.io/aoh/reference/get_spp_summary_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Get species summary data — get_spp_summary_data","title":"Get species summary data — get_spp_summary_data","text":"Import species summary data obtained International Union Conservation Nature (IUCN) Red List Threatened Species. Please note token required download data IUCN Red List API (see instructions obtain token).","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_spp_summary_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get species summary data — get_spp_summary_data","text":"","code":"get_spp_summary_data( x, dir = tempdir(), version = \"latest\", key = NULL, delay = 2, force = FALSE, verbose = TRUE )"},{"path":"https://prioritizr.github.io/aoh/reference/get_spp_summary_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get species summary data — get_spp_summary_data","text":"x integer Taxon identifier species International Union Conservation Nature (IUCN) Red List Threatened Species. example, taxon identifier species Loxodonta africana 181008073. dir character Folder path data downloaded. default, data downloaded temporary directory (.e., tempdir()). avoid downloading data multiple times, strongly recommended specify persistent storage location (see Examples ). data already available folder specified version, data imported re-downloaded IUCN Red List. version character Value indicating version IUCN Red List obtaining data (e.g., \"2021-2\"). Although possible query past versions IUCN Red List, functionality useful accessing data previously downloaded IUCN Red List. Defaults \"latest\" data downloaded recent version IUCN Red List. key character Token querying IUCN Red List API. Defaults NULL token accessed \"IUCN_REDLIST_KEY\" environmental variable (can specified .Renviron file). delay integer Number seconds wait subsequent calls IUCN Red List API. Defaults 2 seconds (recommended rredlist package; https://docs.ropensci.org/rredlist/articles/rredlist.html). force logical data downloaded even data already available? Defaults FALSE. verbose logical progress displayed downloading data? Defaults TRUE.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_spp_summary_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get species summary data — get_spp_summary_data","text":"table (tibble::tibble()) object.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_spp_summary_data.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get species summary data — get_spp_summary_data","text":"Data downloaded IUCN Red List using rredlist::rl_search(). function essentially wrapper designed help download data multiple species provide caching previously downloaded data.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_spp_summary_data.html","id":"accessing-the-iucn-red-list-api","dir":"Reference","previous_headings":"","what":"Accessing the IUCN Red List API","title":"Get species summary data — get_spp_summary_data","text":"need obtain token IUCN Red List API (one already). achieve , please visit IUCN API website (https://apiv3.iucnredlist.org/), click \"Generate token\" link top web page, fill form apply token. receive token shortly completing form (immediately). receiving token, please open .Renviron file computer (e.g., using usethis::edit_r_environ()). Next, please add following text file (replacing string token) save file: Please restart R session. now able access IUCN Red List API. verify , please try running following R code – assuming everything works correctly – see TRUE output: instructions work, please consult documentation rredlist package details.","code":"IUCN_REDLIST_KEY=\"your_actual_token_not_this_string\" # verify access to IUCN Red List API is_iucn_rl_available()"},{"path":"https://prioritizr.github.io/aoh/reference/get_spp_summary_data.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Get species summary data — get_spp_summary_data","text":"Please use following citation data obtained IUCN Red List: IUCN (insert year). IUCN Red List Threatened Species. Version (insert version). Available . obtain version number latest version, use rredlist::rl_version().","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_spp_summary_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get species summary data — get_spp_summary_data","text":"","code":"# \\dontrun{ # define species to download data for based on taxon identifiers spp_ids <- c(18, 22694927) # define persistent storage location download_dir <- rappdirs::user_data_dir(\"aoh\") # create download directory if needed if (!file.exists(download_dir)) { dir.create(download_dir, showWarnings = FALSE, recursive = TRUE) } # download and import summary data result <- get_spp_summary_data(spp_ids, download_dir) # } if (FALSE) { # interactive() # \\dontrun{ # preview data print(result) # } }"},{"path":"https://prioritizr.github.io/aoh/reference/get_spp_threat_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Get species threat data — get_spp_threat_data","title":"Get species threat data — get_spp_threat_data","text":"Import species threat data obtained International Union Conservation Nature (IUCN) Red List Threatened Species. Please note token required download data IUCN Red List API (see instructions obtain token).","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_spp_threat_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get species threat data — get_spp_threat_data","text":"","code":"get_spp_threat_data( x, dir = tempdir(), version = \"latest\", key = NULL, delay = 2, force = FALSE, verbose = TRUE )"},{"path":"https://prioritizr.github.io/aoh/reference/get_spp_threat_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get species threat data — get_spp_threat_data","text":"x integer Taxon identifier species International Union Conservation Nature (IUCN) Red List Threatened Species. example, taxon identifier species Loxodonta africana 181008073. dir character Folder path data downloaded. default, data downloaded temporary directory (.e., tempdir()). avoid downloading data multiple times, strongly recommended specify persistent storage location (see Examples ). data already available folder specified version, data imported re-downloaded IUCN Red List. version character Value indicating version IUCN Red List obtaining data (e.g., \"2021-2\"). Although possible query past versions IUCN Red List, functionality useful accessing data previously downloaded IUCN Red List. Defaults \"latest\" data downloaded recent version IUCN Red List. key character Token querying IUCN Red List API. Defaults NULL token accessed \"IUCN_REDLIST_KEY\" environmental variable (can specified .Renviron file). delay integer Number seconds wait subsequent calls IUCN Red List API. Defaults 2 seconds (recommended rredlist package; https://docs.ropensci.org/rredlist/articles/rredlist.html). force logical data downloaded even data already available? Defaults FALSE. verbose logical progress displayed downloading data? Defaults TRUE.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_spp_threat_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get species threat data — get_spp_threat_data","text":"table (tibble::tibble()) object.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_spp_threat_data.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get species threat data — get_spp_threat_data","text":"Data downloaded IUCN Red List using rredlist::rl_search(). function essentially wrapper designed help download data multiple species provide caching previously downloaded data. Data downloaded IUCN Red List using rredlist::rl_threats(). function essentially wrapper designed help download data multiple species provide caching previously downloaded data.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_spp_threat_data.html","id":"accessing-the-iucn-red-list-api","dir":"Reference","previous_headings":"","what":"Accessing the IUCN Red List API","title":"Get species threat data — get_spp_threat_data","text":"need obtain token IUCN Red List API (one already). achieve , please visit IUCN API website (https://apiv3.iucnredlist.org/), click \"Generate token\" link top web page, fill form apply token. receive token shortly completing form (immediately). receiving token, please open .Renviron file computer (e.g., using usethis::edit_r_environ()). Next, please add following text file (replacing string token) save file: Please restart R session. now able access IUCN Red List API. verify , please try running following R code – assuming everything works correctly – see TRUE output: instructions work, please consult documentation rredlist package details.","code":"IUCN_REDLIST_KEY=\"your_actual_token_not_this_string\" # verify access to IUCN Red List API is_iucn_rl_available()"},{"path":"https://prioritizr.github.io/aoh/reference/get_spp_threat_data.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Get species threat data — get_spp_threat_data","text":"Please use following citation data obtained IUCN Red List: IUCN (insert year). IUCN Red List Threatened Species. Version (insert version). Available . obtain version number latest version, use rredlist::rl_version().","code":""},{"path":"https://prioritizr.github.io/aoh/reference/get_spp_threat_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get species threat data — get_spp_threat_data","text":"","code":"# \\dontrun{ # define species to download data for based on taxon identifiers spp_ids <- c(18, 22694927) # define persistent storage location download_dir <- rappdirs::user_data_dir(\"aoh\") # create download directory if needed if (!file.exists(download_dir)) { dir.create(download_dir, showWarnings = FALSE, recursive = TRUE) } # download and import threat data result <- get_spp_threat_data(spp_ids, download_dir) # } if (FALSE) { # interactive() # \\dontrun{ # preview data print(result) # } }"},{"path":"https://prioritizr.github.io/aoh/reference/is_gdal_calc_available.html","id":null,"dir":"Reference","previous_headings":"","what":"Is gdal_calc.py available? — is_gdal_calc_available","title":"Is gdal_calc.py available? — is_gdal_calc_available","text":"Check gdal_calc.py Python script available.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/is_gdal_calc_available.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is gdal_calc.py available? — is_gdal_calc_available","text":"","code":"is_gdal_calc_available()"},{"path":"https://prioritizr.github.io/aoh/reference/is_gdal_calc_available.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Is gdal_calc.py available? — is_gdal_calc_available","text":"logical value indicating available.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/is_gdal_calc_available.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Is gdal_calc.py available? — is_gdal_calc_available","text":"gdal_calc.py Python script used process Area Habitat data using GDAL engine (within create_spp_aoh_data()) . function determines script available system. Windows systems, first tries access script using OSGeo4W software (available https://trac.osgeo.org/osgeo4w/). fails, using Windows system: tries access script using default system variables.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/is_gdal_calc_available.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Is gdal_calc.py available? — is_gdal_calc_available","text":"","code":"# see if gdal_calc python script is available print(is_gdal_calc_available()) #> [1] TRUE"},{"path":"https://prioritizr.github.io/aoh/reference/is_grass_available.html","id":null,"dir":"Reference","previous_headings":"","what":"Is GRASS available? — is_grass_available","title":"Is GRASS available? — is_grass_available","text":"Check Geographic Resources Analysis Support System (GRASS) available processing data.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/is_grass_available.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is GRASS available? — is_grass_available","text":"","code":"is_grass_available()"},{"path":"https://prioritizr.github.io/aoh/reference/is_grass_available.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Is GRASS available? — is_grass_available","text":"logical value indicating available.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/is_grass_available.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Is GRASS available? — is_grass_available","text":"function verifies (1) rgrass package installed, (2) link2GI package installed, (3) GRASS installed (.e., via link2GI::findGRASS), (4) version GRASS installed least 7.8.7. checks fail, GRASS considered available.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/is_grass_available.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Is GRASS available? — is_grass_available","text":"","code":"# \\dontrun{ # check if GRASS is available? print(is_grass_available()) #> [1] TRUE # }"},{"path":"https://prioritizr.github.io/aoh/reference/is_iucn_rl_api_available.html","id":null,"dir":"Reference","previous_headings":"","what":"Is IUCN Red List API available? — is_iucn_rl_api_available","title":"Is IUCN Red List API available? — is_iucn_rl_api_available","text":"International Union Conservation Nature (IUCN) provides API access data Red List Threatened Species. function checks whether data can accessed API. Please note token required access API (see instructions obtain token).","code":""},{"path":"https://prioritizr.github.io/aoh/reference/is_iucn_rl_api_available.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is IUCN Red List API available? — is_iucn_rl_api_available","text":"","code":"is_iucn_rl_api_available(key = NULL, n = 5)"},{"path":"https://prioritizr.github.io/aoh/reference/is_iucn_rl_api_available.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is IUCN Red List API available? — is_iucn_rl_api_available","text":"key character Token querying IUCN Red List API. Defaults NULL token accessed \"IUCN_REDLIST_KEY\" environmental variable (can specified .Renviron file). n integer Number times attempt access API.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/is_iucn_rl_api_available.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Is IUCN Red List API available? — is_iucn_rl_api_available","text":"logical indicating IUCN Red List API can accessed.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/is_iucn_rl_api_available.html","id":"accessing-the-iucn-red-list-api","dir":"Reference","previous_headings":"","what":"Accessing the IUCN Red List API","title":"Is IUCN Red List API available? — is_iucn_rl_api_available","text":"need obtain token IUCN Red List API (one already). achieve , please visit IUCN API website (https://apiv3.iucnredlist.org/), click \"Generate token\" link top web page, fill form apply token. receive token shortly completing form (immediately). receiving token, please open .Renviron file computer (e.g., using usethis::edit_r_environ()). Next, please add following text file (replacing string token) save file: Please restart R session. now able access IUCN Red List API. verify , please try running following R code – assuming everything works correctly – see TRUE output: instructions work, please consult documentation rredlist package details.","code":"IUCN_REDLIST_KEY=\"your_actual_token_not_this_string\" # verify access to IUCN Red List API is_iucn_rl_available()"},{"path":"https://prioritizr.github.io/aoh/reference/is_iucn_rl_api_available.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Is IUCN Red List API available? — is_iucn_rl_api_available","text":"","code":"# \\dontrun{ # check if IUCN Red List API is available? is_iucn_rl_api_available() #> [1] TRUE # }"},{"path":"https://prioritizr.github.io/aoh/reference/is_osgeo4w_available.html","id":null,"dir":"Reference","previous_headings":"","what":"Is OSGeo4W available? — is_osgeo4w_available","title":"Is OSGeo4W available? — is_osgeo4w_available","text":"Check OSGeo4W software available.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/is_osgeo4w_available.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is OSGeo4W available? — is_osgeo4w_available","text":"","code":"is_osgeo4w_available()"},{"path":"https://prioritizr.github.io/aoh/reference/is_osgeo4w_available.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Is OSGeo4W available? — is_osgeo4w_available","text":"logical value indicating available.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/is_osgeo4w_available.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Is OSGeo4W available? — is_osgeo4w_available","text":"software used provide GDAL Python scripts Windows systems used generate Area Habitat data via GDAL engine. can installed https://trac.osgeo.org/osgeo4w/. Note macOS Linux systems require software. default, assumed software installed \"C:/OSGeo4W\" directory. software installed different location, \"OSGEO4W_ROOT\" environmental variable can used specify different location.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/is_osgeo4w_available.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Is OSGeo4W available? — is_osgeo4w_available","text":"","code":"# see if OSGeo4W is available at the default location print(is_osgeo4w_available()) #> [1] FALSE # \\dontrun{ # specify a different location for OSGeo4W, and # then see if OSGeo4W is available at this location Sys.setenv(\"OSGEO4W_ROOT\" = \"C:/software/OSGeo4W\") print(is_osgeo4w_available()) #> [1] FALSE # }"},{"path":"https://prioritizr.github.io/aoh/reference/iucn_habitat_codes_artificial.html","id":null,"dir":"Reference","previous_headings":"","what":"IUCN Red List codes for artificial habitats — iucn_habitat_codes_artificial","title":"IUCN Red List codes for artificial habitats — iucn_habitat_codes_artificial","text":"International Union Conservation Nature (IUCN) Red List Threatened Species provides habitat classification scheme different habitat types worldwide. function returns codes habitat types correspond artificial areas (e.g., urban areas, pasture lands, canals).","code":""},{"path":"https://prioritizr.github.io/aoh/reference/iucn_habitat_codes_artificial.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"IUCN Red List codes for artificial habitats — iucn_habitat_codes_artificial","text":"","code":"iucn_habitat_codes_artificial()"},{"path":"https://prioritizr.github.io/aoh/reference/iucn_habitat_codes_artificial.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"IUCN Red List codes for artificial habitats — iucn_habitat_codes_artificial","text":"character vector codes.","code":""},{"path":[]},{"path":"https://prioritizr.github.io/aoh/reference/iucn_habitat_codes_artificial.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"IUCN Red List codes for artificial habitats — iucn_habitat_codes_artificial","text":"","code":"# print codes print(iucn_habitat_codes_artificial()) #> [1] \"14\" \"14.1\" \"14.2\" \"14.3\" \"14.4\" \"14.5\" \"14.6\" \"15\" \"15.1\" #> [10] \"15.2\" \"15.3\" \"15.4\" \"15.5\" \"15.6\" \"15.7\" \"15.8\" \"15.9\" \"15.10\" #> [19] \"15.11\" \"15.12\" \"15.13\""},{"path":"https://prioritizr.github.io/aoh/reference/iucn_habitat_codes_introduced.html","id":null,"dir":"Reference","previous_headings":"","what":"IUCN Red List codes for introduced habitats — iucn_habitat_codes_introduced","title":"IUCN Red List codes for introduced habitats — iucn_habitat_codes_introduced","text":"International Union Conservation Nature (IUCN) Red List Threatened Species provides habitat classification scheme different habitat types worldwide. function returns codes habitat classes correspond introduced vegetation.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/iucn_habitat_codes_introduced.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"IUCN Red List codes for introduced habitats — iucn_habitat_codes_introduced","text":"","code":"iucn_habitat_codes_introduced()"},{"path":"https://prioritizr.github.io/aoh/reference/iucn_habitat_codes_introduced.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"IUCN Red List codes for introduced habitats — iucn_habitat_codes_introduced","text":"character vector codes.","code":""},{"path":[]},{"path":"https://prioritizr.github.io/aoh/reference/iucn_habitat_codes_introduced.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"IUCN Red List codes for introduced habitats — iucn_habitat_codes_introduced","text":"","code":"# print codes print(iucn_habitat_codes_introduced()) #> [1] \"16\""},{"path":"https://prioritizr.github.io/aoh/reference/iucn_habitat_codes_marine.html","id":null,"dir":"Reference","previous_headings":"","what":"IUCN Red List codes for marine habitats — iucn_habitat_codes_marine","title":"IUCN Red List codes for marine habitats — iucn_habitat_codes_marine","text":"International Union Conservation Nature (IUCN) Red List Threatened Species provides habitat classification scheme different habitat types worldwide. function returns codes habitat classes occur ocean.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/iucn_habitat_codes_marine.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"IUCN Red List codes for marine habitats — iucn_habitat_codes_marine","text":"","code":"iucn_habitat_codes_marine()"},{"path":"https://prioritizr.github.io/aoh/reference/iucn_habitat_codes_marine.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"IUCN Red List codes for marine habitats — iucn_habitat_codes_marine","text":"character vector codes.","code":""},{"path":[]},{"path":"https://prioritizr.github.io/aoh/reference/iucn_habitat_codes_marine.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"IUCN Red List codes for marine habitats — iucn_habitat_codes_marine","text":"","code":"# print codes print(iucn_habitat_codes_marine()) #> [1] \"9\" \"9.1\" \"9.2\" \"9.3\" \"9.4\" \"9.5\" \"9.6\" \"9.7\" #> [9] \"9.8\" \"9.8.1\" \"9.8.2\" \"9.8.3\" \"9.8.4\" \"9.8.5\" \"9.8.6\" \"9.9\" #> [17] \"9.10\" \"10\" \"10.1\" \"10.2\" \"10.3\" \"10.4\" \"11\" \"11.1\" #> [25] \"11.1.1\" \"11.2\" \"11.1.2\" \"11.3\" \"11.4\" \"11.5\" \"11.6\" \"15.11\" #> [33] \"15.12\""},{"path":"https://prioritizr.github.io/aoh/reference/iucn_habitat_codes_misc.html","id":null,"dir":"Reference","previous_headings":"","what":"IUCN Red List codes for miscellaneous habitats — iucn_habitat_codes_misc","title":"IUCN Red List codes for miscellaneous habitats — iucn_habitat_codes_misc","text":"International Union Conservation Nature (IUCN) Red List Threatened Species provides habitat classification scheme different habitat types worldwide. function returns codes habitat classes correspond unknown habitats.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/iucn_habitat_codes_misc.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"IUCN Red List codes for miscellaneous habitats — iucn_habitat_codes_misc","text":"","code":"iucn_habitat_codes_misc()"},{"path":"https://prioritizr.github.io/aoh/reference/iucn_habitat_codes_misc.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"IUCN Red List codes for miscellaneous habitats — iucn_habitat_codes_misc","text":"character vector codes.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/iucn_habitat_codes_misc.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"IUCN Red List codes for miscellaneous habitats — iucn_habitat_codes_misc","text":"","code":"# print codes print(iucn_habitat_codes_misc()) #> [1] \"17\" \"18\""},{"path":"https://prioritizr.github.io/aoh/reference/iucn_habitat_codes_terrestrial.html","id":null,"dir":"Reference","previous_headings":"","what":"IUCN Red List codes for terrestrial habitats — iucn_habitat_codes_terrestrial","title":"IUCN Red List codes for terrestrial habitats — iucn_habitat_codes_terrestrial","text":"International Union Conservation Nature (IUCN) Red List Threatened Species provides habitat classification scheme different habitat types worldwide. function returns codes habitat classes occur land.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/iucn_habitat_codes_terrestrial.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"IUCN Red List codes for terrestrial habitats — iucn_habitat_codes_terrestrial","text":"","code":"iucn_habitat_codes_terrestrial()"},{"path":"https://prioritizr.github.io/aoh/reference/iucn_habitat_codes_terrestrial.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"IUCN Red List codes for terrestrial habitats — iucn_habitat_codes_terrestrial","text":"character vector codes.","code":""},{"path":[]},{"path":"https://prioritizr.github.io/aoh/reference/iucn_habitat_codes_terrestrial.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"IUCN Red List codes for terrestrial habitats — iucn_habitat_codes_terrestrial","text":"","code":"# print codes print(iucn_habitat_codes_terrestrial()) #> [1] \"1\" \"1.1\" \"1.2\" \"1.3\" \"1.4\" \"1.5\" \"1.6\" \"1.7\" \"1.8\" #> [10] \"1.9\" \"2\" \"2.1\" \"2.2\" \"3\" \"3.1\" \"3.2\" \"3.3\" \"3.4\" #> [19] \"3.5\" \"3.6\" \"3.7\" \"3.8\" \"4\" \"4.1\" \"4.2\" \"4.3\" \"4.4\" #> [28] \"4.5\" \"4.6\" \"4.7\" \"5\" \"5.1\" \"5.2\" \"5.3\" \"5.4\" \"5.5\" #> [37] \"5.6\" \"5.7\" \"5.8\" \"5.9\" \"5.10\" \"5.11\" \"5.12\" \"5.13\" \"5.14\" #> [46] \"5.15\" \"5.16\" \"5.17\" \"5.18\" \"6\" \"7\" \"7.1\" \"7.2\" \"8\" #> [55] \"8.1\" \"8.2\" \"8.3\" \"12\" \"12.1\" \"12.2\" \"12.3\" \"12.4\" \"12.5\" #> [64] \"12.7\" \"12.6\" \"13\" \"13.1\" \"13.2\" \"13.3\" \"13.4\" \"13.5\" \"14\" #> [73] \"14.1\" \"14.2\" \"14.3\" \"14.4\" \"14.5\" \"14.6\" \"15\" \"15.1\" \"15.2\" #> [82] \"15.3\" \"15.4\" \"15.5\" \"15.6\" \"15.7\" \"15.8\" \"15.9\" \"15.10\" \"15.13\" #> [91] \"16\" \"17\" \"18\""},{"path":"https://prioritizr.github.io/aoh/reference/iucn_habitat_data.html","id":null,"dir":"Reference","previous_headings":"","what":"IUCN habitat classification codes — iucn_habitat_data","title":"IUCN habitat classification codes — iucn_habitat_data","text":"International Union Conservation Nature (IUCN) Red List Threatened Species provides habitat classification scheme different habitat types worldwide. dataset provides details different IUCN habitat classes.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/iucn_habitat_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"IUCN habitat classification codes — iucn_habitat_data","text":"","code":"data(iucn_habitat_data)"},{"path":"https://prioritizr.github.io/aoh/reference/iucn_habitat_data.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"IUCN habitat classification codes — iucn_habitat_data","text":"data frame 126 rows 2 columns. row corresponds different habitat class, column contains information given habitat class. contains columns following values habitat class. code character value indicating code class. name character value indicating name class. is_terrestrial logical value indicating class occurs within terrestrial environmental. is_marine logical value indicating class occurs within marine environmental. is_artificial logical value indicating class artificial (e.g., anthropogenically human modified). is_misc logical value indicating class correspond specific land cover. is_introduced logical value indicating class corresponds introduced vegetation.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/iucn_habitat_data.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"IUCN habitat classification codes — iucn_habitat_data","text":"data obtained https://www.iucnredlist.org/resources/habitat-classification-scheme.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/iucn_habitat_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"IUCN habitat classification codes — iucn_habitat_data","text":"","code":"# load data data(iucn_habitat_data) # print data print(iucn_habitat_data) #> # A tibble: 126 × 7 #> code name is_terrestrial is_marine is_artificial is_misc is_introduced #> #> 1 1 Forest TRUE FALSE FALSE FALSE FALSE #> 2 1.1 Forest - … TRUE FALSE FALSE FALSE FALSE #> 3 1.2 Forest - … TRUE FALSE FALSE FALSE FALSE #> 4 1.3 Forest - … TRUE FALSE FALSE FALSE FALSE #> 5 1.4 Forest - … TRUE FALSE FALSE FALSE FALSE #> 6 1.5 Forest - … TRUE FALSE FALSE FALSE FALSE #> 7 1.6 Forest - … TRUE FALSE FALSE FALSE FALSE #> 8 1.7 Forest - … TRUE FALSE FALSE FALSE FALSE #> 9 1.8 Forest - … TRUE FALSE FALSE FALSE FALSE #> 10 1.9 Forest - … TRUE FALSE FALSE FALSE FALSE #> # ℹ 116 more rows"},{"path":"https://prioritizr.github.io/aoh/reference/iucn_threat_data.html","id":null,"dir":"Reference","previous_headings":"","what":"IUCN threat classification codes — iucn_threat_data","title":"IUCN threat classification codes — iucn_threat_data","text":"International Union Conservation Nature (IUCN) Red List Threatened Species provides threat classification scheme different threatening processes. dataset provides details different IUCN threat classes.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/iucn_threat_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"IUCN threat classification codes — iucn_threat_data","text":"","code":"data(iucn_threat_data)"},{"path":"https://prioritizr.github.io/aoh/reference/iucn_threat_data.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"IUCN threat classification codes — iucn_threat_data","text":"data frame 130 rows 2 columns. row corresponds different threat class, column contains information given threat class. contains columns following values threat class. code character value indicating code class. name character value indicating name class.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/iucn_threat_data.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"IUCN threat classification codes — iucn_threat_data","text":"data obtained https://www.iucnredlist.org/resources/threat-classification-scheme.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/iucn_threat_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"IUCN threat classification codes — iucn_threat_data","text":"","code":"# load data data(iucn_threat_data) # print data print(iucn_threat_data) #> # A tibble: 130 × 2 #> code name #> #> 1 1 Residential & commercial development #> 2 1.1 Housing & urban areas #> 3 1.2 Commercial & industrial areas #> 4 1.3 Tourism & recreation areas #> 5 2 Agriculture & aquaculture #> 6 2.1 Annual & perennial non-timber crops #> 7 2.1.1 Shifting agriculture #> 8 2.1.2 Small-holder farming #> 9 2.1.3 Agro-industry farming #> 10 2.1.4 Scale Unknown/Unrecorded #> # ℹ 120 more rows"},{"path":"https://prioritizr.github.io/aoh/reference/plot_spp_aoh_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot species range and Area of Habitat data — plot_spp_aoh_data","title":"Plot species range and Area of Habitat data — plot_spp_aoh_data","text":"Create map compare species geographic range Area Habitat data.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/plot_spp_aoh_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot species range and Area of Habitat data — plot_spp_aoh_data","text":"","code":"plot_spp_aoh_data( x, max_plot = 9, expand = 0.05, zoom = NULL, maptype = NULL, maxcell = 50000, ... )"},{"path":"https://prioritizr.github.io/aoh/reference/plot_spp_aoh_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot species range and Area of Habitat data — plot_spp_aoh_data","text":"x sf::st_sf() Object containing species data. object produced using create_spp_aoh_data() function. max_plot integer Maximum number Area Habitat datasets plot. Defaults 9. expand numeric Proportion expand plotting limits. Defaults 0.05 plot limits extended 5% beyond spatial extent data. zoom numeric Value indicating zoom level basemap. See documentation zoom parameter ggmap::get_stadiamap() function details. Defaults NULL basemap shown. maptype character Value indicating name basemap use plot. See documentation maptype parameter ggmap::get_stadiamap() function details. Defaults NULL basemap shown. Note ggmap package must installed show basemap. maxcell integer Maximum number grid cells mapping. Defaults 50000. ... Additional arguments passed ggmap::get_stadiamap().","code":""},{"path":"https://prioritizr.github.io/aoh/reference/plot_spp_aoh_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot species range and Area of Habitat data — plot_spp_aoh_data","text":"ggplot2::ggplot() object.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/plot_spp_aoh_data.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Plot species range and Area of Habitat data — plot_spp_aoh_data","text":"Note data automatically projected geographic coordinate system (EPSG:4326) plotted base map. means Area Habitat data shown maps contain base map might look slightly different underlying dataset.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/plot_spp_aoh_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot species range and Area of Habitat data — plot_spp_aoh_data","text":"","code":"# \\dontrun{ # find file path for example range data following IUCN Red List data format ## N.B., the range data were not obtained from the IUCN Red List, ## and were instead based on data from GBIF (https://www.gbif.org/) path <- system.file(\"extdata\", \"EXAMPLE_SPECIES.zip\", package = \"aoh\") # import data spp_range_data <- read_spp_range_data(path) # specify settings for data processing output_dir <- tempdir() # folder to save AOH data cache_dir <- rappdirs::user_data_dir(\"aoh\") # persistent storage location n_threads <- parallel::detectCores() - 1 # speed up analysis # create cache directory if needed if (!file.exists(cache_dir)) { dir.create(cache_dir, showWarnings = FALSE, recursive = TRUE) } # create species information data spp_info_data <- create_spp_info_data( x = spp_range_data, cache_dir = cache_dir ) #> ℹ initializing #> ✔ initializing [337ms] #> #> ℹ cleaning species range data #> ✔ cleaning species range data [3.7s] #> #> ℹ importing species summary data #> ✔ importing species summary data [343ms] #> #> ℹ importing species habitat data #> ✔ importing species habitat data [331ms] #> #> ℹ collating species data #> ✔ collating species data [261ms] #> #> ℹ post-processing results #> ✔ post-processing results [12ms] #> #> ✔ finished # create Area of Habitat data for species spp_aoh_data <- create_spp_aoh_data( x = spp_info_data, output_dir = output_dir, n_threads = n_threads, cache_dir = cache_dir ) #> ℹ initializing #> ✔ initializing [6ms] #> #> ℹ importing global elevation data #> ✔ importing global elevation data [7.7s] #> #> ℹ importing global habitat data #> ! argument to \"crosswalk_data\" is missing the following 2 habitat classification codes: \"7.1\", \"7.2\" #> ℹ importing global habitat data #> ✔ importing global habitat data [5.4s] #> #> ℹ generating Area of Habitat data #> skipping 4 species distributions already processed #> ✔ generating Area of Habitat data [39ms] #> #> ℹ post-processing results #> ✔ post-processing results [15ms] #> #> ✔ finished # plot the data to visualize the range maps and AOH data p <- plot_spp_aoh_data(spp_aoh_data) print(p) # this plot can be customized using ggplot2 functions # for example, let's style the plot and update the colors ## load ggplot2 package library(ggplot2) ## customize plot p2 <- p + scale_fill_viridis_d() + scale_color_manual(values = c(\"range\" = \"blue\")) + scale_size_manual(values = c(\"range\" = 1.5)) + theme( strip.text = ggplot2::element_text(color = \"white\"), strip.background = ggplot2::element_rect( fill = \"black\", color = \"black\" ) ) ## print customized plot print(p2) # } # \\dontrun{ # we can also plot the data with a base map too ## note that you might need to install ggmap to run this example if (require(ggmap)) { ## create customized map with basemap p3 <- plot_spp_aoh_data(spp_aoh_data, zoom = 7, maptype = \"stamen_toner\") + scale_fill_manual( values = c(\"suitable\" = \"blue\", \"not suitable\" = \"transparent\") ) + scale_color_manual(values = c(\"range\" = \"red\")) + scale_size_manual(values = c(\"range\" = 2)) + theme( strip.text = ggplot2::element_text(color = \"white\"), strip.background = ggplot2::element_rect( fill = \"black\", color = \"black\" ) ) ## print customized plot print(p3) } #> Loading required package: ggmap #> ℹ Google's Terms of Service: #> Stadia Maps' Terms of Service: #> OpenStreetMap's Tile Usage Policy: #> ℹ Please cite ggmap if you use it! Use `citation(\"ggmap\")` for details. #> #> Attaching package: ‘ggmap’ #> The following object is masked from ‘package:terra’: #> #> inset #> ℹ © Stadia Maps © Stamen Design © OpenMapTiles © OpenStreetMap contributors. #> Coordinate system already present. Adding new coordinate system, which will #> replace the existing one. # }"},{"path":"https://prioritizr.github.io/aoh/reference/plot_spp_frc_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot species range and fractional coverage data — plot_spp_frc_data","title":"Plot species range and fractional coverage data — plot_spp_frc_data","text":"Create map compare species geographic range fractional coverage data.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/plot_spp_frc_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot species range and fractional coverage data — plot_spp_frc_data","text":"","code":"plot_spp_frc_data( x, max_plot = 9, expand = 0.05, zoom = NULL, maptype = NULL, maxcell = 50000, ... )"},{"path":"https://prioritizr.github.io/aoh/reference/plot_spp_frc_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot species range and fractional coverage data — plot_spp_frc_data","text":"x sf::st_sf() Object containing species data. object produced using calc_spp_frc_data() function. max_plot integer Maximum number Area Habitat datasets plot. Defaults 9. expand numeric Proportion expand plotting limits. Defaults 0.05 plot limits extended 5% beyond spatial extent data. zoom numeric Value indicating zoom level basemap. See documentation zoom parameter ggmap::get_stadiamap() function details. Defaults NULL basemap shown. maptype character Value indicating name basemap use plot. See documentation maptype parameter ggmap::get_stadiamap() function details. Defaults NULL basemap shown. Note ggmap package must installed show basemap. maxcell integer Maximum number grid cells mapping. Defaults 50000. ... Additional arguments passed ggmap::get_stadiamap().","code":""},{"path":"https://prioritizr.github.io/aoh/reference/plot_spp_frc_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot species range and fractional coverage data — plot_spp_frc_data","text":"ggplot2::ggplot() object.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/plot_spp_frc_data.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Plot species range and fractional coverage data — plot_spp_frc_data","text":"Note data automatically projected geographic coordinate system (EPSG:4326) plotted base map. means Area Habitat data shown maps contain base map might look slightly different underlying dataset.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/plot_spp_frc_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot species range and fractional coverage data — plot_spp_frc_data","text":"","code":"# \\dontrun{ # find file path for example range data following IUCN Red List data format ## N.B., the range data were not obtained from the IUCN Red List, ## and were instead based on data from GBIF (https://www.gbif.org/) path <- system.file(\"extdata\", \"EXAMPLE_SPECIES.zip\", package = \"aoh\") # import data spp_range_data <- read_spp_range_data(path) # specify settings for data processing output_dir <- tempdir() # folder to save AOH data cache_dir <- rappdirs::user_data_dir(\"aoh\") # persistent storage location n_threads <- parallel::detectCores() - 1 # speed up analysis # create cache directory if needed if (!file.exists(cache_dir)) { dir.create(cache_dir, showWarnings = FALSE, recursive = TRUE) } # create species information data spp_info_data <- create_spp_info_data( x = spp_range_data, cache_dir = cache_dir ) #> ℹ initializing #> ✔ initializing [346ms] #> #> ℹ cleaning species range data #> ✔ cleaning species range data [3.8s] #> #> ℹ importing species summary data #> ✔ importing species summary data [347ms] #> #> ℹ importing species habitat data #> ✔ importing species habitat data [334ms] #> #> ℹ collating species data #> ✔ collating species data [225ms] #> #> ℹ post-processing results #> ✔ post-processing results [10ms] #> #> ✔ finished # create fractional coverage data for species spp_aoh_data <- create_spp_frc_data( x = spp_info_data, res = 5000, output_dir = output_dir, n_threads = n_threads, cache_dir = cache_dir ) #> ℹ initializing #> ✔ initializing [4ms] #> #> ℹ importing global elevation data #> ✔ importing global elevation data [7.8s] #> #> ℹ importing global habitat data #> ! argument to \"crosswalk_data\" is missing the following 2 habitat classification codes: \"7.1\", \"7.2\" #> ℹ importing global habitat data #> ✔ importing global habitat data [5.6s] #> #> ℹ generating Area of Habitat data #> skipping 4 species distributions already processed #> ✔ generating Area of Habitat data [39ms] #> #> ℹ post-processing results #> ✔ post-processing results [37ms] #> #> ✔ finished # create fraction coverage dat for species spp_frc_data <- calc_spp_frc_data( x = spp_aoh_data, res = 5000, output_dir = output_dir, cache_dir = cache_dir ) #> ℹ importing global habitat data #> skipping 4 species distributions already processed #> ✔ importing global habitat data [5.4s] #> # plot the data to visualize the range maps and fractional coverage data p <- plot_spp_frc_data(spp_frc_data) print(p) # this plot can be customized using ggplot2 functions # for example, let's style the plot and update the colors ## load ggplot2 package library(ggplot2) ## customize plot p2 <- p + scale_fill_viridis_c() + scale_color_manual(values = c(\"range\" = \"blue\")) + scale_size_manual(values = c(\"range\" = 1.5)) + theme( strip.text = ggplot2::element_text(color = \"white\"), strip.background = ggplot2::element_rect( fill = \"black\", color = \"black\" ) ) ## print customized plot print(p2) # } # \\dontrun{ # we can also plot the data with a base map too ## note that you might need to install ggmap to run this example if (require(ggmap)) { ## create customized map with basemap p3 <- plot_spp_frc_data(spp_frc_data, zoom = 7, maptype = \"stamen_toner\") + scale_fill_viridis_c() + scale_color_manual(values = c(\"range\" = \"red\")) + scale_size_manual(values = c(\"range\" = 1.5)) + theme( strip.text = ggplot2::element_text(color = \"white\"), strip.background = ggplot2::element_rect( fill = \"black\", color = \"black\" ) ) ## print customized plot print(p3) } #> ℹ © Stadia Maps © Stamen Design © OpenMapTiles © OpenStreetMap contributors. #> Coordinate system already present. Adding new coordinate system, which will #> replace the existing one. # }"},{"path":"https://prioritizr.github.io/aoh/reference/read_spp_range_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Read species range data — read_spp_range_data","title":"Read species range data — read_spp_range_data","text":"Import species geographic range (.e., extent occurrence) data obtained International Union Conservation Nature (IUCN) Red List Threatened Species.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/read_spp_range_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read species range data — read_spp_range_data","text":"","code":"read_spp_range_data(path, n = NULL)"},{"path":"https://prioritizr.github.io/aoh/reference/read_spp_range_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read species range data — read_spp_range_data","text":"path character File path data (zip archive) file. n numeric Number features dataset import. Defaults NULL available data imported.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/read_spp_range_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read species range data — read_spp_range_data","text":"sf::sf() object containing dataset.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/read_spp_range_data.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Read species range data — read_spp_range_data","text":"Data amphibians, reptiles, mammals can obtained directly International Union Conservation Nature (IUCN) Red List website (see https://www.iucnredlist.org/resources/spatial-data-download). Data birds can obtained requesting data BirdLife International (see https://datazone.birdlife.org/species/requestdis). standardize data IUCN Red List BirdLife International, \"SISID\" \"SISRecID\" columns renamed \"id_no\".","code":""},{"path":"https://prioritizr.github.io/aoh/reference/read_spp_range_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Read species range data — read_spp_range_data","text":"","code":"# find file path for example range data following IUCN Red List data format ## N.B., the range data were not obtained from the IUCN Red List, ## and were instead based on data from GBIF (https://www.gbif.org/) path <- system.file(\"extdata\", \"EXAMPLE_SPECIES.zip\", package = \"aoh\") # import data spp_range_data <- read_spp_range_data(path) # preview data print(spp_range_data) #> Simple feature collection with 4 features and 26 fields #> Geometry type: POLYGON #> Dimension: XY #> Bounding box: xmin: -9.479736 ymin: 36.59422 xmax: 3.302702 ymax: 43.76455 #> Geodetic CRS: WGS 84 #> # A tibble: 4 × 27 #> id_no binomial presence origin seasonal compiler yrcompiled citation #> #> 1 979 Alytes dickhilleni 1 1 1 Derived… NA NA #> 2 59448 Calotriton asper 1 1 1 Derived… NA NA #> 3 4657 Chioglossa lusita… 1 1 1 Derived… NA NA #> 4 58622 Rana iberica 1 1 1 Derived… NA NA #> # ℹ 19 more variables: subspecies , subpop , source , #> # island , tax_comm , dist_comm , generalisd , #> # legend , kingdom , phylum , class , order_ , #> # family , genus , category , marine , terrestial , #> # freshwater , geometry # plot data plot(spp_range_data[, \"id_no\"])"},{"path":"https://prioritizr.github.io/aoh/reference/simulate_spp_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Simulate species data — simulate_spp_data","title":"Simulate species data — simulate_spp_data","text":"Simulate species data creating Area Habitat data (Brooks et al. 2019). Specifically, data simulated define species geographic ranges, summary information, habitat preferences.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/simulate_spp_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Simulate species data — simulate_spp_data","text":"","code":"simulate_spp_data( n, boundary_data, habitat_data = NULL, elevation_data = NULL, crosswalk_data = NULL, rf_scale_min = 0.5, rf_scale_max = 0.7, cache_dir = tempdir(), habitat_version = \"latest\", force = FALSE, omit_habitat_codes = iucn_habitat_codes_marine(), verbose = TRUE )"},{"path":"https://prioritizr.github.io/aoh/reference/simulate_spp_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Simulate species data — simulate_spp_data","text":"n integer Number species simulate. boundary_data sf::st_sf() Spatial object delineating spatial extent boundary simulating species ranges. habitat_data terra::rast() Raster data indicating presence different habitat classes across world (e.g., Jung et al. 2020a,b; Lumbierres et al. 2021). grid cell contain integer value specifies habitat class present within cell (based argument crosswalk_data). Defaults NULL data automatically obtained (using get_lumb_cgls_habitat_data()). elevation_data terra::rast() Raster data delineating worldwide elevation data (e.g., Robinson et al. 2014). Defaults NULL data automatically obtained (using get_global_elevation_data()). data obtained automatically, preprocessed version habitat data used reduce processing time. crosswalk_data data.frame() Table containing data indicate grid cell values argument habitat_data correspond IUCN habitat classification codes. argument contain code column specifies set IUCN habitat classification codes (see iucn_habitat_data(), value column specifies different values argument habitat_data. Defaults NULL crosswalk default habitat data used (.e., crosswalk_lumb_cgls_data()). rf_scale_min numeric Minimum scaling parameter used control smallest possible level spatial auto-correlation simulated species ranges. Defaults 0.5. rf_scale_max numeric Minimum scaling parameter used control largest possible level spatial auto-correlation simulated species ranges. Defaults 0.7. cache_dir character Folder path downloading caching data. default, temporary directory used (.e., tempdir()). avoid downloading data multiple times, strongly recommended specify persistent storage location (see Examples ). habitat_version character Version habitat dataset used. See documentation version parameter get_lumb_cgls_habitat_data() function details. parameter used habitat data obtained automatically (.e., argument habitat_data NULL). Defaults \"latest\" recent version dataset used data need obtained. force logical data downloaded even data already available? Defaults FALSE. omit_habitat_codes character Habitat classification codes omit resulting Area Habitat data. Please see IUCN Red List Habitat Classification Scheme full range habitat classification codes. example, aim identify natural places contain suitable conditions, areas classified anthropogenically modified (iucn_habitat_codes_artificial()), introduced vegetation (iucn_habitat_codes_introduced(), unknown habitat (iucn_habitat_codes_misc()) excluded. Defaults iucn_habitat_codes_marine(), marine habitats excluded. verbose logical progress displayed processing data? Defaults TRUE.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/simulate_spp_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Simulate species data — simulate_spp_data","text":"list object containing simulated data formatted following conventions used International Union Conservation Nature (IUCN) Red List Threatened Species. contains following elements: spp_range_data sf::st_sf() object containing species' geographic range data. spp_summary_data tibble::tibble() object containing summary information species (including elevational limit information. spp_habitat_data tibble::tibble() object containing habitat preferences species.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/simulate_spp_data.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Simulate species data — simulate_spp_data","text":"Brooks TM, Pimm SL, Akçakaya HR, Buchanan GM, Butchart SHM, Foden W, Hilton-Taylor C, Hoffmann M, Jenkins CN, Joppa L, Li BV, Menon V, Ocampo-Peñuela N, Rondinini C (2019) Measuring terrestrial Area Habitat (AOH) utility IUCN Red List. Trends Ecology & Evolution, 34, 977–986. doi:10.1016/j.tree.2019.06.009","code":""},{"path":[]},{"path":"https://prioritizr.github.io/aoh/reference/simulate_spp_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Simulate species data — simulate_spp_data","text":"","code":"# please ensure that the fields and smoothr packages are installed # to run these examples # \\dontrun{ # define persistent storage location download_dir <- rappdirs::user_data_dir(\"aoh\") # create download directory if needed if (!file.exists(download_dir)) { dir.create(download_dir, showWarnings = FALSE, recursive = TRUE) } # specify file path for boundary data boundary_path <- system.file(\"shape/nc.shp\", package = \"sf\") # import boundary data to simulate species data boundary_data <- sf::st_union(sf::read_sf(boundary_path)) # set random number generator seeds for consistency set.seed(500) # simulate data for 5 species x <- simulate_spp_data( n = 5, boundary_data = boundary_data, cache_dir = download_dir ) #> ℹ importing global elevation data #> ✔ importing global elevation data [7.6s] #> #> ℹ importing global habitat data #> ✔ importing global habitat data [1m 18.3s] #> # preview species range data print(x$spp_range_data) #> Simple feature collection with 17 features and 26 fields #> Geometry type: GEOMETRY #> Dimension: XY #> Bounding box: xmin: -84.31763 ymin: 33.88392 xmax: -75.45658 ymax: 36.5881 #> Geodetic CRS: WGS 84 #> First 10 features: #> id_no seasonal presence origin geometry #> 1 799 1 1 1 POLYGON ((-78.71844 34.0082... #> 2 799 1 3 2 POLYGON ((-78.40331 34.2545... #> 3 2102 1 1 1 MULTIPOLYGON (((-76.49551 3... #> 4 2102 3 1 1 MULTIPOLYGON (((-76.86322 3... #> 5 2102 4 1 1 MULTIPOLYGON (((-82.74959 3... #> 6 2102 3 4 4 MULTIPOLYGON (((-77.15074 3... #> 7 2102 3 3 3 MULTIPOLYGON (((-77.22261 3... #> 8 4082 1 1 1 MULTIPOLYGON (((-78.57828 3... #> 9 4082 1 1 6 MULTIPOLYGON (((-78.49659 3... #> 10 4082 1 4 2 MULTIPOLYGON (((-78.2597 35... #> binomial compiler yrcompiled citation subspecies subpop source #> 1 Simulus spp. 799 Simulation NA #> 2 Simulus spp. 799 Simulation NA #> 3 Simulus spp. 2102 Simulation NA #> 4 Simulus spp. 2102 Simulation NA #> 5 Simulus spp. 2102 Simulation NA #> 6 Simulus spp. 2102 Simulation NA #> 7 Simulus spp. 2102 Simulation NA #> 8 Simulus spp. 4082 Simulation NA #> 9 Simulus spp. 4082 Simulation NA #> 10 Simulus spp. 4082 Simulation NA #> island tax_comm dist_comm generalisd legend kingdom phylum class order_ #> 1 NA #> 2 NA #> 3 NA #> 4 NA #> 5 NA #> 6 NA #> 7 NA #> 8 NA #> 9 NA #> 10 NA #> family genus category marine terrestial freshwater #> 1 Simulus LC false true false #> 2 Simulus LC false true false #> 3 Simulus LC false true false #> 4 Simulus LC false true false #> 5 Simulus LC false true false #> 6 Simulus LC false true false #> 7 Simulus LC false true false #> 8 Simulus VU false true false #> 9 Simulus VU false true false #> 10 Simulus VU false true false # preview species habitat preference data print(x$spp_habitat_data) #> # A tibble: 21 × 6 #> id_no code habitat suitability season majorimportance #> #> 1 799 4.4 Grassland - Temperate Suitable Resid… NA #> 2 799 14.3 Plantations Suitable Resid… NA #> 3 799 14.1 Arable Land Suitable Resid… NA #> 4 2102 4.4 Grassland - Temperate Suitable Resid… NA #> 5 2102 3.4 Shrubland - Temperate Suitable Resid… NA #> 6 2102 5.15 Wetlands (inland) - Seasonal/… Suitable Resid… NA #> 7 2102 3.4 Shrubland - Temperate Suitable Non-b… NA #> 8 2102 14.1 Arable Land Suitable Non-b… NA #> 9 2102 14.3 Plantations Suitable Non-b… NA #> 10 2102 14.3 Plantations Suitable Passa… NA #> # ℹ 11 more rows # preview species summary data print(x$spp_summary_data) #> # A tibble: 5 × 31 #> id_no taxonid scientific_name kingdom phylum class order family genus #> #> 1 799 799 Simulus spp. 799 NA NA NA NA NA Simulus #> 2 2102 2102 Simulus spp. 2102 NA NA NA NA NA Simulus #> 3 4082 4082 Simulus spp. 4082 NA NA NA NA NA Simulus #> 4 5167 5167 Simulus spp. 5167 NA NA NA NA NA Simulus #> 5 5479 5479 Simulus spp. 5479 NA NA NA NA NA Simulus #> # ℹ 22 more variables: main_common_name , authority , #> # published_year , assessment_date , category , #> # criteria , population_trend , marine_system , #> # freshwater_system , terrestrial_system , assessor , #> # reviewer , aoo_km2 , eoo_km2 , elevation_upper , #> # elevation_lower , depth_upper , depth_lower , #> # errata_flag , errata_reason , amended_flag , … # }"},{"path":"https://prioritizr.github.io/aoh/reference/st_repair_geometry.html","id":null,"dir":"Reference","previous_headings":"","what":"Repair geometry — st_repair_geometry","title":"Repair geometry — st_repair_geometry","text":"Repair geometry sf::st_sf() object.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/st_repair_geometry.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Repair geometry — st_repair_geometry","text":"","code":"st_repair_geometry(x, geometry_precision = 1e+05)"},{"path":"https://prioritizr.github.io/aoh/reference/st_repair_geometry.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Repair geometry — st_repair_geometry","text":"x sf::sf() object. geometry_precision numeric level precision processing spatial data (used sf::st_set_precision()). default 100000 (higher values indicate higher precision). Although level precision generally suitable fine-scale analyses, might result unnecessarily long computation times (e.g., 1500 suitable national-scale analyses). encounter geometry errors, increasing argument parameter can sometimes resolve issues.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/st_repair_geometry.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Repair geometry — st_repair_geometry","text":"function works first using sf::st_make_valid() function attempt fix geometry issues. Since sf::st_make_valid() function sometimes produce incorrect geometries rare cases (e.g., fixing invalid geometries cross dateline), function uses st_prepair() function prepr package fix geometries instead (see https://github.com/dickoa/prepr details).","code":""},{"path":"https://prioritizr.github.io/aoh/reference/st_repair_geometry.html","id":"installation","dir":"Reference","previous_headings":"","what":"Installation","title":"Repair geometry — st_repair_geometry","text":"function uses prepr package help repair geometries certain cases. prepr package available Comprehensive R Archive Network (CRAN), must installed online code repository. achieve , please use following code: Note prepr package system dependencies need installed package can installed (see package README file platform-specific instructions).","code":"if (!require(remotes)) install.packages(\"remotes\") remotes::install_github(\"dickoa/prepr\")"},{"path":"https://prioritizr.github.io/aoh/reference/st_repair_geometry.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Repair geometry — st_repair_geometry","text":"","code":"# create sf object p1 <- st_sf( id = 1, geometry = st_as_sfc(\"POLYGON((0 0, 0 10, 10 0, 10 10, 0 0))\", crs = 3857) ) # repair geometry p2 <- st_repair_geometry(p1) # print object print(p2) #> Simple feature collection with 1 feature and 1 field #> Geometry type: MULTIPOLYGON #> Dimension: XY #> Bounding box: xmin: 0 ymin: 0 xmax: 10 ymax: 10 #> Projected CRS: WGS 84 / Pseudo-Mercator #> id geometry #> 1 1 MULTIPOLYGON (((0 0, 0 10, ..."},{"path":"https://prioritizr.github.io/aoh/reference/system_gdal_version.html","id":null,"dir":"Reference","previous_headings":"","what":"System GDAL version — system_gdal_version","title":"System GDAL version — system_gdal_version","text":"Find version Geospatial Data Abstraction Library (GDAL) currently installed system.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/system_gdal_version.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"System GDAL version — system_gdal_version","text":"","code":"system_gdal_version()"},{"path":"https://prioritizr.github.io/aoh/reference/system_gdal_version.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"System GDAL version — system_gdal_version","text":"character value describing version GDAL installed. GDAL installed, missing (NA) value returned.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/system_gdal_version.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"System GDAL version — system_gdal_version","text":"","code":"# show version of GDAL installed print(system_gdal_version()) #> [1] \"3.6.4\""},{"path":"https://prioritizr.github.io/aoh/reference/terra_combine.html","id":null,"dir":"Reference","previous_headings":"","what":"Combine rasters — terra_combine","title":"Combine rasters — terra_combine","text":"Align combine list multiple terra::rast() objects single terra::rast() object multiple layers.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/terra_combine.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Combine rasters — terra_combine","text":"","code":"terra_combine(x)"},{"path":"https://prioritizr.github.io/aoh/reference/terra_combine.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Combine rasters — terra_combine","text":"x list terra::rast() objects.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/terra_combine.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Combine rasters — terra_combine","text":"terra::rast() object.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/terra_combine.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Combine rasters — terra_combine","text":"","code":"# create a raster x <- rast( ncols = 10, nrows = 10, xmin = 0, xmax = 10, ymin = 0, ymax = 10, crs = \"+proj=lcc +lat_1=48 +lat_2=33 +lon_0=-100 +datum=WGS84\" ) values(x) <- runif(ncell(x)) names(x) <- \"lyr1\" print(x) #> class : SpatRaster #> dimensions : 10, 10, 1 (nrow, ncol, nlyr) #> resolution : 1, 1 (x, y) #> extent : 0, 10, 0, 10 (xmin, xmax, ymin, ymax) #> coord. ref. : +proj=lcc +lat_0=0 +lon_0=-100 +lat_1=48 +lat_2=33 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs #> source(s) : memory #> name : lyr1 #> min value : 0.01479463 #> max value : 0.99543629 # create another raster y <- rast( ncols = 5, nrows = 5, xmin = 90, xmax = 95, ymin = 80, ymax = 85, crs = \"+proj=lcc +lat_1=48 +lat_2=33 +lon_0=-100 +datum=WGS84\" ) values(y) <- runif(ncell(y)) names(y) <- \"lyr2\" print(y) #> class : SpatRaster #> dimensions : 5, 5, 1 (nrow, ncol, nlyr) #> resolution : 1, 1 (x, y) #> extent : 90, 95, 80, 85 (xmin, xmax, ymin, ymax) #> coord. ref. : +proj=lcc +lat_0=0 +lon_0=-100 +lat_1=48 +lat_2=33 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs #> source(s) : memory #> name : lyr2 #> min value : 0.02622582 #> max value : 0.96173582 # combine them together z <- terra_combine(list(x, y)) # plot combined raster plot(z)"},{"path":"https://prioritizr.github.io/aoh/reference/terra_gdal_calc.html","id":null,"dir":"Reference","previous_headings":"","what":"GDAL calculate — terra_gdal_calc","title":"GDAL calculate — terra_gdal_calc","text":"function wrapper gdal_calc.py script use terra objects.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/terra_gdal_calc.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"GDAL calculate — terra_gdal_calc","text":"","code":"terra_gdal_calc( x, expr, y = NULL, z = NULL, n_threads = 1, filename = tempfile(fileext = \".tif\"), datatype = \"FLT4S\", tiled = FALSE, bigtiff = FALSE, compress = \"LZW\", predictor = 1, nbits = NULL, verbose = TRUE, NAflag = NULL, output_raster = TRUE )"},{"path":"https://prioritizr.github.io/aoh/reference/terra_gdal_calc.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"GDAL calculate — terra_gdal_calc","text":"x terra::rast() Raster object source data. expr character Value containing expression. y terra::rast() Optional raster calculations. z terra::rast() Optional raster calculations. n_threads integer Number computational threads use data processing. reduce run time, strongly recommended set parameter based available resources (see Examples section ). Defaults 1. filename character Filename output raster. Defaults tempfile(fileext = \".tif\"). datatype character Value indicating data type saving data. Defaults \"FLT4S\". tiled logical Value indicating GeoTIFF files tiled. Defaults FALSE. bigtiff logical Value indicating data stored BIGTIFF format. Defaults FALSE. compress character Value indicating compression format. Available options include \"LZW\" \"DEFLATE\". Defaults \"LZW\". predictor integer Predictor GeoTIFF compression (see GDAL documentation). Defaults 1 predictor used compression. nbits integer Number bits output data. Defaults NULL number bits automatically determined. verbose logical information displayed processing? Defaults TRUE. NAflag numeric Value representing missing (NA) values. \"none\" value can also used indicate flag set. Defaults NULL value determined automatically. output_raster logical raster (terra::rast()) object returned? FALSE file path resulting file returned. Defaults TRUE.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/terra_gdal_calc.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"GDAL calculate — terra_gdal_calc","text":"terra::rast() raster object.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/terra_gdal_calc.html","id":"troubleshooting","dir":"Reference","previous_headings":"","what":"Troubleshooting","title":"GDAL calculate — terra_gdal_calc","text":"function aims automatically determine best approach run gdal_calc.py script. However, always successful. , several environmental variables can configured manually specify exactly gdal_calc.py script executed. variables specify following behavior. GDAL_PYTHON Specifies file path Python executable used run gdal_calc.py script. example, variable configured : sys.setenv(\"GDAL_PYTHON\", \"python\"), sys.setenv(\"GDAL_PYTHON\", \"python3\"), sys.setenv(\"GDAL_PYTHON\", \"python.exe\"). GDAL_CALC Specifies file path gdal_calc.py script. example, variable configured : sys.setenv(\"GDAL_PYTHON\", \"gdal_calc.py\"), sys.setenv(\"GDAL_PYTHON\", \"C:\\\\OSGeo4W\\\\apps\\\\Python39\\\\Scripts\\\\gdal_calc.py\"). GDAL_ESCAPE Specifies whether symbols mathematical expressions used perform calculations escaped. Windows systems, default behavior escape symbols. behavior can disabled using following code: sys.setenv(\"GDAL_ESCAPE\", \"false\").","code":""},{"path":[]},{"path":"https://prioritizr.github.io/aoh/reference/terra_gdal_calc.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"GDAL calculate — terra_gdal_calc","text":"","code":"# please ensure that the Python and the GDAL system binaries are # installed to run the example, # see ?is_gdal_calc_available for more details # \\dontrun{ # create raster with data x <- rast( ncols = 40, nrows = 40, xmin = -110, xmax = -90, ymin = 40, ymax=60, crs = \"+proj=longlat +datum=WGS84\" ) values(x) <- seq_len(ncell(x)) # run calculation y <- terra_gdal_calc(x, \"(X < 20) * 1\") #> ℹ System command: gdal_calc.py -X \"/tmp/Rtmp06n6tE/file16f3fc7b89b3ae.tif\" --outfile=\"/tmp/Rtmp06n6tE/file16f3fc1ed27cfc.tif\" --calc=\"(X < 20) * 1\" --type=\"Float32\" --co=\"NUM_THREADS=1\" --co=\"COMPRESS=LZW\" --co=\"PREDICTOR=1\" # preview result print(y) #> class : SpatRaster #> dimensions : 40, 40, 1 (nrow, ncol, nlyr) #> resolution : 0.5, 0.5 (x, y) #> extent : -110, -90, 40, 60 (xmin, xmax, ymin, ymax) #> coord. ref. : lon/lat WGS 84 (EPSG:4326) #> source : file16f3fc1ed27cfc.tif #> name : lyr.1 # }"},{"path":"https://prioritizr.github.io/aoh/reference/terra_gdal_crop.html","id":null,"dir":"Reference","previous_headings":"","what":"Crop a raster using GDAL — terra_gdal_crop","title":"Crop a raster using GDAL — terra_gdal_crop","text":"function wrapper gdalUtilities::gdal_translate() use terra objects.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/terra_gdal_crop.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Crop a raster using GDAL — terra_gdal_crop","text":"","code":"terra_gdal_crop( x, ext, n_threads = 1, filename = tempfile(fileext = \".tif\"), datatype = \"FLT4S\", cache_limit = 200, tiled = FALSE, bigtiff = FALSE, compress = \"LZW\", verbose = TRUE, NAflag = NULL, output_raster = TRUE )"},{"path":"https://prioritizr.github.io/aoh/reference/terra_gdal_crop.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Crop a raster using GDAL — terra_gdal_crop","text":"x terra::rast() Raster object source data. ext terra::ext() Raster extent object. n_threads integer Number computational threads use data processing. reduce run time, strongly recommended set parameter based available resources (see Examples section ). Defaults 1. filename character Filename output raster. Defaults tempfile(fileext = \".tif\"). datatype character Value indicating data type saving data. Defaults \"FLT4S\". cache_limit integer Number MB use GDAL caching. Defaults 200. tiled logical Value indicating GeoTIFF files tiled. Defaults FALSE. bigtiff logical Value indicating data stored BIGTIFF format. Defaults FALSE. compress character Value indicating compression format. Available options include \"LZW\" \"DEFLATE\". Defaults \"LZW\". verbose logical information displayed processing? Defaults TRUE. NAflag numeric Value representing missing (NA) values. \"none\" value can also used indicate flag set. Defaults NULL value determined automatically. output_raster logical raster (terra::rast()) object returned? FALSE file path resulting file returned. Defaults TRUE.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/terra_gdal_crop.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Crop a raster using GDAL — terra_gdal_crop","text":"terra::rast() raster object.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/terra_gdal_crop.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Crop a raster using GDAL — terra_gdal_crop","text":"","code":"# please ensure that the gdalUtilities package is installed # to run this example # create raster with data x <- rast( ncols = 40, nrows = 40, xmin = -110, xmax = -90, ymin = 40, ymax=60, crs = \"+proj=longlat +datum=WGS84\" ) values(x) <- seq_len(ncell(x)) # create extent for cropping y <- ext(x) - c(5, 2.5, 1, 1.5) # crop data z <- terra_gdal_crop(x, y) # preview result print(z) #> class : SpatRaster #> dimensions : 35, 25, 1 (nrow, ncol, nlyr) #> resolution : 0.5, 0.5 (x, y) #> extent : -105, -92.5, 41, 58.5 (xmin, xmax, ymin, ymax) #> coord. ref. : lon/lat WGS 84 (EPSG:4326) #> source : file16f3fc6cf6deb5.tif #> name : lyr.1"},{"path":"https://prioritizr.github.io/aoh/reference/terra_gdal_project.html","id":null,"dir":"Reference","previous_headings":"","what":"Project a raster using GDAL — terra_gdal_project","title":"Project a raster using GDAL — terra_gdal_project","text":"function wrapper gdalUtilities::gdalwarp() use terra objects.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/terra_gdal_project.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Project a raster using GDAL — terra_gdal_project","text":"","code":"terra_gdal_project( x, y, method = \"bilinear\", n_threads = 1, filename = tempfile(fileext = \".tif\"), datatype = \"FLT4S\", cache_limit = 200, tiled = FALSE, bigtiff = FALSE, compress = \"LZW\", verbose = TRUE, NAflag = NULL, output_raster = TRUE )"},{"path":"https://prioritizr.github.io/aoh/reference/terra_gdal_project.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Project a raster using GDAL — terra_gdal_project","text":"x terra::rast() Raster object source data. y terra::rast() Raster object specifying spatial properties output data. method character Name interpolation method. n_threads integer Number computational threads use data processing. reduce run time, strongly recommended set parameter based available resources (see Examples section ). Defaults 1. filename character Filename output raster. Defaults tempfile(fileext = \".tif\"). datatype character Value indicating data type saving data. Defaults \"FLT4S\". cache_limit integer Number MB use GDAL caching. Defaults 200. tiled logical Value indicating GeoTIFF files tiled. Defaults FALSE. bigtiff logical Value indicating data stored BIGTIFF format. Defaults FALSE. compress character Value indicating compression format. Available options include \"LZW\" \"DEFLATE\". Defaults \"LZW\". verbose logical information displayed processing? Defaults TRUE. NAflag numeric Value representing missing (NA) values. \"none\" value can also used indicate flag set. Defaults NULL value determined automatically. output_raster logical raster (terra::rast()) object returned? FALSE file path resulting file returned. Defaults TRUE.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/terra_gdal_project.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Project a raster using GDAL — terra_gdal_project","text":"terra::rast() raster object.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/terra_gdal_project.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Project a raster using GDAL — terra_gdal_project","text":"","code":"# please ensure that the gdalUtilities package is installed # to run this example # create raster with data x <- rast( ncols = 40, nrows = 40, xmin = -110, xmax = -90, ymin = 40, ymax=60, crs = \"+proj=longlat +datum=WGS84\" ) values(x) <- seq_len(ncell(x)) # create raster to define spatial properties for projection y <- rast( ncols = 94, nrows = 124, xmin = -944881, xmax = 935118, ymin = 4664377, ymax = 7144377, crs = \"+proj=lcc +lat_1=48 +lat_2=33 +lon_0=-100 +datum=WGS84\" ) # project data z <- terra_gdal_project(x, y) # preview result print(z) #> class : SpatRaster #> dimensions : 124, 94, 1 (nrow, ncol, nlyr) #> resolution : 19999.99, 20000 (x, y) #> extent : -944881, 935118, 4664377, 7144377 (xmin, xmax, ymin, ymax) #> coord. ref. : +proj=lcc +lat_0=0 +lon_0=-100 +lat_1=48 +lat_2=33 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs #> source : file16f3fc7fb3778a.tif #> name : lyr.1"},{"path":"https://prioritizr.github.io/aoh/reference/terra_gdal_rasterize.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert vector data into a raster using GDAL — terra_gdal_rasterize","title":"Convert vector data into a raster using GDAL — terra_gdal_rasterize","text":"function wrapper gdalUtilities::gdal_rasterize() use terra objects.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/terra_gdal_rasterize.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert vector data into a raster using GDAL — terra_gdal_rasterize","text":"","code":"terra_gdal_rasterize( x, sf, burn = 1, init = 0, invert = FALSE, update = FALSE, touches = FALSE, n_threads = 1, filename = tempfile(fileext = \".tif\"), sf_filename = tempfile(fileext = \".gpkg\"), datatype = \"FLT4S\", cache_limit = 200, tiled = FALSE, bigtiff = FALSE, nbits = NULL, compress = \"LZW\", NAflag = NULL, verbose = TRUE, output_raster = TRUE )"},{"path":"https://prioritizr.github.io/aoh/reference/terra_gdal_rasterize.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert vector data into a raster using GDAL — terra_gdal_rasterize","text":"x terra::rast() Raster object source data. sf sf::st_sf() Spatial object rasterize. burn numeric Value encoding vector data. Defaults 1. init numeric Value encoding background cells overlap vector data. Defaults 0. invert logical burn process inverted? Defaults FALSE. update logical result producing updating argument x? FALSE argument x used specify spatial properties resulting raster (.e., values result), Defaults FALSE. touches logical cells x overlap part sf treated covered sf? Defaults FALSE, cells centroid covered sf treated covered. n_threads integer Number computational threads use data processing. reduce run time, strongly recommended set parameter based available resources (see Examples section ). Defaults 1. filename character Filename output raster. Defaults tempfile(fileext = \".tif\"). sf_filename character File name temporarily save argument sf. Defaults temporary (geopackage) file. datatype character Value indicating data type saving data. Defaults \"FLT4S\". cache_limit integer Number MB use GDAL caching. Defaults 200. tiled logical Value indicating GeoTIFF files tiled. Defaults FALSE. bigtiff logical Value indicating data stored BIGTIFF format. Defaults FALSE. nbits integer Number bits output data. Defaults NULL number bits automatically determined. compress character Value indicating compression format. Available options include \"LZW\" \"DEFLATE\". Defaults \"LZW\". NAflag numeric Value representing missing (NA) values. \"none\" value can also used indicate flag set. Defaults NULL value determined automatically. verbose logical information displayed processing? Defaults TRUE. output_raster logical raster (terra::rast()) object returned? FALSE file path resulting file returned. Defaults TRUE.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/terra_gdal_rasterize.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert vector data into a raster using GDAL — terra_gdal_rasterize","text":"terra::rast() raster object.","code":""},{"path":"https://prioritizr.github.io/aoh/reference/terra_gdal_rasterize.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert vector data into a raster using GDAL — terra_gdal_rasterize","text":"","code":"# please ensure that the gdalUtilities package is installed # to run this example # import vector data f <- system.file(\"ex/lux.shp\", package = \"terra\") sf <- read_sf(f) # create template raster x <- rast(vect(sf), ncols = 75, nrows = 100) x <- terra::setValues(x, runif(terra::ncell(x))) # rasterize vector data z <- terra_gdal_rasterize(x, sf, burn = 5) # plot result plot(z)"},{"path":"https://prioritizr.github.io/aoh/news/index.html","id":"aoh-00214","dir":"Changelog","previous_headings":"","what":"aoh 0.0.2.14","title":"aoh 0.0.2.14","text":"Update create_spp_info_data() make data cleaning functionality robust BirdLife species’ range dataset. mammal speices terrestrial marine distributions (see inst/scripts/aoh-data.R) New built-helper script download species identifiers IUCN Red List (see inst/scripts/iucn-species-list.R)","code":""},{"path":"https://prioritizr.github.io/aoh/news/index.html","id":"aoh-00213","dir":"Changelog","previous_headings":"","what":"aoh 0.0.2.13","title":"aoh 0.0.2.13","text":"Update read_spp_range_data() create_spp_info_data() fix incompatibility issue latest version BirdLife species range dataset (#57). Thanks Jianqiao Zhao bug report. Update create_spp_aoh_data() create_spp_frc_data() provide correct error message argument x contain \"id_no\" column.","code":""},{"path":"https://prioritizr.github.io/aoh/news/index.html","id":"aoh-00212","dir":"Changelog","previous_headings":"","what":"aoh 0.0.2.12","title":"aoh 0.0.2.12","text":"Fix bug create_spp_info_data() assigning habitat types resident distributions migratory non-migratory species. bug meant () habitat types resident distributions migratory species include exclusively affiliated species’ passage distributions (ii) habitat types resident distributions non-migratory species include exclusively affiliated species’ passage distributions. Thanks Jianqiao Zhao bug report. Update built-testing data include multiple migratory species. Update internal R script creating test dataset (.e., inst/scripts/test-data.R) compatible current version package. Update is_gdal_calc_available() robust. Fix URLs.","code":""},{"path":"https://prioritizr.github.io/aoh/news/index.html","id":"aoh-00211","dir":"Changelog","previous_headings":"","what":"aoh 0.0.2.11","title":"aoh 0.0.2.11","text":"Fix bug create_spp_info_data() IUCN Red List API key can specified using key parameter. Fix aliasing package manual entry.","code":""},{"path":"https://prioritizr.github.io/aoh/news/index.html","id":"aoh-00210","dir":"Changelog","previous_headings":"","what":"aoh 0.0.2.10","title":"aoh 0.0.2.10","text":"Update prepr ggmap package dependencies.","code":""},{"path":"https://prioritizr.github.io/aoh/news/index.html","id":"aoh-0029","dir":"Changelog","previous_headings":"","what":"aoh 0.0.2.9","title":"aoh 0.0.2.9","text":"Remove rgdal package dependency. Updates URLs. Update functions downloading preprocessed data Zenodo. Update plot_spp_aoh_data() plot_spp_frc_data() compatible changes ggmap package creating maps basemap.","code":""},{"path":"https://prioritizr.github.io/aoh/news/index.html","id":"aoh-0028","dir":"Changelog","previous_headings":"","what":"aoh 0.0.2.8","title":"aoh 0.0.2.8","text":"Fix failing tests continuous integration services (due issues unzipping test files).","code":""},{"path":"https://prioritizr.github.io/aoh/news/index.html","id":"aoh-0027","dir":"Changelog","previous_headings":"","what":"aoh 0.0.2.7","title":"aoh 0.0.2.7","text":"Update read_spp_range_data() can import data zip file contains multiple ESRI Shapefiles (e.g., 2022-2 IUCN Red List release reptile data).","code":""},{"path":"https://prioritizr.github.io/aoh/news/index.html","id":"aoh-0026","dir":"Changelog","previous_headings":"","what":"aoh 0.0.2.6","title":"aoh 0.0.2.6","text":"Update create_spp_aoh_data() create_spp_frc_data() new rasterize_touches parameter (#48). parameter can toggled rasterizing species’ range data, raster cells partially overlap part species’ range treated covered species’ range. functionality may especially useful species small geographic ranges. Fix bug create_spp_aoh_data() create_spp_frc_data() causes Python errors using GDAL engine habitat_data elevation_data raster stored memory (associated file disk). Fix bug create_spp_aoh_data() create_spp_frc_data() causes GRASS engine throws errors. Update package dependency versions.","code":""},{"path":"https://prioritizr.github.io/aoh/news/index.html","id":"aoh-0025","dir":"Changelog","previous_headings":"","what":"aoh 0.0.2.5","title":"aoh 0.0.2.5","text":"Fix compatibility updates terra::compareGeom().","code":""},{"path":"https://prioritizr.github.io/aoh/news/index.html","id":"aoh-0024","dir":"Changelog","previous_headings":"","what":"aoh 0.0.2.4","title":"aoh 0.0.2.4","text":"Update data cleaning procedures create_spp_info_data() useful error message provided species excluded.","code":""},{"path":"https://prioritizr.github.io/aoh/news/index.html","id":"aoh-0023","dir":"Changelog","previous_headings":"","what":"aoh 0.0.2.3","title":"aoh 0.0.2.3","text":"Fix bug create_spp_aoh_data() using GRASS engine caused function throw error failed initialize new GRASS project correctly. Update get_spp_habitat_data(), get_spp_summary_data(), get_spp_threat_data(), get_spp_summary_data() functions throw warnings related dplyr package.","code":""},{"path":"https://prioritizr.github.io/aoh/news/index.html","id":"aoh-0022","dir":"Changelog","previous_headings":"","what":"aoh 0.0.2.2","title":"aoh 0.0.2.2","text":"New iucn_threat_data built-dataset denoting threat information IUCN Red List Threat Classification. Fix compatibility tests updates IUCN Red List. Fix compatibility tidyselect package (>= 1.2.0). Fix badges README. rgrass package now used GRASS functionality (due upcoming deprecation rgrass7 package).","code":""},{"path":"https://prioritizr.github.io/aoh/news/index.html","id":"aoh-0021","dir":"Changelog","previous_headings":"","what":"aoh 0.0.2.1","title":"aoh 0.0.2.1","text":"Update create_spp_info_data() data cleaning procedures replace 0 m lower elevation limits 500 m (#39). IUCN Red List assigns lower limit values 0 m many species parts distribution areas sea level. Update create_spp_info_data() data can processed using EPSG:4326 coordinate reference system. Instead throwing error, function now display alert. Fix bug create_spp_aoh_data() terra engine caused negative elevations rounded zero.","code":""},{"path":"https://prioritizr.github.io/aoh/news/index.html","id":"aoh-0020","dir":"Changelog","previous_headings":"","what":"aoh 0.0.2.0","title":"aoh 0.0.2.0","text":"Initial stable release. Add tests st_repair_geometry(). Add URLs citations README. Update references documentation.","code":""},{"path":"https://prioritizr.github.io/aoh/news/index.html","id":"aoh-0016","dir":"Changelog","previous_headings":"","what":"aoh 0.0.1.6","title":"aoh 0.0.1.6","text":"Fix spelling formatting mistakes vignette. Update st_repair_geometry() robust geometry issues.","code":""},{"path":"https://prioritizr.github.io/aoh/news/index.html","id":"aoh-0015","dir":"Changelog","previous_headings":"","what":"aoh 0.0.1.5","title":"aoh 0.0.1.5","text":"Update documentation create_spp_info_data() function. Update create_spp_info_data() function methodology used correct errors species’ elevational limits now follows best practices. behavior controlled using adjust_elevational_limits. elevational limits altered processing, can specified setting adjust_elevational_limits = FALSE. Update create_spp_info_data() function IUCN habitat codes adjusted assigned based guidelines identification Key Biodiversity Areas. Broadly speaking, guidelines assign IUCN habitat codes species’ distributions manner minimize omission errors. behavior controlled adjust_habitat_codes parameter. habitat codes assigned based exact matches (e.g., Resident distributions associated habitat codes described Resident distributions), can specified setting adjust_habitat_codes = FALSE. Update create_spp_info_data(), create_spp_aoh_data(), create_spp_frc_data(), calc_spp_frc_data() functions returned sf::st_sf() object now contains additional migratory column indicating species processed migratory species . Update create_spp_info_data(), create_spp_aoh_data(), create_spp_frc_data(), calc_spp_frc_data() functions order columns now places IUCN threat status information (.e., \"category\" column) closer start table. Update tests robust Zenodo website outages.","code":""},{"path":"https://prioritizr.github.io/aoh/news/index.html","id":"aoh-0014","dir":"Changelog","previous_headings":"","what":"aoh 0.0.1.4","title":"aoh 0.0.1.4","text":"Updatest_repair_geometry() avoid unneeded geometry duplication. reduces memory requirements forcrate_spp_info_data().","code":""},{"path":"https://prioritizr.github.io/aoh/news/index.html","id":"aoh-0013","dir":"Changelog","previous_headings":"","what":"aoh 0.0.1.3","title":"aoh 0.0.1.3","text":"Fix issues using GDAL engine processing data Windows. Specifically, package now correctly work GDAL Python bindings installed part OSGeo4W software (#32). Fix issues functions downloading datasets fail load data cache, needlessly re-download data. Fix issue attempting download data query data version numbers throw error due errors Zenodo API.","code":""},{"path":"https://prioritizr.github.io/aoh/news/index.html","id":"aoh-0012","dir":"Changelog","previous_headings":"","what":"aoh 0.0.1.2","title":"aoh 0.0.1.2","text":"Suppress meaningless warnings triggered GRASS macOS. Increase version requirement terra package. Fix IUCN Red List API tests.","code":""},{"path":"https://prioritizr.github.io/aoh/news/index.html","id":"aoh-0011","dir":"Changelog","previous_headings":"","what":"aoh 0.0.1.1","title":"aoh 0.0.1.1","text":"Improve test coverage. Convenience functions applying GDAL commands terra package objects now exported. functions include terra_gdal_calc(), terra_gdal_crop(), terra_gdal_project(), terra_gdal_rasterize(). Fix bug terra_gdal_project().","code":""},{"path":"https://prioritizr.github.io/aoh/news/index.html","id":"aoh-0010","dir":"Changelog","previous_headings":"","what":"aoh 0.0.1.0","title":"aoh 0.0.1.0","text":"Initial developmental release.","code":""},{"path":"https://prioritizr.github.io/aoh/news/index.html","id":"aoh-00099999","dir":"Changelog","previous_headings":"","what":"aoh 0.0.0.99999","title":"aoh 0.0.0.99999","text":"Initial work developing package.","code":""}] diff --git a/inst/doc/aoh.Rmd b/inst/doc/aoh.Rmd index e1e5090..051400e 100644 --- a/inst/doc/aoh.Rmd +++ b/inst/doc/aoh.Rmd @@ -237,7 +237,7 @@ Here we provide answers to some of the frequently asked questions encountered wh * **Can I use habitat classification data from other data sources?** - Yes, you can use habitat classification data from a variety of sources. For example, the habitat classification data could be derived from [Copernicus Corine Land Cover](https://land.copernicus.eu/en/products/corine-land-cover), and [MODIS Land Cover data (MCD12Q1)](https://lpdaac.usgs.gov/products/mcd12q1v006/)). To use such data, you will also need to develop a crosswalk table to specify which land cover (or habitat) classes correspond to which habitat classes as defined by the [IUCN Red List Habitat Classification Scheme](https://www.iucnredlist.org/resources/habitat-classification-scheme) [e.g., see @r2; @r9]. After preparing the habitat classification data and the crosswalk table, they can be used to create Area of Habitat data (via `create_spp_aoh_data()`). For more information, see the [Customization vignette](customization.html). + Yes, you can use habitat classification data from a variety of sources. For example, the habitat classification data could be derived from [Copernicus Corine Land Cover](https://land.copernicus.eu/en/products/corine-land-cover), and [MODIS Land Cover data (MCD12Q1)](https://lpdaac.usgs.gov/products/mcd12q1v061/)). To use such data, you will also need to develop a crosswalk table to specify which land cover (or habitat) classes correspond to which habitat classes as defined by the [IUCN Red List Habitat Classification Scheme](https://www.iucnredlist.org/resources/habitat-classification-scheme) [e.g., see @r2; @r9]. After preparing the habitat classification data and the crosswalk table, they can be used to create Area of Habitat data (via `create_spp_aoh_data()`). For more information, see the [Customization vignette](customization.html). * **The output Area of Habitat data have different spatial extents, how can I combine them together?** diff --git a/inst/doc/aoh.html b/inst/doc/aoh.html index 0fb12be..e5b2e6a 100644 --- a/inst/doc/aoh.html +++ b/inst/doc/aoh.html @@ -11,7 +11,7 @@ - + Getting started @@ -169,7 +169,7 @@

    Getting started

    -

    2024-08-05

    +

    2024-08-20

    @@ -282,10 +282,10 @@

    Tutorial

    ## # A tibble: 4 × 5 ## id_no binomial seasonal path geometry ## <dbl> <chr> <int> <chr> <POLYGON [m]> -## 1 979 Alytes dickhilleni 1 /tmp/RtmpUfG7A… ((-105506.8 4465112, -10… -## 2 59448 Calotriton asper 1 /tmp/RtmpUfG7A… ((-238681 5029057, -2377… -## 3 4657 Chioglossa lusitanica 1 /tmp/RtmpUfG7A… ((-859201.6 4559278, -85… -## 4 58622 Rana iberica 1 /tmp/RtmpUfG7A… ((-849801.9 4614149, -84… +## 1 979 Alytes dickhilleni 1 /tmp/Rtmp4CEr8… ((-105506.8 4465112, -10… +## 2 59448 Calotriton asper 1 /tmp/Rtmp4CEr8… ((-238681 5029057, -2377… +## 3 4657 Chioglossa lusitanica 1 /tmp/Rtmp4CEr8… ((-859201.6 4559278, -85… +## 4 58622 Rana iberica 1 /tmp/Rtmp4CEr8… ((-849801.9 4614149, -84…

    After generating the Area of Habitat data, we can import them.

    # import the Area of Habitat data
     ## since the data for each species have a different spatial extent
    @@ -339,24 +339,21 @@ 

    Tutorial

    ## max value : 1

    We can see that the Area of Habitat data for each species are stored in separate spatial (raster) datasets with different extents. Although this is useful because it drastically reduces the total size of the data for each species, it can make it difficult to work with data for multiple species. To address this, we can use the terra_combine() function to automatically align and combine the spatial data for all species’ distributions into a single spatial dataset.

    # combine raster data
    -spp_aoh_rasters <- terra_combine(spp_aoh_rasters)
    -
    ## |---------|---------|---------|---------|==========                                          |---------|---------|---------|---------|==========                                          |---------|---------|---------|---------|==========                                          |---------|---------|---------|---------|=====================                                          
    -
    # assign identifiers to layer names
    -names(spp_aoh_rasters) <- paste0(
    -  "AOH_", spp_aoh_data$id_no, "_", spp_aoh_data$seasonal
    -)
    -
    -# preview raster data
    -print(spp_aoh_rasters)
    +spp_aoh_rasters <- terra_combine(spp_aoh_rasters) + +# assign identifiers to layer names +names(spp_aoh_rasters) <- paste0( + "AOH_", spp_aoh_data$id_no, "_", spp_aoh_data$seasonal +) + +# preview raster data +print(spp_aoh_rasters)
    ## class       : SpatRaster 
     ## dimensions  : 7024, 12334, 4  (nrow, ncol, nlyr)
     ## resolution  : 100, 100  (x, y)
     ## extent      : -914731, 318669, 4364377, 5066777  (xmin, xmax, ymin, ymax)
     ## coord. ref. : World_Behrmann 
    -## sources     : spat_d46e84c0f76ec_870120.tif  
    -##               spat_d46e81fcac4e9_870120.tif  
    -##               spat_d46e8f65840_870120.tif  
    -##               spat_d46e81afc02b7_870120.tif  
    +## source(s)   : memory
     ## varnames    : 979_1 
     ##               59448_1 
     ##               4657_1 
    @@ -365,27 +362,27 @@ 

    Tutorial

    ## min values : 0, 0, 0, 0 ## max values : 1, 1, 1, 1

    Finally, let’s create some maps to compare the range data with the Area of habitat data. Although we could create these maps manually (e.g., using the ggplot2 R package), we will use a plotting function distributed with the aoh R package for convenience.

    -
    # create maps
    -## N.B. you might need to install the ggmap package to create the maps
    -map <-
    -  plot_spp_aoh_data(
    -    spp_aoh_data,
    -    zoom = 6,
    -    maptype = "stamen_toner_background"
    -  ) +
    -  scale_fill_viridis_d() +
    -  scale_color_manual(values = c("range" = "red")) +
    -  scale_size_manual(values = c("range" = 0.5)) +
    -  theme(
    -    axis.title = element_blank(),
    -    axis.text = element_text(size = 6),
    -    strip.text = element_text(color = "white"),
    -    strip.background = element_rect(fill = "black", color = "black")
    -  )
    -
    -# display maps
    -print(map)
    -

    +
    # create maps
    +## N.B. you might need to install the ggmap package to create the maps
    +map <-
    +  plot_spp_aoh_data(
    +    spp_aoh_data,
    +    zoom = 6,
    +    maptype = "stamen_toner_background"
    +  ) +
    +  scale_fill_viridis_d() +
    +  scale_color_manual(values = c("range" = "red")) +
    +  scale_size_manual(values = c("range" = 0.5)) +
    +  theme(
    +    axis.title = element_blank(),
    +    axis.text = element_text(size = 6),
    +    strip.text = element_text(color = "white"),
    +    strip.background = element_rect(fill = "black", color = "black")
    +  )
    +
    +# display maps
    +print(map)
    +

    Frequently asked questions

    @@ -398,8 +395,8 @@

    Frequently asked questions

    Please open the .Renviron file on your computer (e.g., using usethis::edit_r_environ()). Next, please add the following text to the file (replacing the string with the token) and save the file:

    IUCN_REDLIST_KEY="your_actual_token_not_this_string"

    Please restart your R session. You should now be able to access the IUCN Red List API. To verify this, please try running the following R code and – assuming everything works correctly – you should see the current version of the IUCN Red List:

    -
    # verify access to IUCN Red List API
    -rredlist::rl_version()
    +
    # verify access to IUCN Red List API
    +rredlist::rl_version()

    If these instructions did not work, please consult the documentation for the rredlist R package for further details.

  • Where can I find species range data for generating Area of Habitat data?

    Species range data can be obtained from the IUCN Red List (see Spatial Data Download resources). They can also be obtained from other data sources (see the question below for details).

  • @@ -416,7 +413,7 @@

    Frequently asked questions

  • Can I use elevation data from other data sources?

    Yes, you can use elevation data from a variety of sources. For example, elevation data could be derived from NASA’s Shuttle Radar Topography Mission (SRTM). After preparing the elevation data, they can be used to create Area of Habitat data (via create_spp_aoh_data()). For more information, see the Customization vignette.

  • Can I use habitat classification data from other data sources?

    -

    Yes, you can use habitat classification data from a variety of sources. For example, the habitat classification data could be derived from Copernicus Corine Land Cover, and MODIS Land Cover data (MCD12Q1)). To use such data, you will also need to develop a crosswalk table to specify which land cover (or habitat) classes correspond to which habitat classes as defined by the IUCN Red List Habitat Classification Scheme (e.g., see Tracewski et al. 2016; Lumbierres et al. 2021). After preparing the habitat classification data and the crosswalk table, they can be used to create Area of Habitat data (via create_spp_aoh_data()). For more information, see the Customization vignette.

  • +

    Yes, you can use habitat classification data from a variety of sources. For example, the habitat classification data could be derived from Copernicus Corine Land Cover, and MODIS Land Cover data (MCD12Q1)). To use such data, you will also need to develop a crosswalk table to specify which land cover (or habitat) classes correspond to which habitat classes as defined by the IUCN Red List Habitat Classification Scheme (e.g., see Tracewski et al. 2016; Lumbierres et al. 2021). After preparing the habitat classification data and the crosswalk table, they can be used to create Area of Habitat data (via create_spp_aoh_data()). For more information, see the Customization vignette.

  • The output Area of Habitat data have different spatial extents, how can I combine them together?

    The terra_combine() function can be used to align and combine a list of raster terra::rast() objects into a single object. Note that this procedure is only recommended when all species occur in the same geographic region. Please see the tutorial above for an example of using this function to combine Area of Habitat data for multiple species into a single object.

  • diff --git a/inst/doc/customization.html b/inst/doc/customization.html index bcf0483..968d560 100644 --- a/inst/doc/customization.html +++ b/inst/doc/customization.html @@ -11,7 +11,7 @@ - + Customization @@ -169,7 +169,7 @@

    Customization

    -

    2024-08-05

    +

    2024-08-20

    @@ -674,21 +674,21 @@

    Tutorial

    ## 15 3.4|5|14.5 3.4|5|14.5 182 ## elevation_upper xmin xmax ymin ymax path ## * <dbl> <dbl> <dbl> <dbl> <dbl> <chr> -## 1 942 -896631 -648631 4946077 5067077 /tmp/RtmpUfG7A1/670_2.tif -## 2 942 -417631 320369 4742077 5033077 /tmp/RtmpUfG7A1/670_3.tif -## 3 942 -527631 -312631 4664077 4840077 /tmp/RtmpUfG7A1/670_4.tif -## 4 907 -916631 39369 4328077 5070077 /tmp/RtmpUfG7A1/2072_1.tif -## 5 1020 -868631 320369 4304077 5070077 /tmp/RtmpUfG7A1/2374_1.tif -## 6 598 -794631 -305631 4334077 4678077 /tmp/RtmpUfG7A1/3667_1.tif -## 7 949 -863631 -8631 4400077 5062077 /tmp/RtmpUfG7A1/4421_1.tif -## 8 951 -916631 203369 4304077 5070077 /tmp/RtmpUfG7A1/4650_1.tif -## 9 974 -621631 -354631 4304077 4456077 /tmp/RtmpUfG7A1/5808_1.tif -## 10 974 -375631 -201631 4373077 4519077 /tmp/RtmpUfG7A1/5808_2.tif -## 11 974 -771631 -651631 4781077 4861077 /tmp/RtmpUfG7A1/5808_3.tif -## 12 974 -868631 275369 4406077 5058077 /tmp/RtmpUfG7A1/5808_4.tif -## 13 1069 -896631 -74631 4634077 5070077 /tmp/RtmpUfG7A1/6701_1.tif -## 14 991 -868631 291369 4304077 5044077 /tmp/RtmpUfG7A1/8110_1.tif -## 15 1183 -402631 183369 4624077 5000077 /tmp/RtmpUfG7A1/8644_1.tif +## 1 942 -896631 -648631 4946077 5067077 /tmp/Rtmp4CEr8l/670_2.tif +## 2 942 -417631 320369 4742077 5033077 /tmp/Rtmp4CEr8l/670_3.tif +## 3 942 -527631 -312631 4664077 4840077 /tmp/Rtmp4CEr8l/670_4.tif +## 4 907 -916631 39369 4328077 5070077 /tmp/Rtmp4CEr8l/2072_1.tif +## 5 1020 -868631 320369 4304077 5070077 /tmp/Rtmp4CEr8l/2374_1.tif +## 6 598 -794631 -305631 4334077 4678077 /tmp/Rtmp4CEr8l/3667_1.tif +## 7 949 -863631 -8631 4400077 5062077 /tmp/Rtmp4CEr8l/4421_1.tif +## 8 951 -916631 203369 4304077 5070077 /tmp/Rtmp4CEr8l/4650_1.tif +## 9 974 -621631 -354631 4304077 4456077 /tmp/Rtmp4CEr8l/5808_1.tif +## 10 974 -375631 -201631 4373077 4519077 /tmp/Rtmp4CEr8l/5808_2.tif +## 11 974 -771631 -651631 4781077 4861077 /tmp/Rtmp4CEr8l/5808_3.tif +## 12 974 -868631 275369 4406077 5058077 /tmp/Rtmp4CEr8l/5808_4.tif +## 13 1069 -896631 -74631 4634077 5070077 /tmp/Rtmp4CEr8l/6701_1.tif +## 14 991 -868631 291369 4304077 5044077 /tmp/Rtmp4CEr8l/8110_1.tif +## 15 1183 -402631 183369 4624077 5000077 /tmp/Rtmp4CEr8l/8644_1.tif ## geometry ## * <MULTIPOLYGON [m]> ## 1 (((-744167.8 5065733, -744758.3 5065030, -745429.8 5064437, -745619 5064063,… @@ -728,7 +728,7 @@

    Tutorial

    # display maps print(map)
    -

    +

    Conclusion