View source: R/preprocessing.R
divide_by_timecycle | R Documentation |
Divide sessions by time-cycle
divide_by_timecycle(
sessions,
months_cycles = list(1:12),
wdays_cycles = list(1:5, 6:7),
start = getOption("evprof.start.hour")
)
sessions |
tibble, sessions data set in evprof standard format |
months_cycles |
list containing Monthly cycles |
wdays_cycles |
list containing Weekdays cycles |
start |
integer, start hour in the x axis of the plot. |
same sessions data set with extra column "Timecycle"
library(dplyr)
sessions_timecycles <- california_ev_sessions %>%
sample_frac(0.05) %>%
divide_by_timecycle(
months_cycles = list(1:12),
wdays_cycles = list(1:5, 6:7)
)
# The column `Timecycle` has been added
names(sessions_timecycles)
library(ggplot2)
plot_points(sessions_timecycles) +
facet_wrap(vars(Timecycle))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.