Code
%>%
hlth_cd_ycdr2 left_join(unit, by = "unit") %>%
group_by(unit, Unit) %>%
summarise(Nobs = n()) %>%
arrange(-Nobs) %>%
if (is_html_output()) print_table(.) else .} {
unit | Unit | Nobs |
---|---|---|
RT | Rate | 29763194 |
Data - Eurostat
%>%
hlth_cd_ycdr2 left_join(unit, by = "unit") %>%
group_by(unit, Unit) %>%
summarise(Nobs = n()) %>%
arrange(-Nobs) %>%
if (is_html_output()) print_table(.) else .} {
unit | Unit | Nobs |
---|---|---|
RT | Rate | 29763194 |
%>%
hlth_cd_ycdr2 left_join(sex, by = "sex") %>%
group_by(sex, Sex) %>%
summarise(Nobs = n()) %>%
arrange(-Nobs) %>%
if (is_html_output()) print_table(.) else .} {
sex | Sex | Nobs |
---|---|---|
T | Total | 10275226 |
F | Females | 9807981 |
M | Males | 9679987 |
%>%
hlth_cd_ycdr2 left_join(age, by = "age") %>%
group_by(age, Age) %>%
summarise(Nobs = n()) %>%
arrange(-Nobs) %>%
if (is_html_output()) datatable(., filter = 'top', rownames = F) else .} {
%>%
hlth_cd_ycdr2 left_join(icd10, by = "icd10") %>%
group_by(icd10, Icd10) %>%
summarise(Nobs = n()) %>%
arrange(-Nobs) %>%
if (is_html_output()) datatable(., filter = 'top', rownames = F) else .} {
%>%
hlth_cd_ycdr2 left_join(geo, by = "geo") %>%
group_by(geo, Geo) %>%
summarise(Nobs = n()) %>%
arrange(-Nobs) %>%
if (is_html_output()) datatable(., filter = 'top', rownames = F) else .} {
%>%
hlth_cd_ycdr2 group_by(time) %>%
summarise(Nobs = n()) %>%
arrange(-Nobs) %>%
if (is_html_output()) datatable(., filter = 'top', rownames = F) else .} {
%>%
hlth_cd_ycdr2 filter(time == "2015",
== "TOTAL",
age == "T",
sex == "FR") %>%
geo left_join(icd10, by = "icd10") %>%
select(icd10, Icd10, values) %>%
if (is_html_output()) datatable(., filter = 'top', rownames = F) else .} {
%>%
hlth_cd_ycdr2 filter(time == "2015",
== "TOTAL",
age == "T",
sex %in% c("X60-X84_Y870", "A-R_V-Y")) %>%
icd10 left_join(geo, by = "geo") %>%
select(geo, Geo, icd10, values) %>%
spread(icd10, values) %>%
mutate(`%` = round(100*`X60-X84_Y870`/`A-R_V-Y`, 2)) %>%
arrange(-`%`) %>%
if (is_html_output()) datatable(., filter = 'top', rownames = F) else .} {
%>%
hlth_cd_ycdr2 filter(time == "2015",
== "TOTAL",
age == "T",
sex %in% c("X60-X84_Y870", "A-R_V-Y")) %>%
icd10 left_join(geo, by = "geo") %>%
select(geo, Geo, icd10, values) %>%
spread(icd10, values) %>%
right_join(europe_NUTS2, by = "geo") %>%
filter(long >= -13.5, lat >= 33) %>%
ggplot(., aes(x = long, y = lat, group = group, fill = `X60-X84_Y870`/`A-R_V-Y`)) +
geom_polygon() + coord_map() +
scale_fill_viridis_c(na.value = "white",
labels = scales::percent_format(accuracy = .1),
breaks = 0.01*seq(0, 100, 0.5),
values = c(0, 0.1, 0.3, 0.4, 0.5, 0.6, 1)) +
theme_void() + theme(legend.position = c(0.15, 0.85)) +
labs(fill = "Employment \nPrimary Education (%)")
%>%
hlth_cd_ycdr2 filter(time == "2013",
== "TOTAL",
age == "T",
sex %in% c("X60-X84_Y870", "A-R_V-Y")) %>%
icd10 left_join(geo, by = "geo") %>%
select(geo, Geo, icd10, values) %>%
spread(icd10, values) %>%
right_join(europe_NUTS2, by = "geo") %>%
filter(long >= -13.5, lat >= 33) %>%
ggplot(., aes(x = long, y = lat, group = group, fill = `X60-X84_Y870`/`A-R_V-Y`)) +
geom_polygon() + coord_map() +
scale_fill_viridis_c(na.value = "white",
labels = scales::percent_format(accuracy = .1),
breaks = 0.01*seq(0, 100, 0.5),
values = c(0, 0.1, 0.3, 0.4, 0.5, 0.6, 1)) +
theme_void() + theme(legend.position = c(0.15, 0.85)) +
labs(fill = "Employment \nPrimary Education (%)")