Back


Goal 5: Gender equality

Average income


GS Average income by gender, place of residence and education
INXPI104_raw <- 
  "INXPI104" %>% 
  statgl_url(lang = language) %>% 
  statgl_fetch(
    "level of education" = px_all(),
    unit                 = 3,
    gender               = 1:2,
    age                  = c(0, 4),
    "type of income"     = 1,
    time                 = px_all(),
    .col_code            = TRUE
    ) %>% 
  as_tibble()


INXPI104 <- 
  INXPI104_raw %>%
  filter(
    value != "NA",
    age   == unique(INXPI104_raw %>% pull(age))[1]
    ) %>% 
  rename(
    "edu"  = `level of education`,
    "type" = `type of income`
    ) %>% 
  mutate(
    edu  = edu %>% fct_inorder(),
    type = type %>%  str_remove_all("[:digit:]|[:punct:]|\\+") %>% trimws()
    )

INXPI104 %>% 
  ggplot(aes(
    x     = time %>% as.numeric(),
    y     = value,
    color = gender %>% fct_rev()
  )) +
  geom_line(size = 2) +
  facet_wrap(~ edu) +
  theme_statgl() +
  scale_color_statgl() +
  scale_y_continuous(labels = function(x) format(x, big.mark = ".", scientific = FALSE)) +
  scale_x_continuous(breaks = scales:: pretty_breaks()) + 
  labs(
    title    = INXPI104 %>% pull(type) %>% unique(),
    subtitle = INXPI104 %>% pull(unit) %>% unique(),
    x        = " ",
    y        = " ",
    color    = " ",
    caption  = sdg5$figs$fig1$cap[language]
  )

StatBank

Method


tab <- 
  INXPI104 %>% 
  filter(time >= Sys.time() %>% year() - 7) %>% 
  mutate(time = time %>% fct_rev()) %>% 
  spread(time, value) %>% 
  select(-age)
  

tab %>% 
  select(-c(edu, unit, type)) %>% 
  rename(" " = 1) %>% 
  statgl_table() %>% 
  pack_rows(index = tab[["type"]] %>%  table()) %>% 
  pack_rows(index = tab[["edu"]] %>% table()) %>% 
  add_footnote(tab %>% pull(unit) %>% unique(), notation = "symbol")
2023 2022 2021 2020 2019 2018
Pretax Income total
Basic scool 8-10 grade
Men 246.610 235.495 216.588 221.765 220.133 219.879
Woman 178.784 172.638 165.161 162.866 159.533 155.737
Upper secondary school
Men 343.299 330.860 321.803 306.222 307.544 306.674
Woman 216.107 219.648 202.971 200.285 195.457 188.218
Vocational education
Men 426.171 412.919 392.943 402.291 386.489 381.488
Woman 301.973 294.195 279.924 274.136 272.691 265.099
Short-cycle higher education
Men 355.763 339.158 337.080 317.874 331.182 307.996
Woman 326.231 320.197 303.812 302.860 302.482 294.940
Medium-cycle higher education, Bachelors
Men 581.646 547.975 539.926 528.469 535.014 530.823
Woman 447.214 438.987 426.767 415.880 410.435 405.057
Long-cycle higher education
Men 791.874 760.137 763.632 757.895 765.664 713.391
Woman 615.166 610.568 602.025 590.392 577.631 560.352
* Average income for persons with type of income (DKK)
INXPI104 <- 
  INXPI104_raw %>%
  filter(
    value != "NA",
    age   == unique(INXPI104_raw %>% pull(age))[2]
  ) %>% 
  rename(
    "edu"  = `level of education`,
    "type" = `type of income`
  ) %>% 
  mutate(
    edu  = edu %>% fct_inorder(),
    type = type %>%  str_remove_all("[:digit:]|[:punct:]|\\+") %>% trimws()
  )

INXPI104 %>% 
  ggplot(aes(
    x     = time %>% as.numeric(),
    y     = value,
    color = gender %>% fct_rev()
  )) +
  geom_line(size = 2) +
  facet_wrap(~ edu) +
  theme_statgl() +
  scale_color_statgl() +
  scale_y_continuous(labels = function(x) format(x, big.mark = ".", scientific = FALSE)) +
  scale_x_continuous(breaks = scales:: pretty_breaks()) + 
  labs(
    title    = paste0(
      INXPI104 %>% pull(type) %>% unique(), ", ", 
      INXPI104 %>% pull(age) %>% unique()
    ),
    subtitle = INXPI104 %>% pull(unit) %>% unique(),
    x        = " ",
    y        = " ",
    color    = " ",
    caption  = sdg5$figs$fig1$cap[language]
  )

