settings_dt_scale: Visualization Settings for a Date/Time Scale

Description Usage Arguments Value See Also Examples

View source: R/settings_dt_scale.R

Description

A series of arguments to detect the minimum time stamp value within a data set, and provide an output of visualization settings to apply to allow for appropriate labeling and scaling.

Usage

1
2
3
4
5
settings_dt_scale(
  dataset,
  start_date = input_startdate,
  end_date = input_enddate
)

Arguments

dataset

The data set which to evaluate

start_date

The start date (to be pasted into captions); will be automatically adjusted based on actual start date of the data set, if possible

end_date

The end date (to be pasted into captions); will be automatically adjusted based on actual end date of the data set, if possible

Value

List of values to be applied to various visualization methods:

dataset

Dataset with the minimum time stamp column header renamed 'timestamp'.

lab_title_sub

Character; Working in conjunction with lab_title from settings_units, the unit of temporal measurement of the dataset

x_angle

Numeric; the angle to place x-axis (temporal) text.

x_scale

x-axis scale (from scale_x_datetime) formatting and scale breaks.

date_in_set

Logical; if date value(s) present in data set.

start_date

Date; actual minimum date of data set, regardless of function input.

end_date

Date; actual maximum date of data set, regardless of function input.

lab_caption

Character; label information for details containing date range in the set.

See Also

Other visualization settings: add_cap(), drop_incomplete(), settings_shapes(), settings_units()

Examples

1
2
3
4
5
settings_results_example <- settings_dt_scale(july_api_diurnal, start_date = "2020-07-01", end_date = "2020-07-07")
ggplot(settings_results_example$dataset, aes(timestamp, temperature)) +
  settings_results_example$x_scale +
  labs(subtitle = settings_results_example$lab_caption)
remove(settings_results_example)

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