Skip to content

Instantly share code, notes, and snippets.

@sdtaylor
Created July 8, 2020 16:07
Show Gist options
  • Select an option

  • Save sdtaylor/9f51c0b2d4cd0b4bfbae2cf6cdcf46a0 to your computer and use it in GitHub Desktop.

Select an option

Save sdtaylor/9f51c0b2d4cd0b4bfbae2cf6cdcf46a0 to your computer and use it in GitHub Desktop.
neon data data download eample
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