Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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