StatBank

Method


tab <- 
  INXPI104 %>% 
  filter(time >= Sys.time() %>% year() - 7) %>% 
  mutate(time = time %>% fct_rev()) %>% 
  spread(time, value) %>% 
  unite(type, type, age, sep = ", ")


tab %>% 
  select(-c(edu, unit, type)) %>% 
  rename(" " = 1) %>% 
  statgl_table() %>% 
  pack_rows(index = tab[["type"]] %>%  table()) %>% 
  pack_rows(index = tab[["edu"]] %>% table()) %>% 
  add_footnote(tab %>% pull(unit) %>% unique(), notation = "symbol")
2023 2022 2021 2020 2019 2018
Pretax Income total, 30-34 years
Basic scool 8-10 grade
Men 268.042 253.788 230.804 226.090 229.122 220.892
Woman 187.337 176.863 171.427 165.678 161.194 158.488
Upper secondary school
Men 316.108 297.391 296.680 289.586 313.604 273.332
Woman 210.529 203.560 207.277 191.614 188.123 186.754
Vocational education
Men 426.184 408.503 380.457 357.371 347.546 331.054
Woman 283.068 275.319 265.726 260.237 266.759 256.674
Short-cycle higher education
Men 359.357 352.560 349.079 306.309 294.879 347.271
Woman 248.426 251.874 208.128 222.469 208.038 226.267
Medium-cycle higher education, Bachelors
Men 486.531 497.058 498.912 473.930 446.026 436.353
Woman 387.513 382.637 377.972 359.267 359.695 360.720
Long-cycle higher education
Men 560.435 519.394 503.610 522.714 483.043 472.560
Woman 498.549 482.339 471.482 472.983 460.440 441.388
* Average income for persons with type of income (DKK)

Distribution of elected representatives by sex


FN 5.5.1 Proportion of female parlamentarians in the national parliament
# Import
ELEC03_raw <- 
  "https://pxweb.nordicstatistics.org:443/sq/6c4d7add-c65a-43ab-a60a-0119c13f9bd6.csv" |> 
  read.csv() |> 
  as_tibble()

vec <- 1:21
names(vec) <- c("country", 2003:2022)

# Transform
ELEC03 <- 
  ELEC03_raw |> 
  rename(vec) |> 
  mutate(across(everything(), as.numeric),
         country = "greenland") |> 
  pivot_longer(cols = c("2003", "2004", "2005", "2006", "2007", "2008", "2009", 
                        "2010", "2011", "2012", "2013", "2014", "2015", "2016",
                        "2017", "2018", "2019", "2020", "2021", "2022"),
               names_to = "time",
               values_to = "value") |> 
  drop_na(value)

# Plot
ELEC03 |> 
  ggplot(aes(
    x = time,
    y = value,
    fill = country
  )) +
  geom_col() +
  theme_statgl() +
  scale_fill_statgl() +
  theme(legend.position = "none") +
  labs(
    title   = sdg5$figs$fig2$title[language],
    x       = " ",
    y       = sdg5$figs$fig2$y_lab[language],
    fill    = " ",
    caption = sdg5$figs$fig2$cap[language]
  )

Nordic Statistics

Method


col0 <- sdg5$figs$fig2$col0[language]

# Tabel
ELEC03 |> 
  spread(time, value) |> 
  mutate(country = col0) |> 
  rename(" " = 1) |> 
  statgl_table() |> 
  add_footnote(sdg5$figs$fig2$foot[language], notation = "symbol")
X2023 X2024 2005 2009 2013 2014 2015 2016 2017 2018 2020 2021
Amount of women NA NA 42 29 41 43 33 33 31 42 47 32
* Situation by end of the year

Economically disadvantaged


GS Proportion of economically disadvantaged by gender
# Import 
SOXOU01_raw <-
  statgl_url("SOXOU01", lang = language) %>%
  statgl_fetch(
    "inventory variable" = c("Andel50", "Andel60"),
    gender               = 1:2,
    year                 = px_all(),
    .col_code            = TRUE
    ) %>% 
    as_tibble()

# Transform
SOXOU01 <-
  SOXOU01_raw %>% 
  mutate(
    year   = year %>%  make_date(),
    gender = gender %>% fct_inorder()
    )

