Skip to content

Instantly share code, notes, and snippets.

@TonyLadson
Created June 1, 2020 01:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TonyLadson/e984e820731e43b327902a3407da6f82 to your computer and use it in GitHub Desktop.
Save TonyLadson/e984e820731e43b327902a3407da6f82 to your computer and use it in GitHub Desktop.
library(tidyverse)
issues <- tribble(~issue, ~pc,
'Inflows', 6,
'Demand changes', 6,
'System operation', 18,
'Equity of water sharing arrangements', 10,
'State entitlements and policies', 10,
'Environmental water', 11,
'Reliability of different licences', 4,
'Miscellaneous', 4,
'Lack of transparency and accountability', 7,
'Floodplain harvesting and the northern basin', 3,
'Basin plan', 6,
'Lower lakes', 7,
'Trade and ownership', 8)
issues %>%
summarise(sum(pc))
p <- issues %>%
arrange(desc(pc)) %>%
ggplot(aes(x = as_factor(issue), y = pc)) +
geom_col(fill = 'blue', colour = 'black') +
guides(fill=FALSE) +
scale_y_continuous(name = 'Percentage of stakeholders raising issue') +
scale_x_discrete(name = '') +
theme_gray(base_size = 7) +
theme(axis.text.x = element_text(angle = 90, hjust = 1, vjust = 0.5))
p
ggsave(file.path('figures', 'issues_bar.png'), plot = p, width = 4, height = 4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment