Utilities and scripts for working with NEON data. Currently: an R package with functions to join (stack) the month-by-site files in downloaded NEON data, to convert data to geoCSV format, and to download data from the API.
GNU Affero General Public License v3.0
57
stars
36
forks
source link
Adding the ability to read a list of h5 files into stackEddy #102
The PR provides the option for filepath to be a list of h5 files in the stackEddy function. This is intended to allow the stackEddy function interface with the neonstore package. The neon_index function returns a list of downloaded files that match specified criteria. For example:
neonstore::neon_download(product = "DP4.00200.001", site = "BART",start_date = "2020-05-01")
meta <- neonstore::neon_index(product = "DP4.00200.001", table = NA, site = "BART", start_date = NA, end_date = NA, type = NA, ext = "h5", hash = NULL, dir = neonstore::neon_dir())
returns a list of h5 files (meta$path). The updates in this PR allow meta$path to be directly passed to stackEddy
d <- stackEddy(filepath = meta$path,level="dp04")
Also, I allowed the filepath variable that is calculated internally to be a list of paths rather than requiring it to be a single path. This allows the h5 files to potentially be spread across different directories (only if a list of h5 files is provided).
This is now implemented in a slightly different way in the latest updates to stackEddy(), merged to master just now. Headed to CRAN in the next few days.
The PR provides the option for filepath to be a list of h5 files in the stackEddy function. This is intended to allow the stackEddy function interface with the neonstore package. The neon_index function returns a list of downloaded files that match specified criteria. For example:
neonstore::neon_download(product = "DP4.00200.001", site = "BART",start_date = "2020-05-01")
meta <- neonstore::neon_index(product = "DP4.00200.001", table = NA, site = "BART", start_date = NA, end_date = NA, type = NA, ext = "h5", hash = NULL, dir = neonstore::neon_dir())
returns a list of h5 files (meta$path). The updates in this PR allow meta$path to be directly passed to stackEddyd <- stackEddy(filepath = meta$path,level="dp04")
Also, I allowed the filepath variable that is calculated internally to be a list of paths rather than requiring it to be a single path. This allows the h5 files to potentially be spread across different directories (only if a list of h5 files is provided).