Employment by activities and status (ALFS)

Data - OECD

Info

source dataset Title .html .rData
oecd ALFS_EMP Employment by activities and status (ALFS) 2026-08-11 2026-08-02

Data on employment

source dataset Title .html .rData
oecd STLABOUR Short-Term Labour Market Statistics 2026-08-12 2026-08-02
bls jt NA NA NA
bls la NA NA NA
bls ln NA NA NA
eurostat nama_10_a10_e Employment by A*10 industry breakdowns 2026-08-11 2026-08-11
eurostat nama_10_a64_e National accounts employment data by industry (up to NACE A*64) 2026-08-11 2026-08-11
eurostat namq_10_a10_e Employment A*10 industry breakdowns 2026-08-12 2026-08-11
eurostat une_rt_m Unemployment by sex and age – monthly data 2026-08-12 2026-08-11
oecd ALFS_EMP Employment by activities and status (ALFS) 2026-08-11 2026-08-02
oecd EPL_T Strictness of employment protection – temporary contracts 2026-08-11 2026-08-02
oecd LFS_SEXAGE_I_R LFS by sex and age - indicators 2026-08-11 2026-08-02

Data on industry

source dataset Title .html .rData
oecd ALFS_EMP Employment by activities and status (ALFS) 2026-08-11 2026-08-02
ec INDUSTRY Industry (sector data) 2026-08-11 2026-08-01
eurostat ei_isin_m Industry - monthly data - index (2015 = 100) (NACE Rev. 2) - ei_isin_m 2026-08-11 2026-08-11
eurostat htec_trd_group4 High-tech trade by high-tech group of products in million euro (from 2007, SITC Rev. 4) 2026-08-11 2026-08-11
eurostat nama_10_a64 National accounts aggregates by industry (up to NACE A*64) 2026-08-11 2026-08-11
eurostat nama_10_a64_e National accounts employment data by industry (up to NACE A*64) 2026-08-11 2026-08-11
eurostat namq_10_a10_e Employment A*10 industry breakdowns 2026-08-12 2026-08-11
eurostat road_eqr_carmot New registrations of passenger cars by type of motor energy and engine size - road_eqr_carmot 2026-08-12 2026-08-11
eurostat sts_inpp_m Producer prices in industry, total - monthly data 2026-08-12 2026-08-11
eurostat sts_inppd_m Producer prices in industry, domestic market - monthly data 2026-08-12 2026-08-11
eurostat sts_inpr_m Production in industry - monthly data 2026-08-12 2026-08-11
eurostat sts_intvnd_m Turnover in industry, non domestic market - monthly data - sts_intvnd_m 2026-08-12 2026-08-11
fred industry Manufacturing, Industry 2026-08-11 2026-08-11
oecd BERD_MA_SOF Business enterprise R&D expenditure by main activity (focussed) and source of funds 2026-08-11 2026-08-02
oecd GBARD_NABS2007 Government budget allocations for R and D 2026-08-11 2026-08-02
oecd MEI_REAL Production and Sales (MEI) 2026-08-11 2026-08-02
oecd MSTI_PUB Main Science and Technology Indicators 2026-08-11 2026-08-02
oecd SNA_TABLE4 PPPs and exchange rates 2026-08-12 2026-08-02
wdi NV.IND.EMPL.KD Industry, value added per worker (constant 2010 USD) 2026-08-11 2026-08-11
wdi NV.IND.MANF.CD Manufacturing, value added (current USD) 2026-08-11 2026-08-11
wdi NV.IND.MANF.ZS Manufacturing, value added (% of GDP) 2026-08-11 2026-08-11
wdi NV.IND.TOTL.KD Industry (including construction), value added (constant 2015 USD) - NV.IND.TOTL.KD 2026-08-11 2026-08-11
wdi NV.IND.TOTL.ZS Industry, value added (including construction) (% of GDP) 2026-08-11 2026-08-11
wdi SL.IND.EMPL.ZS Employment in industry (% of total employment) 2026-08-11 2026-08-11
wdi TX.VAL.MRCH.CD.WT Merchandise exports (current USD) 2026-08-11 2026-08-11

LAST_COMPILE

LAST_COMPILE
2026-08-13

Last

TIME_PERIOD Nobs
2022 3160

SUBJECT

Code
ALFS_EMP |>
  left_join(ALFS_EMP_var$SUBJECT, by = "SUBJECT") |>
  group_by(SUBJECT, Subject) |>
  summarise(Nobs = n()) |>
  arrange(-Nobs) |>
  print_table_conditional()