# Plot
SOXOU01 %>% 
  mutate(`inventory variable` = `inventory variable` %>% str_to_sentence()) %>% 
  ggplot(aes(
    x    = year,
    y    = value,
    fill = gender)) +
  geom_col(position = "dodge") +
  scale_y_continuous(labels  = scales::percent_format(
    scale        = 1, 
    accuracy     = 1, 
    big.mark     = ".",
    decimal.mark = ",")
    ) +
  facet_wrap(~ `inventory variable`) +
  theme_statgl() + 
  scale_fill_statgl(reverse = TRUE) +
  labs(
    title    = sdg5$figs$fig3$title[language],
    subtitle = sdg5$figs$fig3$sub[language],
    x        = " ", 
    y        = " ", 
    fill     = " ",
    caption  = sdg5$figs$fig3$cap[language]
  )

StatBank

Method


# Transform
SOXOU01 <-
  SOXOU01_raw %>% 
  arrange(desc(year)) %>% 
  filter(year >= year(Sys.time()) - 5) %>% 
  mutate(year = year %>% fct_inorder()) %>% 
  unite(combi, 1, 2, sep = ",") %>% 
  mutate(combi = combi %>% fct_inorder()) %>% 
  spread(1, 3)

vec      <- SOXOU01[-1] %>% colnames() %>% str_split(",") %>% unlist() %>% str_to_sentence()
head_vec <- vec[c(T, F)] %>% table()
col_vec  <- vec[c(F, T)]

# Table
SOXOU01 %>% 
  rename(" " = 1) %>% 
  statgl_table(col.names = c(" ", col_vec)) %>% 
  add_header_above(c(" ", head_vec)) %>% 
  add_footnote(
    sdg5$figs$fig3$foot[language],
    notation = "symbol"
    )
Fraction below 50%
Fraction below 60%
fraction below 50%,Female fraction below 50%,Male fraction below 60%,Female fraction below 60%,Male
2023 4,1 5,0 7,8 8,7
2022 4,1 4,8 7,7 8,6
2021 3,8 4,3 7,4 7,9
2020 3,7 4,5 7,3 8,1
* Proportion below 50 or 60% of median income

Grade test results


GS Grade test results by gender
# Import
UDXTKK_raw <-
  statgl_url("UDXTKK", lang = language) %>%
  statgl_fetch(subject   = px_all(),
               grade     = px_all(),
               sex       = 1:2,
               unit      = "B",
               time      = px_all(),
               .col_code = TRUE
               ) %>% 
    as_tibble()

# Transform
UDXTKK <- 
  UDXTKK_raw %>% 
  mutate(
    time     = time %>% make_date(),
     subject =  subject %>% fct_inorder()
    )

fig_legend   <- statgl_url("UDXTKK", lang = language) %>% statgl_fetch() %>% select(1) %>% colnames()
fig_title    <- (statgl_url("UDXTKK", lang = language) %>% statgl_meta())$title
fig_subtitle <- UDXTKK_raw[["unit"]] %>% unique()
  
# Plot
UDXTKK %>% 
  ggplot(aes(
    x = time,
    y = value,
    color = subject
  )) +
  geom_line(size = 2) +
  facet_grid(grade ~ sex) +
  theme_statgl() + 
  scale_color_statgl() +
  scale_y_continuous(labels  = scales::percent_format(
    scale        = 1, 
    accuracy     = 1, 
    big.mark     = ".",
    decimal.mark = ","
    )) +
  labs(
    title    = fig_title,
    subtitle = fig_subtitle,
    x        = " ",
    y        = " ",
    color    = fig_legend,
    caption  = sdg5$figs$fig4$cap[language]
  )

StatBank

Method


UDXTKK <- 
  UDXTKK_raw %>% 
  mutate(
    subject = subject %>% fct_inorder(),
    grade   = grade %>% fct_inorder(),
    sex     = sex %>% fct_inorder()
    ) %>% 
  arrange(subject, time) %>% 
  unite(combi, 2, 1, 3, sep = ",") %>% 
  spread(1, 4) %>% 
  arrange(desc(time)) %>% 
  filter(time >= year(Sys.time()) - 5)

vec       <- UDXTKK %>% select(-(1:2)) %>% colnames() %>% str_split(",") %>% unlist()
head_vec1 <- rep((vec[c(F, T, F)])[1:8] %>% table(), 2)
head_vec2 <- vec[c(T, F, F)] %>% table()
col_vec   <- vec[c(F, F, T)] 

