View source: R/eurobis_occurrences.R
eurobis_occurrences | R Documentation |
Get EurOBIS data by using the EMODnet-Biology webservices
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(...)
type |
Type of data, one of c('basic', 'full', 'full_and_parameters'). You can use one of the wrappers: - 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: - See details for more information. |
url |
A WFS request copied from the LifeWatch/EMODnet-Biology Download Toolbox. Use |
mrgid |
Marine Regions Gazetteer unique identifier. See list of available regions with |
geometry |
a WKT geometry string or sf object with the region of interest. You can draw a polygon interactively
with |
dasid |
IMIS dataset unique identifier. See list of available datasets with |
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 |
cites |
CITES Annex. See |
habitats_directive |
Habitats Directive Annex. See |
iucn_red_list |
IUCN Red List Category. See |
msdf_indicators |
Marine Strategy Directive Framework indicators. See |
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 |
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.
a tibble or sf object with eurobis data
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.