plot_topic_share_per_period | R Documentation |
Creates a Plotly stacked area chart that visualizes the share of referendum topic occurences per period.
plot_topic_share_per_period(
data,
tier = 1L,
period = c("week", "month", "quarter", "year", "decade", "century"),
weight_by_n_rfrnds = TRUE
)
data |
RDB referendum data as returned by |
tier |
Tier of the topics variable to plot. |
period |
Type of period to count topics by. One of
|
weight_by_n_rfrnds |
Whether or not to weight topic occurences by number of referendums. If |
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_rfrnd_share_per_period()
,
plot_topic_segmentation()
rdb::rfrnds(quiet = TRUE) |>
rdb::plot_topic_share_per_period(period = "decade")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.