# Table
UDXTKK %>% 
  select(-1) %>% 
  rename(" " = 1) %>% 
  mutate_all(~replace(., is.na(.), 0)) %>% 
  statgl_table(col.names = c(" ", col_vec),
               replace_0s = TRUE) %>% 
  add_header_above(c(" ", head_vec1)) %>% 
  add_header_above(c(" ", head_vec2)) %>% 
  pack_rows(index = UDXTKK[["unit"]] %>% table())
3rd grade
7th grade
Danish
English
Greenlandic
Mathematics
Danish
English
Greenlandic
Mathematics
3rd grade,Danish,Boys 3rd grade,Danish,Girls 3rd grade,English,Boys 3rd grade,English,Girls 3rd grade,Greenlandic,Boys 3rd grade,Greenlandic,Girls 3rd grade,Mathematics,Boys 3rd grade,Mathematics,Girls 7th grade,Danish,Boys 7th grade,Danish,Girls 7th grade,English,Boys 7th grade,English,Girls 7th grade,Greenlandic,Boys 7th grade,Greenlandic,Girls 7th grade,Mathematics,Boys 7th grade,Mathematics,Girls
Problem-solving proficiency (pct. correct)
2024 39 43 0 0 43 48 51 46 41 45 80 88 50 59 41 38
2023 45 48 0 0 48 48 56 48 42 50 82 90 54 64 41 42
2022 39 44 0 0 40 43 48 48 44 59 75 86 57 66 41 41
2021 46 48 0 0 45 50 53 49 47 59 71 76 54 66 41 38
2020 49 50 0 0 40 48 53 48 54 60 73 73 57 65 41 42

Grade point average in lower secondary education


GS Marks by gender
# Import
UDXFKK_raw <-
  statgl_url("UDXFKK", lang = language) %>% 
  statgl_fetch(unit             = "andel",
               grade            = "FO",
               subject          = c("01", "02", "03", "04"),
               "type of grades" = 56:58,
               sex              = 1:2,
               time             = px_all(),
               .col_code = TRUE) %>% 
    as_tibble()

# Transform
UDXFKK <-
  UDXFKK_raw %>% 
  separate(`type of grades`, c("split1", "split2"),  " - ") %>% 
  mutate(split2 = split2 %>% str_to_title(),
         split1 = split1 %>% str_to_lower(),
         time = time %>% make_date()) %>% 
  unite(combi, 2, 4, sep = ", ")

fig_title    <- (statgl_url("UDXFKK", lang = language) %>% statgl_meta())$title
fig_y        <- UDXFKK[["unit"]] %>% unique() %>% str_to_title()
fig_subtitle <- UDXFKK[["combi"]] %>% unique()

# Plot
UDXFKK %>% 
  ggplot(aes(
    x     = time,
    y     = value, 
    color = sex
    )) +
  geom_line(size = 1.5) +
  facet_grid(split2 ~ subject) +
  scale_y_continuous(labels = scales::unit_format(
    suffix       = " ",
    big.mark     = ".",
    decimal.mark = ",", 
    accuracy     = 1
    )) +
  theme_statgl() + 
  scale_color_statgl(guide = guide_legend(reverse = TRUE)) +
  labs(
    title    = fig_title,
    subtitle = fig_subtitle,
    x        = " ",
    y        = fig_y,
    color    = " ",
    caption  = sdg5$figs$fig5$cap[language]
  )

StatBank

Method


# Transform
UDXFKK <-
  UDXFKK_raw %>% 
  filter(time >= year(Sys.Date()) - 6,
         value != "NA") %>% 
  separate(`type of grades`, c("split1", "split2"),  " - ") %>% 
  mutate(split2 = split2 %>% str_to_title(),
         split1 = split1 %>% str_to_lower()) %>% 
  unite(combi1, 2, 4, sep = ", ") %>% 
  unite(combi2, 3, 4, sep = ",") %>% 
  spread(3, ncol(.)) %>% 
  arrange(desc(time))

vec      <- UDXFKK %>% select(-(1:4)) %>% colnames() %>% str_split(",") %>% unlist()
head_vec <- vec[c(T, F)] %>% table()
col_vec  <- vec[c(F, T)]

# Table
UDXFKK %>% 
  select(-(1:2), -4) %>% 
  rename(" " = 1) %>% 
  statgl_table(col.names = c(" ", col_vec)) %>% 
  add_header_above(c(" ", head_vec)) %>% 
  pack_rows(index = UDXFKK[[1]] %>% str_to_title() %>% table()) %>% 
  pack_rows(index = UDXFKK[["time"]] %>% table() %>% rev()) %>% 
  add_footnote(UDXFKK[[2]] %>% unique(),
               notation = "symbol")
