Skip to content
Snippets Groups Projects
Commit ae85e96d authored by Peter-Paul Pichler's avatar Peter-Paul Pichler
Browse files

revision 0.2

parent a95ed37f
No related branches found
No related tags found
No related merge requests found
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
,pichler,pichler-Latitude-7400,07.04.2021 09:10,file:///home/pichler/.config/libreoffice/4;
\ No newline at end of file
......@@ -73,7 +73,6 @@ pdat_sector_summary_by_eu_ntile =
# Fig. 1
```{r ntiles-total}
p1 = pdat_country_summary_by_eu_ntile %>%
filter(year == 2015,
indicator == "total_fd_me") %>%
......@@ -91,18 +90,26 @@ p1 = pdat_country_summary_by_eu_ntile %>%
p2 = pdat_country_summary_by_eu_ntile %>%
filter(year == 2015,
indicator == "total_energy_use_tj") %>%
group_by(eu_q_rank) %>%
summarise(value = sum(value)*0.000001,
eu_ntile_name = first(eu_ntile_name)) %>%
ggplot(aes(x=eu_ntile_name, y=value)) +
geom_col(position = position_dodge(), fill=pal[1]) +
indicator %in% c("total_energy_use_tj", "total_energy_use_losses_tj")) %>%
group_by(eu_ntile_name, indicator) %>%
summarise(value = sum(value)*0.000001) %>%
pivot_wider(id_cols = eu_ntile_name, names_from = indicator, values_from = value) %>%
mutate(total_energy_use_final_tj = total_energy_use_tj-total_energy_use_losses_tj) %>%
select(-total_energy_use_tj) %>%
pivot_longer(cols=-eu_ntile_name, names_to = "indicator", values_to = "value") %>%
mutate(component = if_else(indicator=="total_energy_use_losses_tj", "Loss", "Final energy")) %>%
mutate(component = factor(component, levels=c("Loss", "Final energy"))) %>%
ggplot(aes(x=eu_ntile_name, y=value, fill=component)) +
geom_col(position = position_stack()) +
scale_fill_manual(name = "", values = pal[c(3,1)]) +
#theme_ipsum() +
theme_minimal() +
theme(text=element_text(family="Liberation Sans Narrow")) +
labs(x="", y="Energy footprint (EJ)") +
labs(x="", y="Net energy footprint (EJ)") +
theme(axis.text.x = element_text(angle = 90)) +
scale_x_discrete(labels = c("D01","D02","D03","D04","D05","D06","D07","D08","D09","D10"))
scale_x_discrete(labels = c("D01","D02","D03","D04","D05","D06","D07","D08","D09","D10")) +
theme(legend.position = c(0.2,0.91),
legend.text = element_text(size=11))
p3 = pdat_country_summary_by_eu_ntile %>%
filter(year == 2015,
......@@ -189,10 +196,8 @@ p_bottom = p2 + p1 + p3
```{r , fig.width=12, fig.height=8}
a = p_top / p_bottom + plot_annotation(tag_levels = 'a') +
plot_layout(guides = 'collect') &
a = p_top / p_bottom + plot_annotation(tag_levels = 'a') &
theme(plot.margin = unit(c(0.25,0.25,0.25,0.25), "cm"),
legend.position = 'bottom',
axis.title.y = element_text(size=13, hjust = 0.5),
axis.text.x = element_text(size = 12),
axis.text.y = element_text(size = 12),
......@@ -203,7 +208,7 @@ ggsave(here("analysis", "figures", "figure1.pdf"), device=cairo_pdf)
```
```{r figure1, out.width="98%", fig.cap="Household expenditure and environmental footprints and intensities across European expenditure deciles. Total expenditures (a), energy footprint (b), and carbon footprint (c) per decile. Energy intensity of consumption as energy footprint per expenditure (d), carbon intensity of consumption as carbon footprint per expenditure (e), and carbon intensity of energy as carbon footprint per energy footprint (f)."}
```{r figure1, out.width="98%", fig.cap="Household expenditure and environmental footprints and intensities across European expenditure deciles. Total expenditures (a), net energy footprint (composed of final energy and losses) (b), and carbon footprint (c) per decile. Energy intensity of consumption as energy footprint per expenditure (d), carbon intensity of consumption as carbon footprint per expenditure (e), and carbon intensity of energy as carbon footprint per energy footprint (f)."}
knitr::include_graphics(here::here("analysis", "figures", "figure1.pdf"))
```
......@@ -349,7 +354,7 @@ p2 = ggplot(pdat %>% filter(indicator_type == "Energy GJ per adult eq"),
#theme_ipsum() +
theme_minimal() +
#theme(text=element_text(family="Liberation Sans Narrow")) +
labs(x="", y="Energy footprint GJ per adult eq") #+
labs(x="", y="Net energy footprint GJ per adult eq") #+
# theme(legend.position = "bottom",
# axis.text.x = element_text(angle = 90, size = 12),
# axis.text.y = element_text(size = 12),
......@@ -377,7 +382,7 @@ a = (p1 / p2) +
ggsave(here("analysis", "figures", "figure3.pdf"))
```
```{r figure3, out.width="100%", fig.cap="Energy and carbon footprints by final consumption sector and European expenditure decile in 2015, further broken down by emission source location."}
```{r figure3, out.width="100%", fig.cap="Net energy and carbon footprints by final consumption sector and European expenditure decile in 2015, further broken down by emission source location."}
knitr::include_graphics(here::here("analysis", "figures", "figure3.pdf"))
```
......@@ -422,7 +427,7 @@ p1 = ggplot(pdat_final_demand, aes(x=eu_q_rank, y=value, fill=indicator, alpha=i
scale_alpha_manual(values=c(0.3,1),labels=c("2015", "Best technology"), name="Energy\nfootprint")+
scale_x_continuous(breaks = c(1,2,3,4,5,6,7,8,9,10),
labels = c("D01","D02","D03","D04","D05","D06","D07","D08","D09","D10")) +
labs(y="Energy footprint (EJ)", x="") +
labs(y="Net energy footprint (EJ)", x="") +
theme_minimal() +
coord_flip() +
theme(legend.position="bottom")
......@@ -479,7 +484,7 @@ p1 = ggplot(pdat_final_demand, aes(x=eu_q_rank, y=value, fill=technology, alpha=
scale_alpha_manual(values=c(0.3,1),labels=c("2015", "Best technology"), name="Energy\nfootprint")+
scale_x_continuous(breaks = c(1,2,3,4,5,6,7,8,9,10),
labels = c("D01","D02","D03","D04","D05","D06","D07","D08","D09","D10")) +
labs(y="Energy footprint (EJ)", x="") +
labs(y="Net energy footprint (EJ)", x="") +
theme_minimal() +
coord_flip() +
theme(legend.position="bottom") +
......@@ -732,7 +737,7 @@ ggsave(here("analysis", "figures", "figure5.pdf"))
```
```{r figure5, out.width="70%", fig.align="center", fig.cap="Mean energy available for Europe in decarbonisation scenarios, positioned in option space between a range of minimum energy requirements and range of associated maximum inequality. All expenditure deciles have 'best technology' already."}
```{r figure5, out.width="70%", fig.align="center", fig.cap="Mean final energy available for Europe in decarbonisation scenarios, positioned in option space between a range of minimum final energy requirements and range of associated maximum inequality. All expenditure deciles have 'best technology' already."}
knitr::include_graphics(here::here("analysis", "figures", "figure5.pdf"))
```
......
No preview for this file type
This diff is collapsed.
No preview for this file type
File added
File added
File added
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment