Description Usage Arguments Details Value
Plot a value over time. You control the date grouping. See params for valid values. For example how many records by date, or the mean vaue by date. If using a 0/1 column, you can use mean to get the
1 2 3 | ezr.plot_vs_time(dataset, date_field, value, date_grouping = "month",
plt_metric = "mean", plot_type = "line", show_text = TRUE,
title = NULL)
|
dataset |
dataframe |
date_field |
The date field to plot against |
value |
If the field is a character or |
date_grouping |
How to group data for plotting. Data is always 'floored'...that is 2018-12-25 would be rounded to 2018-12-01. Default is MONTH. Options are month, week, day, hour , year, quarter,season,halfyear and none. |
plt_metric |
Plotting metric. Valid values are count, median, mean, sd, max,min, count1. 'mean' is default. Count1 is valid only for categoricals and assumes a 0/1 value. |
title |
Plot title. Default is nothing. |
plot_type. |
Default is line. Valid values are 'line','bar', and 'box'. Box should be used when limited number of grouping values for the date field |
show_text. |
Default is FALSE. Not yet implemented... |
Bar, Box, or Line Plots are possible. Default is line.
Returns a plot
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.