byFileAOP: Serially download all AOP files for a given site, year, and...

View source: R/byFileAOP.R

byFileAOPR Documentation

Serially download all AOP files for a given site, year, and product

Description

Query the API for AOP data by site, year, and product, and download all files found, preserving original folder structure. Downloads serially to avoid overload; may take a very long time.

Usage

byFileAOP(
  dpID,
  site,
  year,
  check.size = TRUE,
  savepath = NA,
  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

The four-letter code of a single NEON site, e.g. 'CLBJ'.

year

The four-digit year to search for data. Defaults to 2017.

check.size

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.

savepath

The file path to download to. Defaults to NA, in which case the working directory is used.

token

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

Value

A folder in the working directory, containing all files meeting query criteria.

Author(s)

Claire Lunch clunch@battelleecology.org Christine Laney claney@battelleecology.org

References

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

Examples

## Not run: 
# To download 2017 vegetation index data from San Joaquin Experimental Range:
byFileAOP(dpID="DP3.30026.001", site="SJER", year="2017")

## End(Not run)

neonUtilities documentation built on April 15, 2022, 1:06 a.m.