Open jordansread opened 4 years ago
For Gretchen's request on GDD, I did this quick processing (DOWs were her's)
From hyperscales-data-release directory:
hyperscales-data-release
library(tidyverse) dow_xwalk <- readRDS('../lake-temperature-model-prep/2_crosswalk_munge/out/mndow_nhdhr_xwalk.rds') dows <- paste0('mndow_', c('04003000', '04003800', '04007900', '04000700', '11041500', '04004900')) dow_xwalk %>% filter(MNDOW_ID %in% dows) # A tibble: 6 x 2 MNDOW_ID site_id <chr> <chr> 1 mndow_04000700 nhdhr_166868512 2 mndow_04003000 nhdhr_166868528 3 mndow_04003800 nhdhr_120019527 4 mndow_04004900 nhdhr_166868535 5 mndow_04007900 nhdhr_120019522 6 mndow_11041500 nhdhr_166868528 !!! OH NO same as mndow_04003000 predictions_df <- scipiper::scmake('predictions_df') Gretchens_DOW_GDD_lakes <- predictions_df %>% filter(site_id %in% c('nhdhr_166868512','nhdhr_166868528','nhdhr_120019527','nhdhr_166868535','nhdhr_120019522','nhdhr_166868528')) %>% pull(source_filepath) %>% purrr::map(function(file) { feather::read_feather(file) %>% mutate(year = lubridate::year(DateTime), temp = temp_0-5, gdd_raw_temp = ifelse(temp < 0, 0, temp)) %>% group_by(year) %>% summarize(GDD = sum(gdd_raw_temp), site_id = basename(file)) }) %>% purrr::reduce(bind_rows) ggplot(data = Gretchens_DOW_GDD_lakes, aes(x = year, y = GDD, color = site_id)) + geom_line() + theme_bw()
This is because the PB0 driver data were mixed up :(
Ah ha! 💡
What it looks like now (and proof to @aappling-usgs that I am continuing to ggplot 😆 )
For Gretchen's request on GDD, I did this quick processing (DOWs were her's)
From
hyperscales-data-release
directory: