Description Usage Arguments Value See Also Examples
Plot an overview (tartan rug) of multiple indicators
1 2 3 4 5 6 7 8 9 10 11 12 |
data |
data.frame object to plot using ggplot2 functions |
area |
field containing area names (unquoted) |
indicator |
field containing indicator names (unquoted) |
value |
field containing variable to be plotted (unquoted) |
fill |
field to be used to determine the colouring of the bars (unquoted) |
timeperiod |
field containing the time period (unquoted) |
top_areas |
character vector; the areas to fix at the left |
wrap_length |
number; maximum number of characters in indicator before wrapping it |
value_label_size |
number; amount to scale the size of the value label |
legend_position |
the position of legends ("none", "left", "right", "bottom", "top", or two-element numeric vector) |
a ggplot of the overview/tartan rug plot
Other quick charts:
box_plots()
,
compare_areas()
,
compare_indicators()
,
map()
,
population()
,
trends()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | library(dplyr)
df <- create_test_data()
parent <- "PAC14"
top_names <- c("C001", parent)
df_over <- df %>%
filter((AreaCode %in% top_names |
ParentAreaCode == parent)) %>%
mutate(Value = round(Value, 1))
p <- overview(df_over,
area = AreaCode,
indicator = IndicatorName,
value = Value,
timeperiod = Timeperiod,
fill = Significance,
top_areas = top_names,
wrap_length = 40,
value_label_size = 0.8)
p
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.