Code
%>%
earn_ses14_rhr left_join(sex, by = "sex") %>%
group_by(sex, Sex) %>%
summarise(Nobs = n()) %>%
arrange(-Nobs) %>%
if (is_html_output()) print_table(.) else .} {
sex | Sex | Nobs |
---|---|---|
F | Females | 312 |
M | Males | 309 |
T | Total | 309 |
Data - Eurostat
%>%
earn_ses14_rhr left_join(sex, by = "sex") %>%
group_by(sex, Sex) %>%
summarise(Nobs = n()) %>%
arrange(-Nobs) %>%
if (is_html_output()) print_table(.) else .} {
sex | Sex | Nobs |
---|---|---|
F | Females | 312 |
M | Males | 309 |
T | Total | 309 |
%>%
earn_ses14_rhr left_join(unit, by = "unit") %>%
group_by(unit, Unit) %>%
summarise(Nobs = n()) %>%
arrange(-Nobs) %>%
if (is_html_output()) datatable(., filter = 'top', rownames = F) else .} {
%>%
earn_ses14_rhr left_join(geo, by = "geo") %>%
group_by(geo, Geo) %>%
summarise(Nobs = n()) %>%
arrange(-Nobs) %>%
if (is_html_output()) datatable(., filter = 'top', rownames = F) else .} {
%>%
earn_ses14_rhr group_by(time) %>%
summarise(Nobs = n()) %>%
if (is_html_output()) print_table(.) else .} {
time | Nobs |
---|---|
2014 | 930 |
%>%
earn_ses14_rhr filter(sex == "T") %>%
left_join(geo, by = "geo") %>%
left_join(unit, by = "unit") %>%
select(geo, Geo, Unit, values) %>%
%>%
na.omit mutate(Geo = ifelse(geo == "DE", "Germany", Geo),
values = round(values, 1)) %>%
spread(Unit, values) %>%
if (is_html_output()) datatable(., filter = 'top', rownames = F) else .} {
%>%
earn_ses14_rhr filter(sex == "T",
== "EUR") %>%
unit left_join(geo, by = "geo") %>%
select(geo, Geo, values) %>%
right_join(europe_NUTS1, by = "geo") %>%
filter(long >= -15, lat >= 33) %>%
ggplot(., aes(x = long, y = lat, group = group, fill = values)) +
geom_polygon() + coord_map() +
scale_fill_viridis_c(na.value = "white",
labels = scales::dollar_format(accuracy = 1, prefix = "", suffix = "€"),
breaks = seq(0, 100, 5),
values = c(0, 0.1, 0.2, 0.3, 0.4, 0.5, 1)) +
theme_void() + theme(legend.position = c(0.25, 0.85)) +
labs(fill = "Avg Wage")
%>%
earn_ses14_rhr filter(sex == "M",
== "EUR") %>%
unit left_join(geo, by = "geo") %>%
select(geo, Geo, values) %>%
right_join(europe_NUTS1, by = "geo") %>%
filter(long >= -15, lat >= 33) %>%
ggplot(., aes(x = long, y = lat, group = group, fill = values)) +
geom_polygon() + coord_map() +
scale_fill_viridis_c(na.value = "white",
labels = scales::dollar_format(accuracy = 1, prefix = "", suffix = "€"),
breaks = seq(0, 100, 5),
values = c(0, 0.1, 0.2, 0.3, 0.4, 0.5, 1)) +
theme_void() + theme(legend.position = c(0.25, 0.85)) +
labs(fill = "Avg Wage")
%>%
earn_ses14_rhr filter(sex == "F",
== "EUR") %>%
unit left_join(geo, by = "geo") %>%
select(geo, Geo, values) %>%
right_join(europe_NUTS1, by = "geo") %>%
filter(long >= -15, lat >= 33) %>%
ggplot(., aes(x = long, y = lat, group = group, fill = values)) +
geom_polygon() + coord_map() +
scale_fill_viridis_c(na.value = "white",
labels = scales::dollar_format(accuracy = 1, prefix = "", suffix = "€"),
breaks = seq(0, 100, 5),
values = c(0, 0.1, 0.2, 0.3, 0.4, 0.5, 1)) +
theme_void() + theme(legend.position = c(0.25, 0.85)) +
labs(fill = "Avg Wage")