Danish
English
Greenlandic
Mathematics
Danish,Oral Danish,Proficiency Test Danish,Written English,Oral English,Proficiency Test English,Written Greenlandic,Oral Greenlandic,Proficiency Test Greenlandic,Written Mathematics,Oral Mathematics,Proficiency Test Mathematics,Written
Grade Point Average
2024
Boys 4,30 3,36 2,79 7,90 5,54 5,10 6,11 4,15 4,45 5,47 5,11 2,55
Girls 5,00 4,05 3,58 7,16 5,73 5,58 7,47 5,57 6,14 5,74 4,51 2,41
2023
Boys 6,16 3,92 3,39 6,60 5,60 4,39 6,30 3,50 3,84 5,81 5,14 2,89
Girls 6,13 4,18 4,28 7,34 5,52 4,73 6,74 4,49 5,65 5,37 4,49 3,07
2022
Boys 3,86 3,43 2,78 6,27 4,76 3,82 5,87 3,37 4,60 5,26 4,95 2,41
Girls 5,55 4,71 4,22 6,74 5,55 5,07 7,49 3,98 6,18 5,22 4,84 2,61
2021
Boys 4,89 3,93 2,59 6,66 4,73 3,75 5,67 3,11 4,18 4,79 5,06 2,16
Girls 5,74 4,93 4,00 6,36 5,03 4,40 6,21 3,94 6,31 4,94 4,84 2,17
2019
Boys 3,63 4,31 3,30 4,72 4,52 3,28 5,32 4,21 3,72 4,64 5,33 2,18
Girls 5,75 5,74 4,83 5,81 5,58 4,69 7,65 5,24 5,90 4,60 5,06 2,69
* School leavers - lower secondary education, mark


Due to Covid-19 there has not been held final exams in 2020.

Highest educational attainment


GS Highest educational attainment among 35-39 year olds by gender
# Import
UDXISCPROD_raw <-
  statgl_url("UDXISCPROD", lang = language) %>% 
  statgl_fetch(
    ISCED11_level = px_all(),
    Sex           = px_all(),
    Aar           = px_all(),
    alder_grp     = "35-39",
    .col_code     = TRUE
    ) %>% 
  as_tibble()

# Transform
UDXISCPROD <-
  UDXISCPROD_raw %>% 
  filter(ISCED11_level != UDXISCPROD_raw[[2]][1]) %>% 
  mutate(
    ISCED11_level = ISCED11_level %>% factor(level = unique(ISCED11_level) %>% rev()),
    Aar           = Aar %>% make_date()
    )

# Plot
UDXISCPROD %>% 
  arrange(ISCED11_level) %>% 
  ggplot(aes(
    x    = Aar,
    y    = value,
    fill = ISCED11_level
  )) +
  geom_area(position = "fill") +
  facet_wrap(~ Sex) +
  scale_y_continuous(labels = scales::percent_format(
    scale        = 100, 
    accuracy     = 1, 
    big.mark     = ".",
    decimal.mark = ","
    )) +
  theme_statgl(base_size = 11) +
  scale_fill_statgl(reverse = TRUE, guide = guide_legend(reverse = TRUE, nrow = 3)) +
  labs(
    title    = sdg5$figs$fig6$title[language],
    subtitle = unique(UDXISCPROD[["age"]]),
    x        = " ",
    y        = " ",
    fill     = NULL,
    caption  = sdg5$figs$fig6$cap[language]
  )

StatBank

Method


UDXISCPROD <- 
  UDXISCPROD_raw %>% 
  filter(
    ISCED11_level != UDXISCPROD_raw[[2]][1],
    Aar > year(Sys.Date()) - 7
    ) %>% 
  mutate(
    ISCED11_level = ISCED11_level %>% factor(levels = unique(ISCED11_level))
    ) %>% 
  arrange(ISCED11_level, desc(Aar)) %>% 
  unite(combi, 3, 4, sep = "-") %>% 
  mutate(combi = combi %>% factor(level = unique(combi))) %>% 
  spread(3, 4, sep = "-")

vec      <- (UDXISCPROD %>% select(-(1:2)) %>% colnames() %>% str_split("-") %>% unlist())[c(F, T, T)]
head_vec <- vec[c(F, T)] %>% table() %>% rev()
col_vec  <- vec[c(T, F)]

