Density plot in 2D, considering Start time and Connection duration as variables
Source:R/exploration.R
plot_density_2D.Rd
Density plot in 2D, considering Start time and Connection duration as variables
Arguments
- sessions
tibble, sessions data set in evprof standard format.
- bins
integer, parameter to pass to
ggplot2::stat_density_2d
- by
variable to facet the plot. Character being "wday", "month" or "year", considering the week to start at wday=1.
- start
integer, start hour in the x axis of the plot.
- log
logical, whether to transform
ConnectionStartDateTime
andConnectionHours
variables to natural logarithmic scale (base =exp(1)
).
Examples
library(dplyr)
california_ev_sessions %>%
sample_frac(0.05) %>%
plot_density_2D(by = "wday", start = 3, bins = 15, log = FALSE)