eurobis_occurrences: Get EurOBIS data by using the EMODnet-Biology webservices

View source: R/eurobis_occurrences.R

eurobis_occurrencesR Documentation

Get EurOBIS data by using the EMODnet-Biology webservices

Description

Get EurOBIS data by using the EMODnet-Biology webservices

Usage

eurobis_occurrences(
  type,
  url = NULL,
  mrgid = NULL,
  geometry = NULL,
  dasid = NULL,
  start_date = NULL,
  end_date = NULL,
  aphiaid = NULL,
  scientific_name = NULL,
  functional_groups = NULL,
  cites = NULL,
  habitats_directive = NULL,
  iucn_red_list = NULL,
  msdf_indicators = NULL,
  paging = FALSE,
  paging_length = 50000,
  verbose = TRUE,
  ...
)

eurobis_occurrences_basic(...)

eurobis_occurrences_full(...)

eurobis_occurrences_full_and_parameters(...)

eurobis_occurrences_count(...)

Arguments

type

Type of data, one of c('basic', 'full', 'full_and_parameters'). You can use one of the wrappers:

- eurobis_occurrences_basic - eurobis_occurrences_full - eurobis_occurrences_full_and_parameters

More info at: https://www.emodnet-biology.eu/emodnet-data-format

You can also see the number of occurrences that a query will return before performing the request with:

- eurobis_occurrences_count

See details for more information.

url

A WFS request copied from the LifeWatch/EMODnet-Biology Download Toolbox. Use eurobis_download_toolbox

mrgid

Marine Regions Gazetteer unique identifier. See list of available regions with eurobis_list_regions and visualize with eurobis_map_regions

geometry

a WKT geometry string or sf object with the region of interest. You can draw a polygon interactively with eurobis_map_draw

dasid

IMIS dataset unique identifier. See list of available datasets with eurobis_list_datasets

start_date

Start date of occurrences. Format YYYY-MM-DD.

end_date

End date of occurrences. Format YYYY-MM-DD.

aphiaid

WoRMS taxon unique identifier. See https://www.marinespecies.org/ and https://docs.ropensci.org/worrms/

scientific_name

Taxon name. It is matched with WoRMS on the fly. Ignored if aphiaid is provided.

functional_groups

Functional groups available in WoRMS: See eurobis::species_traits.

cites

CITES Annex. See eurobis::species_traits.

habitats_directive

Habitats Directive Annex. See eurobis::species_traits.

iucn_red_list

IUCN Red List Category. See eurobis::species_traits.

msdf_indicators

Marine Strategy Directive Framework indicators. See eurobis::species_traits.

paging

If TRUE, the data will be requested on chunks. Use for large requests. See details.

paging_length

Size of chunks in number of rows. Default 50K. See details.

verbose

set to FALSE to hide the info messages

...

Any parameters to pass to ows4R get feature request (e.g. cql_filter or parallel)

Details

If you want to perform a very large request, it is likely that this will take a long time to complete or even not work at all. In this case, the best approach is to first check the number of occurrences that will be returned by the query with eurobis_occurrences_count.

If this number is high (e.g. more than 500K), you can set paging = TRUE to download the data in smaller chunks. This will still take time, but it is less likely to break the service by using several small request than one large one.

You can set the size of the data chunk with paging_length. The largest the chunk, the faster you download the data, but also more likely to break the service.

Value

a tibble or sf object with eurobis data

Examples

## Not run: 
# Get dataset with ID 8045
# See also ?eurobis_list_datasets
test <- eurobis_occurrences_basic(dasid = 8045)

# Get full dataset with ID 8045
test <- eurobis_occurrences_full(dasid = 8045)

# Get full dataset with ID 8045 including extra measurements or facts 
test <- eurobis_occurrences_full_and_paremeters(dasid = 8045)

# Get occurrences from Zostera marina in the ecoregion Alboran Sea (MRGID 21897)
# See also ?eurobis_list_regions
test <- eurobis_occurrences_full(mrgid = 21897, scientific_name = "Zostera marina")

# Get zooplankton occurrences from the region of your choice
# See ?eurobis_map_mr and ?eurobis::species_traits
my_area <- eurobis_map_draw()
test <- eurobis_occurrences_basic(geometry = my_area, functional_groups = "zooplankton")

# Get occurrences from the Continuous Plankton Recorder (dataset id 216) in January 2016
test <- eurobis_occurrences_basic(dasid = 216, start_date = "2016-01-01", end_date = "2016-01-31")

## End(Not run)

EMODnet/REMODBio documentation built on Dec. 3, 2024, 6:32 a.m.