View source: R/get_downloads.R
get_downloads | R Documentation |
Information for Fossil Datasets
get_downloads(x = NA, verbose = TRUE, ...)
x |
Use a single number to extract site information |
verbose |
Status bar of items being downloaded |
... |
accepted arguments: sites, datasets |
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, use all_data=TRUE
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:
|
site ID number |
|
site's name |
|
sf object that describes site's location |
|
|
|
limited information on collunits |
Each "collection unit" embedded in the "sites" object contains 6 parameters that can be accessed as well:
|
collection unit ID number |
|
collection unit's handle |
|
collection unit's name |
|
date in collection unit |
|
substrate |
|
sf object that describes site's location |
|
detailed information regarding dataset |
Each "dataset" nested in the "collection unit" contains the following detail of information:
|
dataset ID number |
|
site's name |
|
type of data found |
|
sf object that describes site's location |
|
notes on the dataset |
|
taxa table |
|
P.I. info |
|
analyst info |
|
dataset metadata |
Socorro Dominguez sedv8808@gmail.com
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.