SEX

Code
ALFS_EMP |>
  left_join(ALFS_EMP_var$SEX, by = "SEX") |>
  group_by(SEX, Sex) |>
  summarise(Nobs = n()) |>
  arrange(-Nobs) |>
  print_table_conditional()
SEX Sex Nobs
TT All persons 22655
FE Females 15627
MA Males 13936

LOCATION

Code
ALFS_EMP |>
  left_join(ALFS_EMP_var$LOCATION, by = "LOCATION") |>
  group_by(LOCATION, Location) |>
  summarise(Nobs = n()) |>
  arrange(-Nobs) |>
  mutate(Flag = gsub(" ", "-", str_to_lower(gsub(" ", "-", Location))),
         Flag = paste0('<img src="../../icon/flag/vsmall/', Flag, '.png" alt="Flag">')) |>
  select(Flag, everything()) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F, escape = F) else .}

Individual countries

United States

Table

Code
ALFS_EMP |>
  filter(SEX == "TT",
         LOCATION == "USA",
         TIME_PERIOD %in% paste0(seq(1958, 2018, 20))) |>
  left_join(ALFS_EMP_var$SUBJECT, by = "SUBJECT") |>
  select(SUBJECT, Subject, TIME_PERIOD, obsValue) |>
  spread(TIME_PERIOD, obsValue) |>
  print_table_conditional()

Agriculture

