NEONScience / NEON-utilities

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

stackByTable fails to accumulate data for some site-month-products #87

Closed vlahm closed 4 years ago

vlahm commented 4 years ago

Function stackByTable (and loadByProduct, which calls it)

Describe the bug Only the sensor positions dataset is properly extracted from the zip files. This error prevents other datasets from properly writing:

Error in data.table::fwrite(stackedDf, paste0(folder, "/stackedFiles/", : is.list(x) is not TRUE

To Reproduce

neonUtilities::loadByProduct(dpID='DP1.20288.001', site='ARIK',
    startdate='2017-03', enddate='2017-05', package='expanded',
    check.size=FALSE)

(or run zipsByProduct followed by stackByTable)

Expected behavior Downloaded zip files should be extracted and compiled, and resulting datasets should be written to savepath.

System (please complete the following information):

Additional context Other sites run successfully:

neonUtilities::loadByProduct('DP1.20288.001', 'HOPB', '2018-01', '2018-03',
    package='expanded', check.size=FALSE)
cklunch commented 4 years ago

@vlahm Thanks for letting us know about this! I was able to replicate the problem, it's because of an out-of-date file naming on the product-site-months in question. I had thought we updated everything, but apparently there are a few with the old format still hanging around.

I should be able to fix this on GitHub today, and we're planning to submit a new version of neonUtilities to CRAN in the next couple of weeks. I'll keep you posted.

cklunch commented 4 years ago

@vlahm This is now fixed in the version of neonUtilities on GitHub. I'll close this issue once the new version is on CRAN. Thanks again for the alert!

cklunch commented 4 years ago

@vlahm This fix is now live on CRAN. Let us know if you run into any other problems!