plot_rfrnd_share_per_period | R Documentation |
Creates a Plotly stacked area chart that visualizes the share of referendums per period, grouped by another column.
plot_rfrnd_share_per_period(
data,
by,
period = c("week", "month", "quarter", "year", "decade", "century")
)
data |
RDB referendum data as returned by |
by |
|
period |
Type of period to count referendums by. One of
|
Note that the period
types "year"
, "decade"
and "century"
are unique timespans, while "week"
, "month"
and "quarter"
are recurring timespans (e.g. every year has a week 1).
A plotly object.
Other visualization functions:
ggplot_streamgraph()
,
plot_topic_segmentation()
,
plot_topic_share_per_period()
rdb::rfrnds(quiet = TRUE,
max_cache_age = "1 year") |>
rdb::plot_rfrnd_share_per_period(by = "level")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.