Unemployment rate - 3 year average - tipsun10

Data - Eurostat

Info

DOWNLOAD_TIME

Code
tibble(DOWNLOAD_TIME = as.Date(file.info("~/Library/Mobile\ Documents/com~apple~CloudDocs/website/data/eurostat/tipsun10.RData")$mtime)) %>%
  print_table_conditional()
DOWNLOAD_TIME
2024-11-21

Last

Code
tipsun10 %>%
  group_by(time) %>%
  summarise(Nobs = n()) %>%
  arrange(desc(time)) %>%
  head(1) %>%
  print_table_conditional()
time Nobs
2023 29

geo

All

Code
tipsun10 %>%
  left_join(geo, by = "geo") %>%
  group_by(geo, Geo) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  mutate(Geo = ifelse(geo == "DE", "Germany", Geo)) %>%
  mutate(Flag = gsub(" ", "-", str_to_lower(Geo)),
         Flag = paste0('<img src="../../bib/flags/vsmall/', Flag, '.png" alt="Flag">')) %>%
  select(Flag, everything()) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F, escape = F) else .}

Eurozone (19 countries)

Code
tipsun10 %>%
  left_join(geo, by = "geo") %>%
  filter(Geo %in% c("Austria", "Belgium", "Cyprus", "Estonia", "Finland", "France", 
                    "Germany", "Greece", "Ireland", "Italy", "Latvia", "Lithuania", 
                    "Luxembourg", "Malta", "Netherlands", "Portugal", "Slovakia",
                    "Slovenia", "Spain")) %>%
  group_by(geo, Geo) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  mutate(Geo = ifelse(geo == "DE", "Germany", Geo)) %>%
  mutate(Flag = gsub(" ", "-", str_to_lower(Geo)),
         Flag = paste0('<img src="../../bib/flags/vsmall/', Flag, '.png" alt="Flag">')) %>%
  select(Flag, everything()) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F, escape = F) else .}

Non Eurozone (8 countries)

Code
tipsun10 %>%
  left_join(geo, by = "geo") %>%
  filter(Geo %in% c("Bulgaria", "Croatia", "Czechia", "Denmark", 
                    "Hungary", "Poland", "Romania", "Sweden")) %>%
  group_by(geo, Geo) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  mutate(Geo = ifelse(geo == "DE", "Germany", Geo)) %>%
  mutate(Flag = gsub(" ", "-", str_to_lower(Geo)),
         Flag = paste0('<img src="../../bib/flags/vsmall/', Flag, '.png" alt="Flag">')) %>%
  select(Flag, everything()) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F, escape = F) else .}

time

Code
tipsun10 %>%
  group_by(time) %>%
  summarise(Nobs = n()) %>%
  print_table_conditional()
time Nobs
2005 1
2006 1
2007 2
2008 2
2009 2
2010 5
2011 29
2012 29
2013 29
2014 29
2015 29
2016 29
2017 29
2018 29
2019 29
2020 29
2021 29
2022 29
2023 29

France, Germany, Italy, Spain, Portugal

Code
tipsun10 %>%
  filter(geo %in% c("FR", "DE", "PT", "ES", "IT")) %>%
  year_to_date %>%
  left_join(geo, by = "geo") %>%
  left_join(colors, by = c("Geo" = "country")) %>%
  mutate(values = values/100) %>%
  ggplot + geom_line(aes(x = date, y = values, color = color)) + theme_minimal() +
  scale_color_identity() + add_5flags +
  scale_x_date(breaks = as.Date(paste0(seq(1960, 2100, 2), "-01-01")),
               labels = date_format("%Y")) +
  xlab("") + ylab("Unemployment, Percentage of active population") +
  scale_y_continuous(breaks = 0.01*seq(0, 200, 1),
                     labels = scales::percent_format(accuracy = 1)) +
  geom_hline(yintercept = 0.1, linetype = "dashed")

France, Germany, Portugal

Code
tipsun10 %>%
  filter(geo %in% c("FR", "DE", "PT")) %>%
  year_to_date %>%
  left_join(geo, by = "geo") %>%
  left_join(colors, by = c("Geo" = "country")) %>%
  mutate(values = values/100) %>%
  ggplot + geom_line(aes(x = date, y = values, color = color)) + theme_minimal() +
  scale_color_identity() + add_3flags +
  scale_x_date(breaks = as.Date(paste0(seq(1960, 2100, 2), "-01-01")),
               labels = date_format("%Y")) +
  xlab("") + ylab("Unemployment, Percentage of active population") +
  scale_y_continuous(breaks = 0.01*seq(0, 200, 1),
                     labels = scales::percent_format(accuracy = 1)) +
  geom_hline(yintercept = 0.1, linetype = "dashed")

Poland, Hungary, Slovenia

Code
tipsun10 %>%
  filter(geo %in% c("PL", "HU", "SI")) %>%
  year_to_date %>%
  left_join(geo, by = "geo") %>%
  left_join(colors, by = c("Geo" = "country")) %>%
  mutate(values = values/100) %>%
  ggplot + geom_line(aes(x = date, y = values, color = color)) + theme_minimal() +
  scale_color_identity() + add_3flags +
  scale_x_date(breaks = as.Date(paste0(seq(1960, 2100, 2), "-01-01")),
               labels = date_format("%Y")) +
  xlab("") + ylab("Unemployment, Percentage of active population") +
  scale_y_continuous(breaks = 0.01*seq(0, 200, 1),
                     labels = scales::percent_format(accuracy = 1)) +
  geom_hline(yintercept = 0.1, linetype = "dashed")

