barchart_sums: barchart_sums

Description Usage Arguments Examples

Description

barchart_sums

Usage

1
2
3
4
barchart_sums(w.use, data.elements, area.column, plot.stack = TRUE,
  years = NA, areas = NA, y.scale = NA, c.palette = c("#999999",
  "#E69F00", "#56B4E9", "#009E73", "#F0E442", "#0072B2", "#D55E00",
  "#CC79A7"))

Arguments

w.use

is a subset of the datafile wUseSample that includes all areas in all data elements for state

data.elements

character name of data element within available categories by year for state

area.column

character that defines which column to use to specify area

plot.stack

is a logical function to show graph as optionally stacked or clustered bar graph

years

vector of integers specifying range of years to graph. Defaults to NA which shows all years in dataset.

areas

is a geographical area as defined in your datafile such as county, HUC, or aquifer

y.scale

allows R to set the y-axis scale given available data range. Defaults to NA which lets R set the scale based on dataset values.

c.palette

color palette to use for fill

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
w.use <- wUseSample
areas <- c("New Castle County", "Kent County")
area.column = "COUNTYNAME"
data.elements <- c("PS.WTotl","CO.WTotl","DO.WTotl","IN.WTotl","PF.WTotl")
barchart_sums(w.use, data.elements, area.column = area.column,areas = areas)
barchart_sums(w.use, data.elements, plot.stack = FALSE,
       area.column = area.column,areas = areas)
barchart_sums(w.use, data.elements, area.column)
barchart_sums(w.use, data.elements, area.column, y.scale = c(0,500))
barchart_sums(w.use, data.elements, area.column, 
       y.scale = c(0,100), years = c(1990,2005))

USGS-R/wateRuse documentation built on May 9, 2019, 9:35 p.m.