-
Notifications
You must be signed in to change notification settings - Fork 37
Description
Is your feature request related to a problem? Please describe.
I tried to pull data from a single site and the function gave me the output 'Error in zipsByProduct(dpID = dpID, site = site, startdate = startdate, : There are no data at the selected site(s).' I know there are data so this was confusing...in the end, it was my fault I had spelled OAES wrong (OEAS). But it would be great if the function warned that you entered a non-valid site, instead of saying there are no data.
Describe the solution you'd like
An error that says 'you have entered an incorrect NEON site code, please check the spelling and try again' or similar.
Describe alternatives you've considered
None, the user can find this issue themself (as long as they know to keep trying), it simply takes longer to figure out the source of the problem.
Additional context
Try this code if you'd like to reproduce:
THIS WILL NOT WORK, WITH AN ERROR 'NO DATA'
div1 <- loadByProduct(dpID='DP1.10058.001',
tabl = "div_10m2Data100m2Data",
check.size= F,
startdate = "2024-01",
enddate = "2024-12",
site = "OEAS",
include.provisional = T,
token = Sys.getenv('NEON_PAT')) # change to your token, or delete
THIS WORKS, PULLS DATA
div1 <- loadByProduct(dpID='DP1.10058.001',
tabl = "div_10m2Data100m2Data",
check.size= F,
startdate = "2024-01",
enddate = "2024-12",
site = "OAES",
include.provisional = T,
token = Sys.getenv('NEON_PAT')) # change to your token, or delete