Created
July 8, 2020 16:07
-
-
Save sdtaylor/9f51c0b2d4cd0b4bfbae2cf6cdcf46a0 to your computer and use it in GitHub Desktop.
neon data data download eample
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(tidyverse) | |
| library(neonUtilities) | |
| library(geoNEON) | |
| sites = c('JORN','TALL','BART','BARR', 'HARV','YELL') | |
| for(site_id in sites){ | |
| woody_structure=tryCatch(neonUtilities::loadByProduct('DP1.10098.001', site=site_id, | |
| startdate = '2018-01', enddate = '2018-12', | |
| check.size = F)) | |
| heights = woody_structure$vst_apparentindividual %>% | |
| group_by(individualID, plotID, eventID) %>% | |
| summarise(avg_height = mean(height), | |
| n_stems = n()) %>% | |
| ungroup() | |
| write_csv(heights, paste0('./',site_id,'.csv')) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment