get_datasets {neotoma2}R Documentation

get_datasets

Description

The get_datasets() function is a wrapper for the Neotoma datasets API endpoint. The function takes parameters defined by the user and returns dataset information supplied by the Neotoma Paleoecological Database. The user may define all or none of the possible fields.

Usage

get_datasets(x = NA, ...)

Arguments

x

A single datasetid, or a vector of unique dataset ids.

...

accepted arguments, see details for more information.

Details

A dataset is an element nested within neotoma2 site objects. The get_datasets() call returns a list of individual site objects with collunits (collection units) that contain valid, matching dataset elements. So, get_sites() returns only site metadata. get_datasets() returns site metadata, plus metadata about the individual datasets present at that site. The get_datasets() function searches for each site within Neotoma that matches the query parameters, and returns them as a sites object, a list of site objects, plus returns all the additional metadata for the datasets at that site. The get_datasets() command wraps the Neotoma API (api.neotomadb.org) call for datasets. The call itself uses a SQL query which accepts any one of the following parameters:

Value

The function returns either a single item of class "try-error" describing the reason for failure (either misdefined parameters or an error from the Neotoma API), or list of site objects, each containing one or more collunit objects, with fully populated datasets elements.

Author(s)

Socorro Dominguez s.dominguez@ht-data.com

Examples


# To find all datasets with a min altitude of 12 and a max altitude of 25:
sites_12to25 <- get_datasets(altmin=12, altmax=25)
# To find all datasets in Brazil
brazil <- '{"type": "Polygon",
"coordinates": [[
 [-73.125, -9.102096738726443],
 [-56.953125,-33.137551192346145],
 [-36.5625,-7.710991655433217],
 [-68.203125,13.923403897723347],
 [-73.125,-9.102096738726443]]]}'
brazil_datasets <- get_datasets(loc = brazil[1], limit=2)
# To obtain the dataset metadata:
datasets(brazil_datasets)
# There is insufficient metadata at this point to obtain information
# about taxa present at the site. We must use get_downloads() to
# obtain the full set of sample information:
# This fails: taxa(brazil_datasets)


[Package neotoma2 version 1.0.3 Index]