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

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

if (FALSE) { my_df <- oy_read("path/to/folder/") my_df_clean <- oy_clean(my_df) oy_lineplot(my_df_clean, y_var = "Balance", weekdays = FALSE) }