oy_lineplot: Line Plot of Oyster Journey Data

Description Usage Arguments Value Examples

View source: R/viz.R

Description

Outputs a simple time series line plot of Oyster journey data that's been cleaned with oy_clean.

Usage

1
2
3
4
5
6
7
oy_lineplot(
  data,
  x_var = "datetime_start",
  y_var = "journey_duration",
  weekdays = FALSE,
  mode = "Train"
)

Arguments

data

data.frame of Oyster journey history data cleaned using oy_clean().

x_var

The name of the variable from data that you want on the x axis. This is restricted currently to datetime_start.

y_var

The name of the continuous variable from data for the y axis. Choose "journey_duration" or "balance".

weekdays

Logical. FALSE returns data for all days of the week. Restrict the output to Monday to Friday with TRUE.

mode

Currently restricted to "Train".

Value

A plot.

Examples

1
2
3
4
5
6
## Not run: 
my_df <- oy_read("path/to/folder/")
my_df_clean <- oy_clean(my_df)
oy_lineplot(my_df_clean, y_var = "Balance", weekdays = FALSE)

## End(Not run)

matt-dray/oystr documentation built on Jan. 20, 2021, 6:43 a.m.