diff --git a/scripts/process/disch_sites.R b/scripts/process/disch_sites.R index 4fae7ed..d34408c 100644 --- a/scripts/process/disch_sites.R +++ b/scripts/process/disch_sites.R @@ -3,7 +3,7 @@ #'@param viz the vizlab object process.disch_sites <- function(viz){ data.in <- readDepends(viz) - browser() + library(dplyr) sites <- data.in[['disch-data']] %>% group_by(site_no) %>% summarize(huc = stringr::str_sub(unique(huc_cd), 1L, 2L), diff --git a/scripts/process/process_bar_chart.R b/scripts/process/process_bar_chart.R index 47450b8..78edf01 100644 --- a/scripts/process/process_bar_chart.R +++ b/scripts/process/process_bar_chart.R @@ -3,7 +3,9 @@ process.bar_chart <- function(viz){ size <- size_map_svg(data.in[['state-map']]) sites <- data.in$`disch-data` library(dplyr) + browser() bars <- filter(sites, year >= viz[['min-year']], year <= viz[['max-year']]) %>% + select(site_no, year) %>% distinct %>% group_by(year) %>% tally %>% data.frame max.sites <- max(bars$n)