loadByProduct: Get files from NEON API, stack tables, and load into the...

View source: R/loadByProduct.R

loadByProductR Documentation

Get files from NEON API, stack tables, and load into the current environment


Pull files from the NEON API, by data product, merge data for each table, and read into the current R environment


  site = "all",
  startdate = NA,
  enddate = NA,
  package = "basic",
  release = "current",
  timeIndex = "all",
  tabl = "all",
  check.size = TRUE,
  include.provisional = FALSE,
  nCores = 1,
  forceParallel = FALSE,
  token = NA_character_,
  useFasttime = FALSE,
  avg = NA



The identifier of the NEON data product to pull, in the form DPL.PRNUM.REV, e.g. DP1.10023.001


Either the string 'all', meaning all available sites, or a character vector of 4-letter NEON site codes, e.g. c('ONAQ','RMNP'). Defaults to all.


Either NA, meaning all available dates, or a character vector in the form YYYY-MM, e.g. 2017-01. Defaults to NA.


Either NA, meaning all available dates, or a character vector in the form YYYY-MM, e.g. 2017-01. Defaults to NA.


Either 'basic' or 'expanded', indicating which data package to download. Defaults to basic.


The data release to be downloaded; either 'current' or the name of a release, e.g. 'RELEASE-2021'. 'current' returns the most recent release, as well as provisional data if include.provisional is set to TRUE. To download only provisional data, use release='PROVISIONAL'. Defaults to 'current'.


Either the string 'all', or the time index of data to download, in minutes. Only applicable to sensor (IS) data. Defaults to 'all'.


Either the string 'all', or the name of a single data table to download. Defaults to 'all'.


T or F, should the user approve the total file size before downloading? Defaults to T. When working in batch mode, or other non-interactive workflow, use check.size=F.


T or F, should provisional data be included in downloaded files? Defaults to F. See https://www.neonscience.org/data-samples/data-management/data-revisions-releases for details on the difference between provisional and released data.


The number of cores to parallelize the stacking procedure. By default it is set to a single core.


If the data volume to be processed does not meet minimum requirements to run in parallel, this overrides. Set to FALSE as default.


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


Should the fasttime package be used to read date-time fields? Defaults to false.


Deprecated; use timeIndex


All available data meeting the query criteria will be downloaded. Most data products are collected at only a subset of sites, and dates of collection vary. Consult the NEON data portal for sampling details. Dates are specified only to the month because NEON data are provided in monthly packages. Any month included in the search criteria will be included in the download. Start and end date are inclusive.


A named list of all the data tables in the data product downloaded, plus a validation file and a variables file, as available.


Claire Lunch clunch@battelleecology.org


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


## Not run: 
# To download plant foliar properties data from all sites, expanded data package:
cfc <- loadByProduct(dpID="DP1.10026.001", site="all", package="expanded")

## End(Not run)

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