Description Usage Arguments Examples
Returns map of data element mapped by sites that have lat-lons Only works with one data element as currently written Assumes the s_wuds dataframe being used as input has already been subsetted using filter functions (by site type, state, or county, years, etc.) that is, no subsetting is done inside this function Dataframe must not have more than one row per site ID Point sizes are scaled to value
1 2 |
s_wuds |
dataframe, the swuds water use data |
data_element |
chr, data element to be plotted |
year |
int, the year of interest to be mapped (defines historical basis for counties) |
state |
character name of state |
norm_element |
chr, element used to normalize data_element |
unit_type |
chr, type of unit to be mapped; acceptable options are "county", "huc", or "aquifer" |
site_from_to |
chr, either 'from' or 'to' to designate the site lats-lons to use; the 'from' site or the 'to' site |
1 2 3 4 5 6 7 8 9 10 11 | s_wuds <- swuds_sample #example data from OHIO
# subset for this example
s_wuds <- s_wuds[which(s_wuds$FROM_SITE_TP_CD == "AS" &
s_wuds$YEAR == 2010 &s_wuds$Month_num == 8),]
data_element <- "Volume_mgd"
state <- "Ohio"
year <- 2010
unit_type <- "county"
norm_element <- NA
sites.map <- map_sites(s_wuds, data_element, year, state)
sites.map
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.