Query the NEON API for URLs of matching data products Repeated requests will be cached

neon_data(
  product,
  start_date = NA,
  end_date = NA,
  site = NA,
  type = NA,
  release = NA,
  quiet = FALSE,
  api = "https://data.neonscience.org/api/v0",
  .token = Sys.getenv("NEON_TOKEN")
)

Arguments

product

A NEON productCode or list of product codes, see examples.

start_date

Download only files as recent as (YYYY-MM-DD). Leave as NA to download up to the most recent available data.

end_date

Download only files up to end_date (YYYY-MM-DD). Leave as NA to download all prior data.

site

4-letter site code(s) to filter on. Leave as NA to search all.

type

Should we prefer the basic or expanded version of this product? Note that not all products have expanded formats.

release

Select only data files associated with a particular release tag, see https://www.neonscience.org/data-samples/data-management/data-revisions-releases, e.g. "RELEASE-2021". Releases are associated with a specific DOI and the promise that files associated with a particular release will not change.

quiet

Should download progress be displayed?

api

the URL to the NEON API, leave as default.

.token

an authentication token from NEON. A token is not required but will allow access to a higher number of requests before rate limiting applies, see https://data.neonscience.org/data-api/rate-limiting/#api-tokens. Note that once files are downloaded once, neonstore provides persistent access to them without further interaction required with the API.

Value

a data.frame containing the name, filesize (in bytes), checksums (columns md5, crc32, or crc32c, though each product will use only one of these), url, and release status.

Examples

if (FALSE) { # interactive()

x <- neon_data("DP1.10003.001") 
x <- neon_data("DP1.10003.001", release="RELEASE-2021") 
}