Mean, Standard Deviation

All

Viridis

Code
tipsun10 %>%
  year_to_date %>%
  filter(date >= as.Date("2005-01-01")) %>%
  group_by(date) %>%
  summarise(`Moyenne` = mean(values),
            `Ecart Type` = sd(values)) %>%
  transmute(date, `Moyenne`,
            `Moyenne + SD` = `Moyenne` + `Ecart Type`,
            `Moyenne - SD` = `Moyenne` - `Ecart Type`) %>%
  gather(variable, value, -date) %>%
  mutate(value = value/100) %>%
  ggplot + geom_line(aes(x = date, y = value, color = variable, linetype = variable)) +
  theme_minimal() + xlab("") + ylab("") +
  scale_color_manual(values = c(viridis(3)[1], viridis(3)[2], viridis(3)[2])) +
  scale_linetype_manual(values = c("solid", "dashed", "dashed")) +
  scale_x_date(breaks = as.Date(paste0(seq(1960, 2100, 2), "-01-01")),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(0, 200, 1),
                     labels = scales::percent_format(accuracy = 1)) +
  theme(legend.position = c(0.25, 0.9),
        legend.title = element_blank()) +
  geom_hline(yintercept = 0.1, linetype = "dashed")

Colors

Code
tipsun10 %>%
  year_to_date %>%
  filter(date >= as.Date("2005-01-01")) %>%
  group_by(date) %>%
  summarise(`Moyenne` = mean(values),
            `Ecart Type` = sd(values)) %>%
  transmute(date, `Moyenne`,
            `Moyenne + SD` = `Moyenne` + `Ecart Type`,
            `Moyenne - SD` = `Moyenne` - `Ecart Type`) %>%
  gather(variable, value, -date) %>%
  mutate(value = value/100) %>%
  ggplot + geom_line(aes(x = date, y = value, color = variable, linetype = variable)) +
  theme_minimal() + xlab("") + ylab("") +
  scale_color_manual(values = c("#003399", "#FFCC00", "#FFCC00")) +
  scale_linetype_manual(values = c("solid", "dashed", "dashed")) +
  scale_x_date(breaks = as.Date(paste0(seq(1960, 2100, 1), "-01-01")),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(0, 200, 1),
                     labels = scales::percent_format(accuracy = 1)) +
  theme(legend.position = c(0.25, 0.9),
        legend.title = element_blank()) +
  geom_hline(yintercept = 0.1, linetype = "dashed")

With France

Code
tipsun10 %>%
  year_to_date %>%
  filter(date >= as.Date("2005-01-01")) %>%
  group_by(date) %>%
  summarise(`Moyenne Europe` = mean(values),
            `Ecart Type` = sd(values),
            `France` = values[geo == "FR"]) %>%
  transmute(date, `Moyenne Europe`,
            `Moyenne Europe + SD` = `Moyenne Europe` + `Ecart Type`,
            `Moyenne Europe - SD` = `Moyenne Europe` - `Ecart Type`,
             `France`) %>%
  gather(variable, value, -date) %>%
  mutate(values = value/100,
         Geo = ifelse(variable == "France", "France", "Europe")) %>%
  ggplot + geom_line(aes(x = date, y = values, color = variable, linetype = variable)) +
  theme_minimal() + xlab("") + ylab("") + add_4flags +
  scale_color_manual(values = c("#ED2939", "#003399", "#FFCC00", "#FFCC00")) +
  scale_linetype_manual(values = c("solid", "solid", "dashed", "dashed")) +
  scale_x_date(breaks = as.Date(paste0(seq(1960, 2100, 1), "-01-01")),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(0, 200, 1),
                     labels = scales::percent_format(accuracy = 1)) +
  theme(legend.position = c(0.25, 0.9),
        legend.title = element_blank()) +
  geom_hline(yintercept = 0.1, linetype = "dashed")

With Germany

Code
tipsun10 %>%
  year_to_date %>%
  filter(date >= as.Date("2005-01-01")) %>%
  group_by(date) %>%
  summarise(`Moyenne Europe` = mean(values),
            `Ecart Type` = sd(values),
            `France` = values[geo == "FR"],
            `Allemagne` = values[geo == "DE"]) %>%
  transmute(date, `Moyenne Europe`,
            `Moyenne Europe + SD` = `Moyenne Europe` + `Ecart Type`,
            `Moyenne Europe - SD` = `Moyenne Europe` - `Ecart Type`,
             `France`,
             `Allemagne`) %>%
  gather(variable, value, -date) %>%
  mutate(values = value/100,
         Geo = ifelse(variable == "France", "France", "Europe"),
         Geo = ifelse(variable == "Allemagne", "Germany", Geo)) %>%
  ggplot + geom_line(aes(x = date, y = values, color = variable, linetype = variable)) +
  theme_minimal() + xlab("") + ylab("") + add_5flags +
  scale_color_manual(values = c("#000000", "#ED2939", "#003399", "#FFCC00", "#FFCC00")) +
  scale_linetype_manual(values = c("solid", "solid", "solid", "dashed", "dashed")) +
  scale_x_date(breaks = as.Date(paste0(seq(1960, 2100, 1), "-01-01")),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 0.01*seq(0, 200, 1),
                     labels = scales::percent_format(accuracy = 1)) +
  theme(legend.position = c(0.15, 0.85),
        legend.title = element_blank()) +
  geom_hline(yintercept = 0.1, linetype = "dashed")