UDXISCPROD %>% 
  select(-1) %>% 
  rename(" " = 1) %>% 
  statgl_table(replace_0s = TRUE, col.names = c(" ", col_vec)) %>% 
  add_header_above(c(" ", head_vec)) %>% 
  pack_rows(index = UDXISCPROD[["alder_grp"]] %>% table())
2023
2022
2021
2020
2019
combi-Women-2023 combi-Men-2023 combi-Women-2022 combi-Men-2022 combi-Women-2021 combi-Men-2021 combi-Women-2020 combi-Men-2020 combi-Women-2019 combi-Men-2019
35-39 years
Lower secondary education 703 1.198 656 1.125 628 1.068 632 1.037 614 986
Upper secondary education 113 84 104 79 105 70 91 63 82 73
Vocational education and training 613 679 575 654 562 685 556 667 516 657
Supplementary examination courses 37 43 45 35 54 37 75 43 97 48
Short-cycle higher education 96 80 84 75 88 70 87 76 77 67
Bachelors programme 41 15 41 17 35 13 35 13 32 18
Professional bachelors programme 331 111 319 114 319 98 300 94 295 93
Masters programme 110 70 111 68 105 68 86 70 81 76
Phd. Programmes 7 4 6 3 6 3 6 1 2 0

Employment


GS Main employment for permanent residents by industry and gender
ARXBFB01_raw <-
  statgl_url("ARXBFB01", lang = "da") |> 
  statgl_fetch(
    beskbrch  = c("01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16"),
    sex       = c("M","K"),
    opg_var   = "G",
    aar       = px_all(),
    .col_code = T
  ) |> 
  as_tibble()

# Transform
ARXBFB01 <-
  ARXBFB01_raw %>% 
  mutate(
    aar     = aar %>% make_date(),
    beskbrch = beskbrch %>% fct_reorder(value) %>% fct_rev()
    ) %>% 
  arrange(beskbrch)

# Plot
ARXBFB01 %>% 
  ggplot(aes(
    x    = aar,
    y    = value,
    fill = sex
    )) +
  geom_area() +
  facet_wrap(~ beskbrch, scales = "free", labeller = label_wrap_gen()) +
  theme_statgl(base_size = 8) + 
  scale_fill_statgl(reverse = TRUE) +
  scale_y_continuous(labels = scales::unit_format(
    suffix       = " ",
    big.mark     = ".",
    decimal.mark = ","
    )) +
    labs(
      title = unique(ARXBFB01[[4]]),
      subtitle = sdg5$figs$fig7$title[language],
      x        = " ",
      y        = sdg5$figs$fig7$y_lab[language],
      fill     = " ",
      caption  = sdg5$figs$fig7$cap[language]
      )

StatBank

Method


ARXBFB01 <- 
  ARXBFB01_raw %>% 
  filter(aar >= year(Sys.time()) - 6) %>% 
  mutate(beskbrch = beskbrch %>% fct_reorder(value) %>% fct_rev()) %>% 
  arrange(beskbrch, aar) %>% 
  unite(combi, 2, 3, sep = ",") %>% 
  mutate(combi = combi %>% factor(levels = unique(combi))) %>% 
  spread(2, ncol(.))

vec      <- ARXBFB01 %>% select(-(1:2)) %>% colnames() %>% str_split(",") %>% unlist()
head_vec <- vec[c(F, T)] %>% table()
col_vec  <- vec[c(T, F)]

ARXBFB01 %>% 
  select(-2) %>% 
  rename(" " = 1) %>% 
  statgl_table(col.names = c(" ", col_vec)) %>% 
  add_header_above(c(" ", head_vec)) %>% 
  pack_rows(index = ARXBFB01[[2]] %>% table())
