knitr::opts_chunk$set(echo = TRUE,
                      message = FALSE,
                      warning = FALSE)

Site-Specific Water-Use Data System

Document, document, document!

Sample workflow

Load the data:

library(wateRuseSWUDS)

path_swuds <- system.file("extdata",package = "wateRuseSWUDS")

# Read in the water quantity table
dq <- read_swuds_quant(file.path(path_swuds,
                                 "OH_CTF_SW_monthly_permit_sample_data.xlsx"))

# Read in the population served table
dp <- read_swuds_pop(file.path(path_swuds,
                               "OHpopserved_output.xlsx"))

# merge the tables
df <- merge_dq_dp(dq, dp)

#melt the table
df_melt <- melt_water_quant_pop(df)
library(wateRuseSWUDS)
df_melt <- swuds_sample

Map the data

Let's look at "AS" sites in August:

s_wuds <- df_melt[which(df_melt$FROM_SITE_TP_CD == "AS" &
                          df_melt$Month_num == 8), ]

map_it <- map_sites(df_melt, 
                    data_element = "Volume_mgd",
                    year = 2010,
                    state = "Ohio")

map_it


USGS-R/wateRuse_swuds documentation built on Dec. 8, 2019, 9:47 a.m.