admahood / neonPlantEcology

Other
7 stars 1 forks source link

Similar but slightly different issues #10

Closed mrunj closed 9 months ago

mrunj commented 11 months ago

Code here:

packageVersion("neonutilities") [1] ‘2.4.0’ many_sites= npe_site_ids(domain = c("D01","D04","D08","D12","D16")) %>%

  • npe_download_plant_div(sites = .) Finding available files |================================================================================| 100%

Rate limit reached. Pausing for 99 seconds to reset. Provisional data were excluded from available files list. To download provisional data, use input parameter include.provisional=TRUE. Downloading files totaling approximately 101.520487 MB Downloading 122 files |================================================================================| 100%

Unpacking zip files using 1 cores. |++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=02s
Stacking operation across a single core. Stacking table div_10m2Data100m2Data |++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=01s
Stacking table div_1m2Data |++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=01s
Copied the most recent publication of validation file to /stackedFiles Copied the most recent publication of categoricalCodes file to /stackedFiles Copied the most recent publication of variable definition file to /stackedFiles Finished: Stacked 2 data tables and 4 metadata tables! Stacking took 6.581913 secs

di <- npe_diversity_info(many_sites) Error in dplyr::mutate(): ℹ In argument: shannon_native = vegan::diversity(...). Caused by error in vegan::diversity(): ! input data must be non-negative Run rlang::last_trace() to see where the error occurred. Warning message: There were 28 warnings in dplyr::summarise(). The first warning was: ℹ In argument: cover = max(cover, na.rm = T). ℹ In group 9522: plotID = "BART_019", taxonID = "ABIES", nativeStatusCode = "UNK", scientificName = "Abies sp.", family = "Pinaceae", site = "BART", subplotID = "plot", eventID = NA. Caused by warning in max(): ! no non-missing arguments to max; returning -Inf ℹ Run dplyr::last_dplyr_warnings() to see the 27 remaining warnings.

admahood commented 9 months ago

most of this is due to various problems on the neon side with inconsistencies in the eventID column. I created a more robust function for fixing the eventIDs and incorporated that into the main functions