get_downloads {neotoma2} | R Documentation |
get_downloads
Description
Information for Fossil Datasets
Usage
get_downloads(x = NA, verbose = TRUE, ...)
Arguments
x |
Use a single number to extract site information |
verbose |
Status bar of items being downloaded |
... |
accepted arguments: sites, datasets |
Details
The get_downloads()
command wraps the Neotoma API
(api.neotomadb.org) call for downloads
.
The call itself uses a SQL query which accepts any one of the following
parameters:
-
datasetid
The unique dataset ID (integer) in Neotoma. Can be passed as a vector of dataset IDs. -
all_data
The API only downloads the first 25 records of the query. For the complete records, useall_data=TRUE
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 a table of sites, with rows corresponding to the number of
individual sites and datasets returned by the Neotoma API.
Each "site" object contains 6 parameters that can be accessed as well:
siteid |
site ID number |
sitename |
site's name |
location |
sf object that describes site's location |
description |
|
collunits |
limited information on collunits |
Each "collection unit" embedded in the "sites" object contains 6 parameters that can be accessed as well:
collunitid |
collection unit ID number |
handle |
collection unit's handle |
collunitname |
collection unit's name |
colldate |
date in collection unit |
substrate |
substrate |
location |
sf object that describes site's location |
datasets |
detailed information regarding dataset |
Each "dataset" nested in the "collection unit" contains the following detail of information:
datasetid |
dataset ID number |
datasetname |
site's name |
datasettype |
type of data found |
location |
sf object that describes site's location |
notes |
notes on the dataset |
taxa table |
taxa table |
pi list |
P.I. info |
analyst |
analyst info |
metadata |
dataset metadata |
Author(s)
Socorro Dominguez s.dominguez@ht-data.com
Examples
# To find the downloads object of dataset 24:
downloads24 <- get_downloads(24)
# To find all downloads 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])
brazil_downloads <- get_downloads(brazil_datasets)