2019
2020
2021
2022
2023
Mænd,2019 Kvinder,2019 Mænd,2020 Kvinder,2020 Mænd,2021 Kvinder,2021 Mænd,2022 Kvinder,2022 Mænd,2023 Kvinder,2023
Hovedbeskæftigelse i gennemsnit pr. måned
Offentlig forvaltning og service 3.810 8.721 3.889 8.859 3.971 8.931 3.933 8.927 3.819 8.911
Fiskeri og fiskerirelateret industri og handel 4.009 716 3.883 719 3.682 680 3.673 670 3.820 698
Engroshandel og detailhandel 1.488 1.424 1.495 1.417 1.534 1.486 1.553 1.519 1.564 1.490
Transport og godshåndtering 1.525 488 1.521 457 1.508 447 1.558 483 1.594 493
Bygge- og anlægsvirksomhed 1.773 175 1.850 179 2.090 207 2.101 204 2.044 195
Overnatningsfaciliteter og restaurationsvirksomhed 336 382 310 351 351 427 364 469 408 495
Information og kommunikation 431 197 419 196 413 195 379 184 373 182
Administrative tjenesteydelser og hjælpetjenester 297 187 297 165 250 152 244 159 261 188
Energi- og vandforsyning 362 75 360 77 360 77 348 69 353 71
Øvrige serviceerhverv 171 165 153 152 155 151 156 160 159 171
Fast ejendom 159 103 170 106 166 103 179 118 199 127
Liberale, videnskabelige og tekniske tjenesteydelser 151 111 158 109 174 116 176 123 179 119
Fremstillingsvirksomhed 159 49 166 47 173 50 177 52 172 58
Pengeinstitut og finansvirksomhed 63 122 75 127 72 128 64 137 64 143
Råstofindvinding 66 25 65 25 85 34 73 34 56 29
Landbrug, skovbrug og landbrugsrelateret industri og handel 81 19 85 19 92 18 80 18 68 15

Unemployment


GS Unemployment rate by gender
# Import

url <- paste0("https://bank.stat.gl/api/v1/", language, "/Greenland/AR/AR40/ARXLED3.px")

ARXLED3_raw <-
  statgl_url("ARXLED3", lang = language) |> 
  statgl_fetch(
    sex       = c("M", "K"),
    alder_grp = px_all(),
    aar       = px_all(),
    opg_var   = "P",
    .col_code = T
  ) |> 
  as_tibble()

# Transform
ARXLED3 <-
  ARXLED3_raw %>% 
  mutate(
    aar = aar %>% make_date(),
    alder_grp  = alder_grp %>% factor(levels = unique(alder_grp))
    )

# Plot
ARXLED3 %>% 
  ggplot(aes(
    x     = aar, 
    y     = value,
    color = sex
    )) +
  geom_line(size = 1.5) +
  facet_wrap(~ alder_grp, scales = "free") +
  theme_statgl() + scale_color_statgl(reverse = TRUE) +
  scale_y_continuous(labels  = scales::percent_format(
    scale        = 1,
    accuracy     = 1,
    big.mark     = ".",
    decimal.mark = ",")) +
  labs(
    title    = sdg5$figs$fig8$title[language],
    subtitle = sdg5$figs$fig8$sub[language],
    x        = " ",
    y        = " ",
    color    = " ",
    caption  = sdg5$figs$fig8$cap[language]
    )

StatBank

Method


ARXLED3 <- 
  ARXLED3_raw %>% 
  select(-opg_var) |> 
  mutate(
    alder_grp = alder_grp %>% fct_inorder(),
    aar = aar %>% as.numeric()
    ) %>% 
  filter(aar > max(aar) - 5) %>% 
  arrange(alder_grp, aar) %>% 
  unite(combi, aar, sex, sep = ",") %>% 
  mutate(combi = combi %>% fct_inorder()) %>% 
  spread(combi, value)
  
vec      <- ARXLED3 %>% select(-1) %>% colnames() %>% str_split(",") %>% unlist()
head_vec <- vec[c(T, F)] %>% table()
col_vec  <- vec[c(F, T)]


ARXLED3 %>% 
  rename(" " = 1) %>% 
  statgl_table(col.names = c(" ", col_vec)) %>% 
  add_header_above(c(" ", head_vec)) %>% 
  row_spec(1, bold = TRUE) %>% 
  pack_rows(index = c("Ledighedsprocent" = ARXLED3[[1]] %>% length())) %>% 
  add_footnote(
    sdg5$figs$fig8$foot[language],
    notation = "symbol")
2019
2020
2021
2022
2023
2019,Men 2019,Women 2020,Men 2020,Women 2021,Men 2021,Women 2022,Men 2022,Women 2023,Men 2023,Women
Ledighedsprocent
Total 4,6 4,0 4,9 4,2 3,9 3,4 3,4 3,0 3,1 2,7
18-19 years 7,1 8,2 8,4 8,6 7,1 6,4 4,8 5,3 5,1 5,5
20-24 years 6,4 6,1 6,3 6,0 4,8 4,9 4,1 4,4 3,8 3,5
25-29 years 4,8 4,6 4,7 4,2 3,4 3,0 3,4 2,8 2,9 2,3
30-34 years 3,9 4,1 4,2 4,5 3,2 3,4 3,4 3,1 2,9 2,8
35-39 years 4,4 3,6 4,4 4,1 3,2 3,2 2,7 2,8 2,3 2,5
40-44 years 4,1 3,2 4,4 3,4 3,5 3,2 2,8 2,4 3,0 2,5
45-49 years 4,3 3,7 4,0 3,8 3,1 2,7 2,6 2,1 2,3 2,1
50-54 years 4,5 3,3 5,1 3,7 4,3 3,7 3,8 3,0 2,9 2,5
55-59 years 4,1 3,3 4,9 3,6 4,4 3,2 3,6 2,8 3,9 2,8
60 years-retirement age 5,0 3,0 5,3 2,7 4,1 2,9 3,9 3,0 3,8 2,9
* Percentage, average unemployment per month among residents aged 18-65

