box_plots: Plot a series of boxplots

Description Usage Arguments Value See Also Examples

View source: R/quick_charts.R

Description

Plot a series of boxplots

Usage

1
2
3
4
5
6
7
8
9
box_plots(
  data,
  timeperiod,
  value,
  title = "",
  subtitle = "",
  xlab = "",
  ylab = ""
)

Arguments

data

data.frame object to plot using ggplot2 functions

timeperiod

field containing the time period (unquoted)

value

field containing variable to be plotted on x axis (unquoted)

title

string; title of chart

subtitle

string; text to use as subtitle to graph

xlab

string; x-axis title

ylab

string; y-axis title

Value

a ggplot of boxplots for many areas over time

See Also

Other quick charts: compare_areas(), compare_indicators(), map(), overview(), population(), trends()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
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 (%)")

fingertipscharts documentation built on July 2, 2020, 2:59 a.m.