Code
ALFS_EMP |>
  left_join(ALFS_EMP_var$SUBJECT, by = "SUBJECT") |>
  filter(SEX == "TT",
         LOCATION == "USA",
         grepl("Agriculture", Subject)) |>
  year_to_date() |>
  ggplot() + theme_minimal() + xlab("") + ylab("Employment in Agriculture") +
  geom_line(aes(x = date, y = obsValue, color = paste0(SUBJECT, " - ", Subject))) + 
  scale_x_date(breaks = seq(1950, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = seq(0, 80000, 500),
                     labels = dollar_format(accuracy = 1, prefix = "")) +
  
  theme(legend.position = c(0.7, 0.80),
        legend.title = element_blank())

Industry

Code
ALFS_EMP |>
  left_join(ALFS_EMP_var$SUBJECT, by = "SUBJECT") |>
  filter(SEX == "TT",
         LOCATION == "USA",
         grepl("Industry", Subject)) |>
  year_to_date() |>
  ggplot() + theme_minimal() + xlab("") + ylab("Employment in Manufacturing") +
  geom_line(aes(x = date, y = obsValue, color = paste0(SUBJECT, " - ", Subject))) + 
  scale_x_date(breaks = seq(1950, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = seq(0, 80000, 500),
                     labels = dollar_format(accuracy = 1, prefix = "")) +
  
  theme(legend.position = c(0.7, 0.80),
        legend.title = element_blank())

Manufacturing

Code
ALFS_EMP |>
  left_join(ALFS_EMP_var$SUBJECT, by = "SUBJECT") |>
  filter(SEX == "TT",
         LOCATION == "USA",
         grepl("Manufacturing", Subject)) |>
  year_to_date() |>
  ggplot() + theme_minimal() + xlab("") + ylab("Employment in Manufacturing") +
  geom_line(aes(x = date, y = obsValue, color = paste0(SUBJECT, " - ", Subject))) + 
  scale_x_date(breaks = seq(1950, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = seq(0, 80000, 500),
                     labels = dollar_format(accuracy = 1, prefix = "")) +
  
  theme(legend.position = c(0.7, 0.80),
        legend.title = element_blank())

Construction

Code
ALFS_EMP |>
  left_join(ALFS_EMP_var$SUBJECT, by = "SUBJECT") |>
  filter(SEX == "TT",
         LOCATION == "USA",
         grepl("Construction", Subject)) |>
  year_to_date() |>
  ggplot() + theme_minimal() + xlab("") + ylab("Employment in Construction") +
  geom_line(aes(x = date, y = obsValue, color = paste0(SUBJECT, " - ", Subject))) + 
  scale_x_date(breaks = seq(1940, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = seq(0, 8000, 100),
                     labels = dollar_format(accuracy = 1, prefix = "")) +
  
  theme(legend.position = c(0.7, 0.80),
        legend.title = element_blank())

All activities

Code
ALFS_EMP |>
  left_join(ALFS_EMP_var$SUBJECT, by = "SUBJECT") |>
  filter(SEX == "TT",
         LOCATION == "USA",
         grepl("all activities", Subject),
         !(SUBJECT %in% c("YS99TTL4_ST", "YS99TTL3_ST"))) |>
  year_to_date() |>
  ggplot() + theme_minimal() + xlab("") + ylab("Total Employment") +
  geom_line(aes(x = date, y = obsValue, color = paste0(SUBJECT, " - ", Subject))) + 
  scale_x_date(breaks = seq(1940, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = seq(0, 100000, 2000),
                     labels = dollar_format(accuracy = 1, prefix = "")) +
  
  theme(legend.position = c(0.4, 0.80),
        legend.title = element_blank())

United Kingdom

Table

Code
ALFS_EMP |>
  filter(SEX == "TT",
         LOCATION == "GBR",
         TIME_PERIOD %in% paste0(seq(1958, 2018, 20))) |>
  left_join(ALFS_EMP_var$SUBJECT, by = "SUBJECT") |>
  select(SUBJECT, Subject, TIME_PERIOD, obsValue) |>
  spread(TIME_PERIOD, obsValue) |>
  print_table_conditional()

Agriculture

Code
ALFS_EMP |>
  left_join(ALFS_EMP_var$SUBJECT, by = "SUBJECT") |>
  filter(SEX == "TT",
         LOCATION == "GBR",
         grepl("Agriculture", Subject)) |>
  year_to_date() |>
  ggplot() + theme_minimal() + xlab("") + ylab("Employment in Agriculture") +
  geom_line(aes(x = date, y = obsValue, color = paste0(SUBJECT, " - ", Subject))) + 
  scale_x_date(breaks = seq(1950, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = seq(0, 80000, 500),
                     labels = dollar_format(accuracy = 1, prefix = "")) +
  #
  theme(legend.position = c(0.7, 0.80),
        legend.title = element_blank())

Industry

Code
ALFS_EMP |>
  left_join(ALFS_EMP_var$SUBJECT, by = "SUBJECT") |>
  filter(SEX == "TT",
         LOCATION == "GBR",
         grepl("Industry", Subject)) |>
  year_to_date() |>
  ggplot() + theme_minimal() + xlab("") + ylab("Employment in Manufacturing") +
  geom_line(aes(x = date, y = obsValue, color = paste0(SUBJECT, " - ", Subject))) + 
  scale_x_date(breaks = seq(1950, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = seq(0, 80000, 500),
                     labels = dollar_format(accuracy = 1, prefix = "")) +
  #
  theme(legend.position = c(0.7, 0.80),
        legend.title = element_blank())

Manufacturing

Code
ALFS_EMP |>
  left_join(ALFS_EMP_var$SUBJECT, by = "SUBJECT") |>
  filter(SEX == "TT",
         LOCATION == "GBR",
         grepl("Manufacturing", Subject)) |>
  year_to_date() |>
  ggplot() + theme_minimal() + xlab("") + ylab("Employment in Manufacturing") +
  geom_line(aes(x = date, y = obsValue, color = paste0(SUBJECT, " - ", Subject))) + 
  scale_x_date(breaks = seq(1950, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = seq(0, 80000, 500),
                     labels = dollar_format(accuracy = 1, prefix = "")) +
  
  theme(legend.position = c(0.7, 0.80),
        legend.title = element_blank())

Construction

Code
ALFS_EMP |>
  left_join(ALFS_EMP_var$SUBJECT, by = "SUBJECT") |>
  filter(SEX == "TT",
         LOCATION == "USA",
         grepl("Construction", Subject)) |>
  year_to_date() |>
  ggplot() + theme_minimal() + xlab("") + ylab("Employment in Construction") +
  geom_line(aes(x = date, y = obsValue, color = paste0(SUBJECT, " - ", Subject))) + 
  scale_x_date(breaks = seq(1940, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = seq(0, 8000, 100),
                     labels = dollar_format(accuracy = 1, prefix = "")) +
  
  theme(legend.position = c(0.7, 0.80),
        legend.title = element_blank())

All activities

Code
ALFS_EMP |>
  left_join(ALFS_EMP_var$SUBJECT, by = "SUBJECT") |>
  filter(SEX == "TT",
         LOCATION == "USA",
         grepl("all activities", Subject),
         !(SUBJECT %in% c("YS99TTL4_ST", "YS99TTL3_ST"))) |>
  year_to_date() |>
  ggplot() + theme_minimal() + xlab("") + ylab("Total Employment") +
  geom_line(aes(x = date, y = obsValue, color = paste0(SUBJECT, " - ", Subject))) + 
  scale_x_date(breaks = seq(1940, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = seq(0, 500000, 2000),
                     labels = dollar_format(accuracy = 1, prefix = "")) +
  
  theme(legend.position = c(0.4, 0.80),
        legend.title = element_blank())

France

Table

Code
ALFS_EMP |>
  filter(SEX == "TT",
         LOCATION == "FRA",
         TIME_PERIOD %in% paste0(seq(1958, 2018, 20))) |>
  left_join(ALFS_EMP_var$SUBJECT, by = "SUBJECT") |>
  select(SUBJECT, Subject, TIME_PERIOD, obsValue) |>
  spread(TIME_PERIOD, obsValue) |>
  print_table_conditional()

Agriculture

Code
ALFS_EMP |>
  left_join(ALFS_EMP_var$SUBJECT, by = "SUBJECT") |>
  filter(SEX == "TT",
         LOCATION == "FRA",
         grepl("Agriculture", Subject)) |>
  year_to_date() |>
  ggplot() + theme_minimal() + xlab("") + ylab("Employment in Agriculture") +
  geom_line(aes(x = date, y = obsValue, color = paste0(SUBJECT, " - ", Subject))) + 
  scale_x_date(breaks = seq(1950, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = seq(0, 8000, 500),
                     labels = dollar_format(accuracy = 1, prefix = "")) +
  
  theme(legend.position = c(0.7, 0.80),
        legend.title = element_blank())

Manufacturing

Code
ALFS_EMP |>
  left_join(ALFS_EMP_var$SUBJECT, by = "SUBJECT") |>
  filter(SEX == "TT",
         LOCATION == "FRA",
         grepl("Manufacturing", Subject)) |>
  year_to_date() |>
  ggplot() + theme_minimal() + xlab("") + ylab("Employment in Manufacturing") +
  geom_line(aes(x = date, y = obsValue, color = paste0(SUBJECT, " - ", Subject))) + 
  scale_x_date(breaks = seq(1950, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = seq(0, 8000, 500),
                     labels = dollar_format(accuracy = 1, prefix = "")) +
  
  theme(legend.position = c(0.7, 0.80),
        legend.title = element_blank())

Construction

Code
ALFS_EMP |>
  left_join(ALFS_EMP_var$SUBJECT, by = "SUBJECT") |>
  filter(SEX == "TT",
         LOCATION == "FRA",
         grepl("Construction", Subject)) |>
  year_to_date() |>
  ggplot() + theme_minimal() + xlab("") + ylab("Employment in Manufacturing") +
  geom_line(aes(x = date, y = obsValue, color = paste0(SUBJECT, " - ", Subject))) + 
  scale_x_date(breaks = seq(1940, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = seq(0, 8000, 100),
                     labels = dollar_format(accuracy = 1, prefix = "")) +
  
  theme(legend.position = c(0.7, 0.80),
        legend.title = element_blank())

All activities

Code
ALFS_EMP |>
  left_join(ALFS_EMP_var$SUBJECT, by = "SUBJECT") |>
  filter(SEX == "TT",
         LOCATION == "FRA",
         grepl("all activities", Subject),
         !(SUBJECT %in% c("YS99TTL4_ST", "YS99TTL3_ST"))) |>
  year_to_date() |>
  ggplot() + theme_minimal() + xlab("") + ylab("Total Employment") +
  geom_line(aes(x = date, y = obsValue, color = paste0(SUBJECT, " - ", Subject))) + 
  scale_x_date(breaks = seq(1940, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = seq(0, 100000, 2000),
                     labels = dollar_format(accuracy = 1, prefix = "")) +
  
  theme(legend.position = c(0.4, 0.80),
        legend.title = element_blank())

Germany

Table

Code
ALFS_EMP |>
  filter(SEX == "TT",
         LOCATION == "DEU",
         TIME_PERIOD %in% paste0(seq(1958, 2018, 20))) |>
  left_join(ALFS_EMP_var$SUBJECT, by = "SUBJECT") |>
  select(SUBJECT, Subject, TIME_PERIOD, obsValue) |>
  spread(TIME_PERIOD, obsValue) |>
  print_table_conditional()

Manufacturing

Code
ALFS_EMP |>
  left_join(ALFS_EMP_var$SUBJECT, by = "SUBJECT") |>
  year_to_date() |>
  filter(SEX == "TT",
         LOCATION == "DEU",
         grepl("Manufacturing", Subject),
         date >= as.Date("1958-01-01")) |>
  ggplot() + theme_minimal() + xlab("") + ylab("Employment in Manufacturing") +
  geom_line(aes(x = date, y = obsValue, color = paste0(SUBJECT, " - ", Subject))) + 
  scale_x_date(breaks = seq(1940, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = seq(0, 20000, 500),
                     labels = dollar_format(accuracy = 1, prefix = "")) +
  
  theme(legend.position = c(0.7, 0.80),
        legend.title = element_blank())

Construction

Code
ALFS_EMP |>
  year_to_date() |>
  left_join(ALFS_EMP_var$SUBJECT, by = "SUBJECT") |>
  filter(SEX == "TT",
         LOCATION == "DEU",
         grepl("Construction", Subject),
         date >= as.Date("1961-01-01")) |>
  ggplot() + theme_minimal() + xlab("") + ylab("Employment in Construction") +
  geom_line(aes(x = date, y = obsValue, color = paste0(SUBJECT, " - ", Subject))) + 
  scale_x_date(breaks = seq(1940, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = seq(0, 8000, 100),
                     labels = dollar_format(accuracy = 1, prefix = "")) +
  
  theme(legend.position = c(0.3, 0.80),
        legend.title = element_blank())

All activities

Code
ALFS_EMP |>
  left_join(ALFS_EMP_var$SUBJECT, by = "SUBJECT") |>
  filter(SEX == "TT",
         LOCATION == "DEU",
         grepl("all activities", Subject),
         !(SUBJECT %in% c("YS99TTL4_ST", "YS99TTL3_ST"))) |>
  year_to_date() |>
  ggplot() + theme_minimal() + xlab("") + ylab("Total Employment") +
  geom_line(aes(x = date, y = obsValue, color = paste0(SUBJECT, " - ", Subject))) + 
  scale_x_date(breaks = seq(1940, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = seq(0, 100000, 2000),
                     labels = dollar_format(accuracy = 1, prefix = "")) +
  
  theme(legend.position = c(0.4, 0.80),
        legend.title = element_blank())

Italy

Table

Code
ALFS_EMP |>
  filter(SEX == "TT",
         LOCATION == "ITA",
         TIME_PERIOD %in% paste0(seq(1958, 2018, 20))) |>
  left_join(ALFS_EMP_var$SUBJECT, by = "SUBJECT") |>
  select(SUBJECT, Subject, TIME_PERIOD, obsValue) |>
  spread(TIME_PERIOD, obsValue) |>
  print_table_conditional()

Manufacturing

Code
ALFS_EMP |>
  left_join(ALFS_EMP_var$SUBJECT, by = "SUBJECT") |>
  filter(SEX == "TT",
         LOCATION == "ITA",
         grepl("Manufacturing", Subject)) |>
  year_to_date() |>
  ggplot() + theme_minimal() + xlab("") + ylab("Employment in Manufacturing") +
  geom_line(aes(x = date, y = obsValue, color = paste0(SUBJECT, " - ", Subject))) + 
  scale_x_date(breaks = seq(1940, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = seq(0, 8000, 500),
                     labels = dollar_format(accuracy = 1, prefix = "")) +
  
  theme(legend.position = c(0.7, 0.80),
        legend.title = element_blank())

Construction

Code
ALFS_EMP |>
  year_to_date() |>
  left_join(ALFS_EMP_var$SUBJECT, by = "SUBJECT") |>
  filter(SEX == "TT",
         LOCATION == "ITA",
         grepl("Construction", Subject),
         date >= as.Date("1961-01-01")) |>
  ggplot() + theme_minimal() + xlab("") + ylab("Employment in Construction") +
  geom_line(aes(x = date, y = obsValue, color = paste0(SUBJECT, " - ", Subject))) + 
  scale_x_date(breaks = seq(1940, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = seq(0, 8000, 100),
                     labels = dollar_format(accuracy = 1, prefix = "")) +
  
  theme(legend.position = c(0.3, 0.80),
        legend.title = element_blank())

All activities

Code
ALFS_EMP |>
  left_join(ALFS_EMP_var$SUBJECT, by = "SUBJECT") |>
  filter(SEX == "TT",
         LOCATION == "ITA",
         grepl("all activities", Subject),
         !(SUBJECT %in% c("YS99TTL4_ST", "YS99TTL3_ST"))) |>
  year_to_date() |>
  ggplot() + theme_minimal() + xlab("") + ylab("Total Employment") +
  geom_line(aes(x = date, y = obsValue, color = paste0(SUBJECT, " - ", Subject))) + 
  scale_x_date(breaks = seq(1940, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = seq(0, 100000, 2000),
                     labels = dollar_format(accuracy = 1, prefix = "")) +
  
  theme(legend.position = c(0.4, 0.80),
        legend.title = element_blank())

Spain

Table

Code
ALFS_EMP |>
  filter(SEX == "TT",
         LOCATION == "ESP",
         TIME_PERIOD %in% paste0(seq(1958, 2018, 20))) |>
  left_join(ALFS_EMP_var$SUBJECT, by = "SUBJECT") |>
  select(SUBJECT, Subject, TIME_PERIOD, obsValue) |>
  spread(TIME_PERIOD, obsValue) |>
  print_table_conditional()

Manufacturing

Code
ALFS_EMP |>
  left_join(ALFS_EMP_var$SUBJECT, by = "SUBJECT") |>
  filter(SEX == "TT",
         LOCATION == "ESP",
         grepl("Manufacturing", Subject)) |>
  year_to_date() |>
  ggplot() + theme_minimal() + xlab("") + ylab("Employment in Manufacturing") +
  geom_line(aes(x = date, y = obsValue, color = paste0(SUBJECT, " - ", Subject))) + 
  scale_x_date(breaks = seq(1940, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = seq(0, 8000, 500),
                     labels = dollar_format(accuracy = 1, prefix = "")) +
  
  theme(legend.position = c(0.7, 0.80),
        legend.title = element_blank())

Construction

Code
ALFS_EMP |>
  year_to_date() |>
  left_join(ALFS_EMP_var$SUBJECT, by = "SUBJECT") |>
  filter(SEX == "TT",
         LOCATION == "ESP",
         grepl("Construction", Subject),
         date >= as.Date("1961-01-01")) |>
  ggplot() + theme_minimal() + xlab("") + ylab("Employment in Construction") +
  geom_line(aes(x = date, y = obsValue, color = paste0(SUBJECT, " - ", Subject))) + 
  scale_x_date(breaks = seq(1940, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = seq(0, 8000, 100),
                     labels = dollar_format(accuracy = 1, prefix = "")) +
  
  theme(legend.position = c(0.3, 0.80),
        legend.title = element_blank())

All activities

Code
ALFS_EMP |>
  left_join(ALFS_EMP_var$SUBJECT, by = "SUBJECT") |>
  filter(SEX == "TT",
         LOCATION == "ESP",
         grepl("all activities", Subject),
         !(SUBJECT %in% c("YS99TTL4_ST", "YS99TTL3_ST"))) |>
  year_to_date() |>
  ggplot() + theme_minimal() + xlab("") + ylab("Total Employment") +
  geom_line(aes(x = date, y = obsValue, color = paste0(SUBJECT, " - ", Subject))) + 
  scale_x_date(breaks = seq(1940, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = seq(0, 100000, 2000),
                     labels = dollar_format(accuracy = 1, prefix = "")) +
  
  theme(legend.position = c(0.4, 0.80),
        legend.title = element_blank())

Japan

Table

Code
ALFS_EMP |>
  filter(SEX == "TT",
         LOCATION == "JPN",
         TIME_PERIOD %in% paste0(seq(1958, 2018, 20))) |>
  left_join(ALFS_EMP_var$SUBJECT, by = "SUBJECT") |>
  select(SUBJECT, Subject, TIME_PERIOD, obsValue) |>
  spread(TIME_PERIOD, obsValue) |>
  print_table_conditional()

Manufacturing

Code
ALFS_EMP |>
  left_join(ALFS_EMP_var$SUBJECT, by = "SUBJECT") |>
  filter(SEX == "TT",
         LOCATION == "JPN",
         grepl("Manufacturing", Subject)) |>
  year_to_date() |>
  ggplot() + theme_minimal() + xlab("") + ylab("Employment in Manufacturing") +
  geom_line(aes(x = date, y = obsValue, color = paste0(SUBJECT, " - ", Subject))) + 
  scale_x_date(breaks = seq(1940, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = seq(0, 20000, 1000),
                     labels = dollar_format(accuracy = 1, prefix = "")) +
  
  theme(legend.position = c(0.5, 0.25),
        legend.title = element_blank())

Construction

Code
ALFS_EMP |>
  year_to_date() |>
  left_join(ALFS_EMP_var$SUBJECT, by = "SUBJECT") |>
  filter(SEX == "TT",
         LOCATION == "JPN",
         grepl("Construction", Subject),
         date >= as.Date("1961-01-01")) |>
  ggplot() + theme_minimal() + xlab("") + ylab("Employment in Construction") +
  geom_line(aes(x = date, y = obsValue, color = paste0(SUBJECT, " - ", Subject))) + 
  scale_x_date(breaks = seq(1940, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = seq(0, 8000, 100),
                     labels = dollar_format(accuracy = 1, prefix = "")) +
  
  theme(legend.position = c(0.3, 0.80),
        legend.title = element_blank())

All activities

Code
ALFS_EMP |>
  left_join(ALFS_EMP_var$SUBJECT, by = "SUBJECT") |>
  filter(SEX == "TT",
         LOCATION == "JPN",
         grepl("all activities", Subject),
         !(SUBJECT %in% c("YS99TTL4_ST", "YS99TTL3_ST"))) |>
  year_to_date() |>
  ggplot() + theme_minimal() + xlab("") + ylab("Total Employment") +
  geom_line(aes(x = date, y = obsValue, color = paste0(SUBJECT, " - ", Subject))) + 
  scale_x_date(breaks = seq(1940, 2100, 5) |> paste0("-01-01") |> as.Date(),
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = seq(0, 100000, 2000),
                     labels = dollar_format(accuracy = 1, prefix = "")) +
  
  theme(legend.position = c(0.4, 0.80),
        legend.title = element_blank())

Manufacturing

Table

Code
ALFS_EMP |>
  # YA9903L1_ST: Employees in Industry (ISIC rev.2, 2-5)
  # YS99TTL2_ST: Employees in all activities
  filter(SUBJECT %in% c("YA9903L1_ST", "YS99TTL2_ST"), 
         SEX == "TT") |>
  select(LOCATION, SUBJECT, TIME_PERIOD, obsValue) |>
  spread(SUBJECT, obsValue) %>%
  mutate(share = (100*YA9903L1_ST/YS99TTL2_ST) |> round(digits = 1)) |>
  left_join(ALFS_EMP_var$LOCATION, by = "LOCATION") |>
  filter(!is.na(share)) |>
  mutate(share = paste0(share, " %")) |>
  group_by(Location) |>
  arrange(TIME_PERIOD) |>
  summarise(`Year 1` = first(TIME_PERIOD),
            `Year 2` = last(TIME_PERIOD),
            `Share 1` = first(share),
            `Share 2` = last(share)) |>
  mutate(Flag = gsub(" ", "-", str_to_lower(gsub(" ", "-", Location))),
         Flag = paste0('<img src="../../icon/flag/vsmall/', Flag, '.png" alt="Flag">')) |>
  select(Flag, everything()) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F, escape = F) else .}

Industry

Table

Code
ALFS_EMP |>
  # YW992IL1_ST: Employees in Industry (ISIC rev.2, 2-5)
  # YS99TTL2_ST: Employees in all activities
  filter(SUBJECT %in% c("YW992IL1_ST", "YS99TTL2_ST"), 
         SEX == "TT") |>
  select(LOCATION, SUBJECT, TIME_PERIOD, obsValue) |>
  spread(SUBJECT, obsValue) %>%
  mutate(share = (100*YW992IL1_ST/YS99TTL2_ST) |> round(digits = 1)) |>
  left_join(ALFS_EMP_var$LOCATION, by = "LOCATION") |>
  filter(!is.na(share)) |>
  mutate(share = paste0(share, " %")) |>
  group_by(Location) |>
  summarise(`Year 1` = first(TIME_PERIOD),
            `Year 2` = last(TIME_PERIOD),
            `Share 1` = first(share),
            `Share 2` = last(share)) |>
  mutate(Flag = gsub(" ", "-", str_to_lower(gsub(" ", "-", Location))),
         Flag = paste0('<img src="../../icon/flag/vsmall/', Flag, '.png" alt="Flag">')) |>
  select(Flag, everything()) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F, escape = F) else .}