plot_status: Plot Status Summary

Description Usage Arguments Value Examples

View source: R/plot_status.r

Description

Produces a (stacked) percentage barplot of waterbody status information for a given set of data (MC, OC or RBD)

Usage

1
2
3
plot_status(ea_name = NULL, column = NULL,
  level = "Overall Water Body", startyr = NULL, endyr = NULL,
  type = NULL, scheme = "vir")

Arguments

ea_name

A string representing the description (name) of the features to be extracted. For example to extract data for the whole of the Humber RBD, this would be "Humber"; also see examples. Must be an exact match to the values used in the EA database. Use the search_names function to search for specific values.

column

The column to be searched. Possible options are WBID (waterbody id), OC (Operational Catchment), MC (Management Catchment) and RBD (River Basin District)

level

The level within the WFD quality status classification to be extracted. Defaults to 'Overall Water Body'. See Vignette for possible values.

startyr

The data can be extracted for specific years using the startyr and endyr arguments. If only startyr is specified this extracts for a particular year. If no years are specified all years are returned.

endyr

The data can be extracted for specific years using the startyr and endyr arguments. The endyr should only be specified if startyr is also included, otherwise an error is returned.

type

Type of waterbody to be extracted. For Operational/Management catchment level or RBD level queries, the data can also be subset by waterbody type. Possible values are River, Lake, GroundWaterBody, TransitionalWater or CoastalWater.

scheme

Which colour scheme to use with plots; defaults to a viridis based scheme ("vir" but can also choose to use the colours specified in the WFD document by specifying as "wfd".

Value

A (stacked) barplot of the percentage of waterbodies within the specified area of different status values represented as different colours depending on the scheme specified.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# plot the Overall Water Body status for Rivers in the Avon Warwickshire
# Management Catchment in 2011 using viridis-based colours
plot_status("Avon Warwickshire", "MC", startyr = 2011, type = "River")

# Chemical status classification for same MC, but all years and types
plot_status("Avon Warwickshire", "MC", level = "Chemical")

# plot the Overall Water Body status of all waterbodies
# in the Humber RBD between 2012 and 2014 using WFD colour scheme
plot_status("Humber", "RBD", startyr = 2012, endyr = 2014, scheme = "wfd")

robbriers/cde documentation built on May 5, 2019, 7:59 p.m.