getDatatable: Get NEON data table

View source: R/getDatatable.R

getDatatableR Documentation

Get NEON data table

Description

This is a function to retrieve a data table from the NEON data portal for sites and dates provided by the enduser. NOTE that this function only works for NEON Observation System (OS) data products, and only for select tables

Usage

getDatatable(
  dpid = NA,
  data_table_name = NA,
  sample_location_list = NA,
  sample_location_type = "siteID",
  sample_date_min = "2012-01-01",
  sample_date_max = Sys.Date(),
  sample_date_format = "%Y-%m-%d",
  data_package_type = "basic",
  url_prefix_data = "https://data.neonscience.org/api/v0/data/",
  url_prefix_products = "https://data.neonscience.org/api/v0/products/",
  token = NA_character_
)

Arguments

dpid

character sting for NEON data product ID

data_table_name

character sting for name of the data table to download, e.g., 'sls_soilCoreCollection'

sample_location_list

list of sites, domains, etc. If NA, retrieve all data for the given data table / dpid combination.

sample_location_type

character sting for location type, such as 'siteID'. Must be one of the NEON controlled terms. If you're unsure, use 'siteID'

sample_date_min

start date for query. Default is 1-Jan-2012, and this should capture the earliest NEON data record.

sample_date_max

end date for query. Default is current date.

sample_date_format

date format. Default/expected format is yyyy-mm-dd

data_package_type

package type, either 'basic' or 'expanded'. If unsure, use 'expanded'

url_prefix_data

data endpoint for NEON API.

url_prefix_products

products endpoint for NEON API.

token

User specific API token (generated within neon.datascience user accounts)

Value

data frame with selected NEON data

Author(s)

Eric R. Sokol esokol@battelleecology.org

References

License: GNU AFFERO GENERAL PUBLIC LICENSE Version 3, 19 November 2007


neonUtilities documentation built on May 29, 2024, 9:24 a.m.