-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIncome_Visualisation.R
More file actions
81 lines (69 loc) · 3.18 KB
/
Copy pathIncome_Visualisation.R
File metadata and controls
81 lines (69 loc) · 3.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
library(tidyverse)
library(dplyr)
library(ggplot2)
## Brazil Top 1 Percent
Brazil_Income_Top1_Graph <- Brazil_PreTaxIncome_Top1Percent %>%
ggplot(aes(x = Year, y = `% of Total`)) +
geom_line() +
geom_point(shape = 15, size = 2) +
scale_y_continuous(limits = c(0.15, 0.3)) +
labs(title = "Trend of Pre-Tax Income Top 1% Share in Brazil",
x = "Year",
y = "Share of Top 1% in Pre-Tax Income") +
theme_minimal()
Brazil_Income_Top1_Graph
## Brazil Top 10 Percent
Brazil_Income_Top10_Graph <- Brazil_PreTaxIncome_Top10Percent %>%
ggplot(aes(x = Year, y = `% of Total`)) +
geom_line() +
geom_point(shape = 15, size = 2) +
scale_y_continuous(limits = c(0.5, 0.65)) +
labs(title = "Trend of Pre-Tax Income Top 10% Share in Brazil",
x = "Year",
y = "Share of Top 10% in Pre-Tax Income") +
theme_minimal()
Brazil_Income_Top10_Graph
## Spain Top 1 Percent
Spain_Income_Top1_Graph <- Spain_PreTaxIncome_Top1Percent %>%
ggplot(aes(x = Year, y = `% of Total`)) +
geom_line() +
geom_point(shape = 15, size = 2) +
scale_y_continuous(limits = c(0.05, 0.20)) +
labs(title = "Trend of Pre-Tax Income Top 1% Share in Spain",
x = "Year",
y = "Share of Top 1% in Pre-Tax Income") +
theme_minimal()
Spain_Income_Top1_Graph
## Spain Top 10 Percent
Spain_Income_Top10_Graph <- Spain_PreTaxIncome_Top10Percent %>%
ggplot(aes(x = Year, y = `% of Total`)) +
geom_line() +
geom_point(shape = 15, size = 2) +
scale_y_continuous(limits = c(0.3, 0.45)) +
labs(title = "Trend of Pre-Tax Income Top 10% Share in Spain",
x = "Year",
y = "Share of Top 10% in Pre-Tax Income") +
theme_minimal()
Spain_Income_Top10_Graph
## Brazil & Spain Top 1 %
BrazilandSpain_Income_Top1_Graph <- ggplot() +
geom_line(data = Brazil_PreTaxIncome_Top1Percent, aes(x = Year, y = `% of Total`, color = "Brazil")) +
geom_point(data = Brazil_PreTaxIncome_Top1Percent, aes(x = Year, y = `% of Total`, color = "Brazil"), shape = 15, size = 2) +
geom_line(data = Spain_PreTaxIncome_Top1Percent, aes(x = Year, y = `% of Total`, color = "Spain")) +
geom_point(data = Spain_PreTaxIncome_Top1Percent, aes(x = Year, y = `% of Total`, color = "Spain"), shape = 15, size = 2) +
scale_y_continuous(limits = c(0.05, 0.3)) +
labs(title = "Pre-Tax Income Top 1% Share: Brazil vs Spain",
x = "Year", y = "Share of Top 1% in Pre-Tax Income", color = "Country") +
theme_minimal()
BrazilandSpain_Income_Top1_Graph
## Brazil & Spain Top 10 %
BrazilandSpain_Income_Top10_Graph <- ggplot() +
geom_line(data = Brazil_PreTaxIncome_Top10Percent, aes(x = Year, y = `% of Total`, color = "Brazil")) +
geom_point(data = Brazil_PreTaxIncome_Top10Percent, aes(x = Year, y = `% of Total`, color = "Brazil"), shape = 15, size = 2) +
geom_line(data = Spain_PreTaxIncome_Top10Percent, aes(x = Year, y = `% of Total`, color = "Spain")) +
geom_point(data = Spain_PreTaxIncome_Top10Percent, aes(x = Year, y = `% of Total`, color = "Spain"), shape = 15, size = 2) +
scale_y_continuous(limits = c(0.3, 0.65)) +
labs(title = "Pre-Tax Income Top 10% Share: Brazil vs Spain",
x = "Year", y = "Share of Top 10% in Pre-Tax Income", color = "Country") +
theme_minimal()
BrazilandSpain_Income_Top10_Graph