ts_line: Time Series for multiple monitors' temporal atmospheric data

Description Usage Arguments Value See Also Examples

View source: R/ts_line.R

Description

Visualize temporal atmospheric data for multiple monitors, with optional minimum and maximum labels and a moving average. Relevant information (such as date ranges, averaging methods, facets, and min/max values in the set) will be reported autmatically in the visualization.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
ts_line(
  dataset,
  variable_of_interest,
  add_extrema = TRUE,
  digits = 2,
  add_points = FALSE,
  add_average = TRUE,
  label_filter = c(""),
  cap_value = NA,
  cap_color = "green",
  single_column = FALSE,
  label_length = 10,
  avg_color = "darkgreen",
  min_color = "royalblue",
  max_color = "darkorange",
  location_data = data_meta
)

Arguments

dataset

The hourly dataset to visualize

variable_of_interest

The variable of interest (not in quotation marks) which to visualize

add_extrema

Logical; label the extreme (minimum and maximum) valuess of the monitors of interest

digits

Numeric; the number of digits to report

add_points

Logical; add colored points for the variable_of_interest

add_average

Logical; add a seprate plot for the average of ALL monitors in a set, to be a line colored by avg_color

label_filter

Character list, optional (but recommended for large sets); list of monitor labels to be spotlighted (note: does NOT remove unspecified labels, which will remain as gray background lines)

cap_value

Numeric, optional; values at or above to be colored serpately from the regular continuous scale. See add_cap for more information.

cap_color

Character; color for values at or above the cap_value

single_column

Logical; plot the data all as a single column, making cross-comparisons for monitors at specific times easier

label_length

Character; applied if single_column is TRUE, the number of characters for which to wrap the monitor label

avg_color, min_color, max_color

Character; colors for the average line, minimum text label, and maximum text label, respectively

location_data

Data set containing latitude and longitude data

Value

Data visualization: line graph time series spotlighting individual monitors, with background graphics representing the time series data for all other monitors in the set.

See Also

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

Examples

1
2
ts_line(july_api_hourly, pm25_atm, label_filter = "\\bPSU\\b", location_data = july_api_meta)
ts_line(july_api_hourly, pm25_atm, label_filter = c("\\bPSU\\b"), add_points = TRUE, single_column = TRUE, add_average = FALSE, location_data = july_api_meta)

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