Skip to content

Commit

Permalink
Drop sites w/ entirely NA GWL values during viz period
Browse files Browse the repository at this point in the history
  • Loading branch information
hcorson-dosch-usgs committed Dec 1, 2022
1 parent a6daeda commit c9bd3d7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions 2_process/src/prep_data_for_visualizing.R
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,12 @@ generate_months <- function(file_out, data_in){

# Make sure the data being displayed and used to create labels
# fits within the time range asked for
# Filter out sites w/ all NA GWL levels
subset_to_date_range <- function(file_out, daily_data_fn, start_date, end_date) {
read_csv(daily_data_fn) %>%
filter(Date >= start_date,
Date <= end_date) %>%
group_by(site_no) %>%
filter(!all(is.na(GWL))) %>%
write_csv(file_out)
}

0 comments on commit c9bd3d7

Please sign in to comment.