Commit 18eb8629 authored by Matteo DE FELICE's avatar Matteo DE FELICE

Improved viz and new simulations

parent a8a657d5
......@@ -172,10 +172,13 @@ shinyServer(function(input, output, session) {
'HRD' = 'black',
'ZZZ' = 'grey75')
g = ggplot(gen_y, aes(x = country, y = generation, fill = type)) +
geom_bar(stat = 'identity') +
g = ggplot(gen_y, aes(x = country, y = generation)) +
geom_bar(aes(fill = type), stat = 'identity') +
geom_text(data = gen_y %>% group_by(country, year) %>% summarise(total = sum(generation)),
aes(label = round(total), y = total), vjust = -0.5) +
scale_fill_manual(values = color_palette) +
facet_wrap(~year, ncol = 1)
facet_wrap(~year, ncol = 1) +
theme_light()
print(g)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment