ts_variation: Time Series Variation for multiple monitors' temporal...

Description Usage Arguments Value See Also Examples

View source: R/ts_variation.R

Description

Please note that this function will take the longest of all the visualization options. Visualize variation in temporal atmospheric data for multiple monitors and (optionally) multiple pollutants; a customization of timeVariation from openair. Relevant information (such as type of pollutant(s) and temporal scale of data set) will be reported automatically in the visualization, however limitations to the plot settings prevent all relevant information from being included.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
ts_variation(
  dataset,
  pollutants,
  group,
  subset = c("hour", "day.hour", "day", "month"),
  include,
  exclude,
  location_data = data_meta,
  color = "Dark2"
)

Arguments

dataset

The data set to visualize. This function works best with unaveraged or hourly-averaged data.

pollutants

Character, optionally a list; in quotation marks, the pollutant(s) to map. Note that if multiple are specified, group must remain unspecified.

group

Character; in quotation marks, the variable for which to group the data (i.e. what will distinguish values from one another). Note that if specified, pollutants must be singular.

subset

Character; in quotation marks, the specific plot to report. Either all (default; c("hour", "day.hour", "day", "month")) or one (from the default list) is permitted.

include

Character, optional; label(s) of monitors to include. See filter_df for more information.

exclude

Character, optional; label(s) of monitors to exclude. See filter_df for more information.

location_data

Data set containing label information

color

Character; color palette to use. For a full list of other defaults, see openColours.

Value

Data visualization: diurnal, hour of day, day of the week, and/or monthly time series variation of specified pollutant(s).

See Also

timeVariation()

Other STAD visualizations: heatmap_cross(), heatmap_single(), map_oa(), map_stad(), ts_line()

Examples

1
2
ts_variation(july_api_hourly, "pm25_atm", include = "Lighthouse", group = "date_tag", location_data = july_api_meta)
ts_variation(july_api_hourly, c("pm25_atm", "temperature_ambient"), location_data = july_api_meta, subset = "hour")

gmcginnis/AirVizR documentation built on Dec. 20, 2021, 11:49 a.m.