make_dygraph: Construct a Standard Wikimedia Discovery Dygraph

Description Usage Arguments

View source: R/dygraphs.R

Description

Construct a dygraph using the custom formatting Wikimedia dashboards use as standard. This is nothing special - a standard dygraph with a bit of custom CSS shipped with the package - but it's surrounded by code that allows the function to turn all our usual data.frame formats into xts::xts objects.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
make_dygraph(
  data,
  xlab,
  ylab,
  title,
  legend_name = NULL,
  use_si = TRUE,
  expr = NULL,
  group = NULL,
  ...
)

Arguments

data

a data.frame reformatted to be XTS-able

xlab

the label to use for the dygraph's x-axis

ylab

the label to use for the dygraph's y-axis

title

the title to use on the dygraph

legend_name

a custom name for the variable in the event that is_single is TRUE. NULL by default (in which case the variable will be named "events")

use_si

whether to use si labelling (1000 becomes 1K). TRUE by default

expr

an optional expression to evaluate prior to building the dygraph. We use this in (for example) reactive graphing

group

Group to associate this plot with. The x-axis zoom level of plots within a group is automatically synchronized

...

Additional parameters to pass on to dygraphs::dyOptions.


wikimedia/wikimedia-discovery-polloi documentation built on Dec. 4, 2019, 2:12 p.m.