Code
%>%
tipslm13 left_join(geo, by = "geo") %>%
group_by(geo, Geo) %>%
summarise(Nobs = n()) %>%
arrange(-Nobs) %>%
if (is_html_output()) datatable(., filter = 'top', rownames = F) else .} {
Data - Eurostat
%>%
tipslm13 left_join(geo, by = "geo") %>%
group_by(geo, Geo) %>%
summarise(Nobs = n()) %>%
arrange(-Nobs) %>%
if (is_html_output()) datatable(., filter = 'top', rownames = F) else .} {
%>%
tipslm13 left_join(unit, by = "unit") %>%
group_by(unit, Unit) %>%
summarise(Nobs = n()) %>%
arrange(-Nobs) %>%
if (is_html_output()) print_table(.) else .} {
unit | Unit | Nobs |
---|---|---|
CP_MNAC | Current prices, million units of national currency | 783 |
%>%
tipslm13 left_join(na_item, by = "na_item") %>%
group_by(na_item, Na_item) %>%
summarise(Nobs = n()) %>%
arrange(-Nobs) %>%
if (is_html_output()) print_table(.) else .} {
na_item | Na_item | Nobs |
---|---|---|
D1 | Compensation of employees | 783 |
%>%
tipslm13 # CP_MNAC Current prices, million units of national currency
filter(geo %in% c("FR", "DE", "PT")) %>%
%>%
year_to_enddate left_join(geo, by = "geo") %>%
+ geom_line() + theme_minimal() +
ggplot aes(x = date, y = values/100, color = Geo, linetype = Geo) +
scale_color_manual(values = viridis(4)[1:3]) +
scale_x_date(breaks = as.Date(paste0(seq(1960, 2020, 1), "-01-01")),
labels = date_format("%y")) +
theme(legend.position = c(0.3, 0.85),
legend.title = element_blank()) +
xlab("") + ylab("Compensation of employees")
%>%
tipsna62 filter(geo %in% c("DE"),
== "THS_PER") %>%
unit select(geo, time, emp = values) %>%
left_join(tipslm13 %>%
select(geo, time, comp = values),
by = c("geo", "time")) %>%
left_join(une_rt_a %>%
filter(age == "Y20-64",
== "T",
sex == "PC_ACT") %>%
unit select(geo, time, unr = values),
by = c("geo", "time")) %>%
mutate(comp_emp = comp/emp,
comp_emp_d1 = comp_emp/lag(comp_emp, 1)-1) %>%
%>%
year_to_enddate transmute(date, comp_emp_d1=100*comp_emp_d1, unr = unr) %>%
gather(variable, value, -date) %>%
mutate(Variable = case_when(variable == "comp_emp_d1" ~ "Wage Inflation (%)",
== "unr" ~ "Unemployment Rate (%)")) %>%
variable + geom_line() + theme_minimal() +
ggplot aes(x = date, y = value/100, color = Variable, linetype = Variable) +
scale_color_manual(values = viridis(3)[1:2]) +
scale_x_date(breaks = as.Date(paste0(seq(1960, 2020, 1), "-01-01")),
labels = date_format("%y")) +
scale_y_continuous(breaks = 0.01*seq(-100, 100, 1),
labels = percent_format(accuracy = 1)) +
theme(legend.position = c(0.8, 0.85),
legend.title = element_blank()) +
xlab("") + ylab("Unemployment Rate, Wage Inflation (%)")
%>%
tipsna62 filter(geo %in% c("FR"),
== "THS_PER") %>%
unit select(geo, time, emp = values) %>%
left_join(tipslm13 %>%
select(geo, time, comp = values),
by = c("geo", "time")) %>%
left_join(une_rt_a %>%
filter(age == "Y20-64",
== "T",
sex == "PC_ACT") %>%
unit select(geo, time, unr = values),
by = c("geo", "time")) %>%
mutate(comp_emp = comp/emp,
comp_emp_d1 = comp_emp/lag(comp_emp, 1)-1) %>%
%>%
year_to_enddate transmute(date, comp_emp_d1=100*comp_emp_d1, unr = unr) %>%
gather(variable, value, -date) %>%
mutate(Variable = case_when(variable == "comp_emp_d1" ~ "Wage Inflation (%)",
== "unr" ~ "Unemployment Rate (%)")) %>%
variable + geom_line() + theme_minimal() +
ggplot aes(x = date, y = value/100, color = Variable, linetype = Variable) +
scale_color_manual(values = viridis(3)[1:2]) +
scale_x_date(breaks = as.Date(paste0(seq(1960, 2020, 1), "-01-01")),
labels = date_format("%y")) +
scale_y_continuous(breaks = 0.01*seq(-100, 100, 1),
labels = percent_format(accuracy = 1)) +
theme(legend.position = c(0.2, 0.85),
legend.title = element_blank()) +
xlab("") + ylab("Unemployment Rate, Wage Inflation (%)")
%>%
tipsna62 filter(geo %in% c("PT"),
== "THS_PER") %>%
unit select(geo, time, emp = values) %>%
left_join(tipslm13 %>%
select(geo, time, comp = values),
by = c("geo", "time")) %>%
left_join(une_rt_a %>%
filter(age == "Y20-64",
== "T",
sex == "PC_ACT") %>%
unit select(geo, time, unr = values),
by = c("geo", "time")) %>%
mutate(comp_emp = comp/emp,
comp_emp_d1 = comp_emp/lag(comp_emp, 1)-1) %>%
%>%
year_to_enddate transmute(date, comp_emp_d1=100*comp_emp_d1, unr = unr) %>%
gather(variable, value, -date) %>%
mutate(Variable = case_when(variable == "comp_emp_d1" ~ "Wage Inflation (%)",
== "unr" ~ "Unemployment Rate (%)")) %>%
variable + geom_line() + theme_minimal() +
ggplot aes(x = date, y = value/100, color = Variable, linetype = Variable) +
scale_color_manual(values = viridis(3)[1:2]) +
scale_x_date(breaks = as.Date(paste0(seq(1960, 2020, 1), "-01-01")),
labels = date_format("%y")) +
scale_y_continuous(breaks = 0.01*seq(-100, 100, 1),
labels = percent_format(accuracy = 1)) +
theme(legend.position = c(0.2, 0.85),
legend.title = element_blank()) +
xlab("") + ylab("Unemployment Rate, Wage Inflation (%)")
%>%
tipsna62 filter(geo %in% c("ES"),
== "THS_PER") %>%
unit select(geo, time, emp = values) %>%
left_join(tipslm13 %>%
select(geo, time, comp = values),
by = c("geo", "time")) %>%
left_join(une_rt_a %>%
filter(age == "Y20-64",
== "T",
sex == "PC_ACT") %>%
unit select(geo, time, unr = values),
by = c("geo", "time")) %>%
mutate(comp_emp = comp/emp,
comp_emp_d1 = comp_emp/lag(comp_emp, 1)-1) %>%
%>%
year_to_enddate transmute(date, comp_emp_d1=100*comp_emp_d1, unr = unr) %>%
gather(variable, value, -date) %>%
mutate(Variable = case_when(variable == "comp_emp_d1" ~ "Wage Inflation (%)",
== "unr" ~ "Unemployment Rate (%)")) %>%
variable + geom_line() + theme_minimal() +
ggplot aes(x = date, y = value/100, color = Variable, linetype = Variable) +
scale_color_manual(values = viridis(3)[1:2]) +
scale_x_date(breaks = as.Date(paste0(seq(1960, 2020, 1), "-01-01")),
labels = date_format("%y")) +
scale_y_continuous(breaks = 0.01*seq(-100, 100, 1),
labels = percent_format(accuracy = 1)) +
theme(legend.position = c(0.2, 0.85),
legend.title = element_blank()) +
xlab("") + ylab("Unemployment Rate, Wage Inflation (%)")
%>%
tipsna62 filter(geo %in% c("IT"),
== "THS_PER") %>%
unit select(geo, time, emp = values) %>%
left_join(tipslm13 %>%
select(geo, time, comp = values),
by = c("geo", "time")) %>%
left_join(une_rt_a %>%
filter(age == "Y20-64",
== "T",
sex == "PC_ACT") %>%
unit select(geo, time, unr = values),
by = c("geo", "time")) %>%
mutate(comp_emp = comp/emp,
comp_emp_d1 = comp_emp/lag(comp_emp, 1)-1) %>%
%>%
year_to_enddate transmute(date, comp_emp_d1=100*comp_emp_d1, unr = unr) %>%
gather(variable, value, -date) %>%
mutate(Variable = case_when(variable == "comp_emp_d1" ~ "Wage Inflation (%)",
== "unr" ~ "Unemployment Rate (%)")) %>%
variable + geom_line() + theme_minimal() +
ggplot aes(x = date, y = value/100, color = Variable, linetype = Variable) +
scale_color_manual(values = viridis(3)[1:2]) +
scale_x_date(breaks = as.Date(paste0(seq(1960, 2020, 1), "-01-01")),
labels = date_format("%y")) +
scale_y_continuous(breaks = 0.01*seq(-100, 100, 1),
labels = percent_format(accuracy = 1)) +
theme(legend.position = c(0.4, 0.9),
legend.title = element_blank()) +
xlab("") + ylab("Unemployment Rate, Wage Inflation (%)")