Life expectancy


GS Life expectancy for 0 and 1-year-olds by gender
# Import
BEXDT5A_raw <-
  statgl_url("BEXDT5A", lang = language) %>% 
  statgl_fetch(type   = "E",
               gender = c("M", "K"),
               time   = px_all(),
               age    = 0:1,
               .col_code = TRUE) %>% 
  as_tibble()

# Transform
BEXDT5A <- 
  BEXDT5A_raw %>% 
    separate(time, c("startar", "slutar"),  " - ") %>% 
  mutate(slutar = slutar %>% make_date())

# Plot
BEXDT5A %>% 
  ggplot(aes(
    x     = slutar,
    y     = value,
    color = gender
    )) +
  geom_line(size = 2) +
  facet_wrap(~ age) +
    theme_statgl() + 
  scale_color_statgl(reverse = TRUE) +
  theme(plot.margin = margin(10, 10, 10, 10)) +
  labs(
    title    = sdg5$figs$fig9$title[language],
    subtitle = sdg5$figs$fig9$sub[language],
    x        = sdg5$figs$fig9$x_lab[language],
    y        = sdg5$figs$fig9$y_lab[language],
    color    = " ",
    caption  = sdg5$figs$fig9$cap[language]
    )

StatBank


# Transform
BEXDT5A <-
  BEXDT5A_raw %>% 
  arrange(desc(time), age) %>% 
  unite(combi, 2, 3, sep = ",") %>% 
  mutate(combi = combi %>% factor(levels = unique(combi))) %>% 
  spread(2, 4) %>% 
  arrange(desc(time)) %>% 
  mutate(timetime = time) %>% 
  separate(timetime, c("time1", "time2"), " - ") %>% 
  filter(time >= year(Sys.time()) - 10) %>% 
  select(-c("time1", "time2"))

vec      <- BEXDT5A %>% select(-(1:2)) %>% colnames() %>% str_split(",") %>% unlist()
head_vec <- vec[c(F, T)] %>% table()
col_vec  <- vec[c(T, F)]

# Table
BEXDT5A %>% 
  select(-1) %>% 
  rename(" " = 1) %>% 
  statgl_table(col.names = c(" ", col_vec)) %>% 
  add_header_above(c(" ", head_vec)) %>% 
  pack_rows(index = BEXDT5A[[1]] %>% table()) %>% 
  add_footnote(
    sdg5$figs$fig9$foot[language], 
    notation = "symbol"
    )
0
1
Men,0 Women,0 Men,1 Women,1
Life Expectancy
2015 - 2019 68,3 73 68,1 72,5
* Life expectancy for 0 and 1-year-olds, persons born in Greenland.


Maternity benefits

FN 5.4.1
# Import
SOX007_raw <- 
  statgl_url("SOX007", lang = language) |> 
  statgl_fetch(
    gender    = 1:2,
    type      = 30,
    time      = px_all(),
    .col_code = T
  ) |> 
  as_tibble()

# Transform
SOX007 <- 
  SOX007_raw |> 
  mutate(value = as.numeric(value)) |> 
  select(-2)


# Plot
SOX007 |> 
  ggplot(aes(
    x     = as.integer(time),
    y     = value,
    color = gender
  )) +
  geom_line(size = 2) +
  theme_statgl() +
  scale_color_statgl() +
  labs(
    title   = sdg5$figs$fig10$title[language],
    x       = " ",
    y       = " ",
    color   = " ",
    caption = sdg5$figs$fig10$cap[language]
  )

StatBank


SOX007 |> 
  filter(time >= year(Sys.time()) - 6) |> 
  spread(time, value) |> 
  rename(" " = 1) |> 
  statgl_table() |> 
  add_footnote(sdg5$figs$fig10$foot[language], notation = "symbol")
2019 2020 2021 2022 2023
Man 190 165 148 128 94
Woman 897 867 834 718 625
* Number of persons