box_plots | R Documentation |
Plot a series of boxplots
box_plots(
data,
timeperiod,
value,
title = "",
subtitle = "",
xlab = "",
ylab = ""
)
data |
data.frame or tibble which will be fed into ggplot functions. This object should contain the fields used for the arguments within this function |
timeperiod |
unquoted field name for the field containing the time period |
value |
unquoted field name for the field containing the values for the indicator that is being plotted |
title |
string; title of chart |
subtitle |
string; subtitle of the chart |
xlab |
string; x-axis title |
ylab |
string; y-axis title |
a ggplot of boxplots for an indicator for containing values for multiple areas over time
Other quick charts:
compare_areas()
,
compare_indicators()
,
map()
,
overview()
,
population()
,
trends()
library(dplyr)
df <- create_test_data()
df_box <- df %>%
filter(AreaType == "Local") %>%
arrange(IndicatorName) %>%
mutate(Timeperiod = rep(c("2011", "2012", "2013", "2014", "2015", "2016"),
each = 100))
p <- box_plots(df_box,
timeperiod = Timeperiod,
value = Value,
title = "Title of chart",
subtitle = "Boxplot over time",
ylab = "Proportion (%)")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.