queryFiles: Get a list of data files from the query endpoint of the NEON...

View source: R/queryFiles.R

queryFilesR Documentation

Get a list of data files from the query endpoint of the NEON API

Description

Uses the query endpoint of the NEON API to find the full list of files for a given data product, release, site(s), and date range.

Usage

queryFiles(
  dpID,
  site = "all",
  startdate = NA,
  enddate = NA,
  package = "basic",
  release = "current",
  timeIndex = "all",
  tabl = "all",
  hor = NA,
  ver = NA,
  metadata = TRUE,
  include.provisional = FALSE,
  simplify.outputs = TRUE,
  token = NA_character_
)

Arguments

dpID

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

site

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.

startdate

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

enddate

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

package

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

release

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'.

timeIndex

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

tabl

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

hor

Horizontal location indices. Only applicable to sensor (IS) data. Only files matching BOTH hor and ver will be listed. Defaults to NA, which lists all locations.

ver

Vertical location indices. Only applicable to sensor (IS) data. Only files matching BOTH hor and ver will be listed. Defaults to NA, which lists all locations.

metadata

T or F, should urls for metadata files (variables, sensor positions, etc) be included. Defaults to T.

include.provisional

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.

simplify.outputs

T or F, if data queried are tabular, should the function return only the table of urls and variables files. Defaults to T; F is intended for internal use.

token

User specific API token (generated within data.neonscience.org user accounts). Optional.

Value

For remote sensing (AOP) and eddy covariance (SAE) products, a table of urls and corresponding release tags. For tabular data (IS and OS), if simplify.outputs is TRUE, a table of urls, urls for corresponding variables files, and corresponding release tags. For IS and OS data when simplify.outputs=FALSE (primarily intended for internal use), a list of five elements: (1) the set of urls matching the query; (2) the most recent variables file for the set of urls; (3) a flag indicating whether there is more than one variables file for the url set; (4) a table of urls, checksums for the files, urls pointing to the variables file matching each url, and release tag; (5) urls pointing to the unique variables files for the set.

Author(s)

Claire Lunch clunch@battelleecology.org

References

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


neonUtilities documentation built on Nov. 19, 2026, 1:07 a.m.