Back


Goal 8: Decent work and economic growth

GDP per capita


FN 8.1.1 Real growth in GDP per capita
# Import
NRX10_raw <- 
  statgl_url("NRX10", lang = language) %>% 
  statgl_fetch(
    units     = "K",
    account   = "02",
    time       = px_all(),
    .col_code = TRUE
               ) %>% 
  as_tibble()

# transform 
NRX10 <- 
  NRX10_raw %>% 
  mutate(time = time %>% as.numeric()) %>% 
  mutate(value = (value - lag(value)) / lag(value))


NRX10 %>% 
  ggplot(aes(
    x = time,
    y = value,
    fill = account
  )) +
  geom_col() +
  scale_fill_statgl() + 
  theme_statgl() +
  theme(legend.position = "none") +
  scale_y_continuous(labels = scales::percent_format(
    scale        = 100, 
    accuracy     = 1, 
    big.mark     = ".",
    decimal.mark = ","
    )) +
  labs(
    title    = sdg8$fig$fig1$title[language],
    subtitle = NRX10[[1]][1],
    x        = " ",
    y        = sdg8$fig$fig1$y_lab[language],
    fill     = " ",
    caption  = sdg8$fig$fig1$cap[language]
  )

Statbank, GDP

Statbank, employment


tab <- 
  NRX10 %>% 
  mutate(value = value*100) %>% 
  filter(time >= max(time) - 5) %>% 
  arrange(desc(time)) %>% 
  select(-account) %>% 
  mutate(time = time %>% as.character())


if(language != "en"){
  
  table <- 
    tab %>% 
    select(-units) %>% 
    mutate(value = value %>% round(1)) %>% 
    rename(" " = 1, "Realvækst" = value) %>% 
    statgl_table() %>% 
    pack_rows(index = tab[[1]] %>% table()) %>% 
    add_footnote(sdg8$fig$fig1$foot1[language], notation = "symbol")
  
} else {
  
   table <- 
    tab %>% 
    select(-units) %>% 
    mutate(value = value %>% round(1)) %>% 
    rename(" " = 1, "Real growth rate" = value) %>% 
    statgl_table() %>% 
    pack_rows(index = tab[[1]] %>% table()) %>% 
    add_footnote(sdg8$fig$fig1$foot1[language], notation = "symbol")

}


table
Real growth rate
2010-prices, chained values
2023 0,8
2022 1,7
2021 1,0
2020 0,1
2019 2,6
2018 0,6
* Real growth, GDP per capita

Employment


GS Employment rate
ARXBFB05_raw <-
  statgl_url("ARXBFB05", lang = language) |> 
  statgl_fetch(
    aar       = px_all(),
    komdist   = px_all(),
    opg_var   = "H",
    .col_code = T
  ) |> 
  as_tibble()


# Transform
ARXBFB05 <- 
  ARXBFB05_raw %>% 
  mutate(aar = aar %>% make_date(),
         komdist = komdist %>% factor(levels = unique(komdist)))

# Plot
ARXBFB05 %>% 
  filter(komdist == ARXBFB05[[1]][1]) %>% 
  ggplot(aes(
    x     = aar,
    y     = value,
    color = komdist
    )) +
  geom_line(linewidth = 2) +
  facet_wrap(~ komdist, scales = "free") +
    scale_y_continuous(labels = scales::percent_format(
      scale      = 1, 
      accuracy   = 0.1, 
      big.mark   = ".",
      decimal.mark = ","
      )) +
  theme_statgl() + 
  scale_color_statgl() +
  theme(legend.position = "none") +
  labs(
    title    = sdg8$fig$fig2$title[language],
    subtitle = ARXBFB05[[1]][1],
    x        = " ",
    y        = " ",
    caption  = sdg8$fig$fig2$cap[language]
  )

StatBank

Method


# Transform
ARXBFB05 <- 
  ARXBFB05_raw %>% 
  filter(
    komdist == ARXBFB05_raw[[1]][1],
    aar     >= year(Sys.time()) - 7
    ) %>% 
  arrange(desc(aar))

vec        <- 1:2
names(vec) <- c(" ", sdg8$fig$fig2$cols$col2[language])

# Table
ARXBFB05 %>% 
  select(2, ncol(.)) %>% 
  rename(vec) %>% 
  statgl_table() %>% 
  pack_rows(index = ARXBFB05[[3]] %>% table()) %>% 
  add_footnote(ARXBFB05[[1]][1], notation = "symbol")
Employment rate
Employed persons in average per month (pct.)
2023 67,6
2022 67,2
2021 66,6
2020 66,0
2019 66,6
2018 66,1
* Total (incl. outside the municipalities)

Unemployment


FN 8.5.2 Unemployment rate by age
ARXLED3_raw <-
  statgl_url("ARXLED3", lang = language) |> 
  statgl_fetch(
    aar       = px_all(),
    distrikt  = "AA",
    alder_grp = "1",
    opg_var   = "P",
    .col_code = TRUE
    ) %>% 
  as_tibble()

# Transform
ARXLED3 <-
  ARXLED3_raw %>% 
  mutate(aar = aar %>% make_date()) %>% 
  unite(combi, 1, 2, 4, sep = ", ")

# Plot
ARXLED3 %>% 
  ggplot(aes(
    x     = aar,
    y     = value,
    color = combi
    )) +
  geom_line(size = 2) +
  theme_statgl() + 
  scale_color_statgl() +
  theme(legend.position = "none") +
  scale_y_continuous(labels  = scales::percent_format(
    scale        = 1, 
    accuracy     = 0.1, 
    big.mark     = ".",
    decimal.mark = ","
    )) +
  labs(
    title    = sdg8$fig$fig3$title[language],
    subtitle = ARXLED3[[1]][1],
    x        = " ",
    y        = " ",
    color    = " ",
    caption  = sdg8$fig$fig3$cap[language]
  )

StatBank

Method


# Transform

ARXLED3 %>% 
  mutate(aar = aar %>% year()) %>% 
  filter(aar > year(Sys.time()) - 8) %>% 
  spread(aar, value) %>% 
  mutate(combi = sdg8$fig$fig3$cols$ncol[language][[1]]) %>% 
  rename(" " = 1) %>% 
  statgl_table()
2018 2019 2020 2021 2022 2023
Unemployment rate 5 4,3 4,5 3,7 3,2 2,9



ARXLED4_raw <-
  statgl_url("ARXLED3", lang = language) |> 
  statgl_fetch(
    aar       = px_all(),
    distrikt  = "AA",
    opg_var   = "P",
    alder_grp = px_all(),
    .col_code = T
    ) %>% 
  as_tibble()

# Transform
ARXLED4 <- 
  ARXLED4_raw %>% 
  filter(alder_grp != ARXLED4_raw[[2]][1]) %>% 
  arrange(desc(aar)) %>% 
  mutate(alder_grp = alder_grp %>% factor(levels = unique(alder_grp)),
         aar = aar %>% make_date()) %>% 
  unite(combi, 1, 4, sep = ", ")

# Plot
ARXLED4 %>% 
  ggplot(aes(
    x     = aar, 
    y     = value,
    color = alder_grp
    )) +
  geom_line(linewidth = 1.5) +
  theme_statgl() + 
  scale_color_statgl() +
  scale_y_continuous(labels  = scales::percent_format(
    scale        = 1, 
    accuracy     = 1, 
    big.mark     = ".",
    decimal.mark = ","
    )) +
  labs(
    title    = sdg8$fig$fig4$title[language],
    subtitle = ARXLED4[[1]][1],
    x        = " ",
    y        = " ",
    color    = " ",
    caption  = sdg8$fig$fig4$cap[language]
  )

StatBank

Method


# Transform
ARXLED4 <- 
  ARXLED4_raw %>% 
  filter(
    alder_grp != ARXLED4_raw[[2]][1],
    aar >= year(Sys.time()) - 6
    ) %>% 
  arrange(desc(aar)) %>% 
  mutate(
    alder_grp = alder_grp %>% factor(levels = unique(alder_grp)),
    aar = aar %>% factor(levels = unique(aar))
    ) %>% 
  unite(combi, 1, 2, sep = ", ") %>% 
  spread(3, ncol(.))

vec        <- ARXLED4[[2]] %>% length()
names(vec) <- sdg8$fig$fig4$index[language]


# Table
ARXLED4 %>% 
  select(-1) %>% 
  rename(" " = 1) %>% 
  statgl_table() %>% 
  pack_rows(index = vec) %>% 
  pack_rows(index = table(ARXLED4$combi)) |> 
  add_footnote(ARXLED4_raw[[1]][1], notation = "symbol")
Unemployment rate (pct.)
Unemployment rate
Total, 18-19 years
2023 5,3
2022 5,0
2021 6,8
2020 8,5
2019 7,6
Total, 20-24 years
2023 3,7
2022 4,2
2021 4,8
2020 6,1
2019 6,2
Total, 25-29 years
2023 2,6
2022 3,1
2021 3,2
2020 4,5
2019 4,7
Total, 30-34 years
2023 2,8
2022 3,2
2021 3,3
2020 4,4
2019 4,0
Total, 35-39 years
2023 2,4
2022 2,8
2021 3,2
2020 4,2
2019 4,0
Total, 40-44 years
2023 2,8
2022 2,6
2021 3,4
2020 3,9
2019 3,7
Total, 45-49 years
2023 2,2
2022 2,4
2021 2,9
2020 3,9
2019 4,0
Total, 50-54 years
2023 2,7
2022 3,4
2021 4,0
2020 4,4
2019 3,9
Total, 55-59 years
2023 3,4
2022 3,2
2021 3,9
2020 4,3
2019 3,7
Total, 60 years-retirement age
2023 3,4
2022 3,5
2021 3,6
2020 4,2
2019 4,2
* Total
GS Unemployment rate by place of residence
# Import

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

ARXLED3_raw <-
  statgl_url("ARXLED3", lang = language) |> 
  statgl_fetch(
    aar       = px_all(),
    distrikt  = "AA",
    alder_grp = "1",
    opg_var   = "P",
    bybygd    = px_all(),
    .col_code = TRUE
    ) %>% 
  as_tibble()

# Transform
ARXLED3 <- 
  ARXLED3_raw %>% 
  mutate(aar = aar %>% make_date())

# Plot
ARXLED3 %>% 
  ggplot(aes(
    x     = aar,
    y     = value, 
    color = bybygd
    )) +
  geom_line(linewidth = 2) +
  theme_statgl() + 
  scale_color_statgl() +
  scale_y_continuous(labels  = scales::percent_format(
    scale        = 1, 
    accuracy     = 1, 
    big.mark     = ".",
    decimal.mark = ","
    )) +
  labs(
    title    = sdg8$fig$fig5$title[language],
    subtitle = ARXLED4[[2]][1],
    x        = " ",
    y        = " ",
    color    = " ",
    caption  = sdg8$fig$fig5$cap[language]
    )

StatBank

Method


# Transform
ARXLED3 <- 
  ARXLED3_raw %>% 
  filter(aar >= year(Sys.time()) - 6) %>% 
  arrange(aar) %>% 
  mutate(aar = aar %>% factor(levels = unique(aar))) %>% 
  unite(combi, distrikt, alder_grp, sep = ", ") %>% 
  spread(1, ncol(.))

vec        <- ARXLED3[[1]] %>% length()
names(vec) <- sdg8$fig$fig5$index[language]

# Table
ARXLED3 %>% 
  select(-c(1, 3)) %>% 
  rename(" " = 1) %>% 
  statgl_table() %>% 
  add_footnote(ARXLED3[[1]][1], notation = "symbol") %>% 
  row_spec(1, bold = TRUE) %>% 
  pack_rows(index = vec) |> 
  pack_rows(index = table(ARXLED3$bybygd))
Total, Total
Unemployment rate
Settlements etc.
2019 6,1
2020 6,5
2021 5,4
2022 4,8
2023 4,7
Total
2019 4,3
2020 4,5
2021 3,7
2022 3,2
2023 2,9
Towns
2019 4,1
2020 4,3
2021 3,4
2022 3,0
2023 2,7
* Settlements etc.



Research and development


GS Research and development expenditure (share of GDP)
# Import
NRX09_raw <-
  statgl_url("NRX09", lang = language) %>% 
  statgl_fetch(
    units   = "L",
    account = px_all(),
    time    = px_all(),
    .col_code = TRUE
    ) %>% 
  as_tibble()

NRX09_raw <- NRX09_raw %>% filter(account %in% unique(NRX09_raw %>% pull(account))[7])

NRX10_raw <-
  statgl_url("NRX10", lang = language) %>% 
  statgl_fetch(
    units    = "L",
    account  = "01",
    time      = px_all(),
    .col_code = TRUE
    ) %>% 
  as_tibble()

# Transform
RD_GDP <- 
  NRX10_raw %>% 
  select(3:4) %>% 
  rename(
    "time" = 1,
    "GDP"  = 2
    ) %>% 
  left_join(
    NRX09_raw %>% 
      mutate(account = account %>% str_remove_all("[:digit:]") %>% trimws()) %>% 
      select(3:4) %>% 
      rename("RD" = 2)
    ) %>% 
  mutate(pct = RD / GDP) %>% 
  filter(pct != "NA")

# Plot
RD_GDP %>% 
  ggplot(aes(
    x    = time,
    y    = pct,
    fill = time
    )) +
  geom_col() +
  scale_y_continuous(labels  = scales::percent_format(
    scale        = 100, 
    accuracy     = 1, 
    big.mark     = ".",
    decimal.mark = ","
    )) +
  theme_statgl() + 
  scale_fill_statgl() +
  theme(legend.position = "none") +
  labs(
    title    = sdg8$fig$fig6$title[language],
    subtitle = NRX09_raw[[1]][1],
    x        = " ",
    y        = sdg8$fig$fig6$y_lab[language],
    caption  = sdg8$fig$fig6$cap[language]
  )

Statbank, investments (research and development)

Statbank, GDP


# Transform
tab <- 
  RD_GDP %>% 
  #arrange(desc(time)) %>% 
  filter(time >= year(Sys.time()) - 7) %>% 
  mutate(
    time = time %>% fct_inorder(),
    pct  = pct * 100,
    pct  = pct %>% round(1),
    var  = sdg8$fig$fig6$cols$col1[language]
    ) %>% 
  select(-(2:3)) %>% 
  spread(1, 2)

# Table
tab %>% 
  rename(" " = 1) %>% 
  statgl_table() %>% 
  pack_rows(index = table(NRX09_raw[[1]][1])) %>% 
  add_footnote(sdg8$fig$fig6$foot[language], notation = "symbol")
2018 2019 2020 2021 2022 2023
Current prices, million dkk
Research and development expenditure 1,8 1,8 1,6 1,5 1,9 2,1
* Share of GDP

International passengers


GS Number of international passengers on scheduled flights
# Import
TUXUPAX_raw <-
  statgl_url("TUXUPAX", lang = language) %>%
  statgl_fetch(airport   = 0,
               month     = 0,
               time      = px_all(),
               .col_code = TRUE) %>% 
  as_tibble()

# Transform
TUXUPAX <-
  TUXUPAX_raw %>% 
  mutate(value = value / 1000,
         time = time %>% make_date())

# Plot
TUXUPAX %>% 
  ggplot(aes(
    x    = time,
    y    = value, 
    fill = airport
    )) +
  geom_col() +
  theme_statgl() + 
  scale_fill_statgl() +
  theme(plot.margin = margin(10, 10, 10, 10),
        legend.position = "none") +
  labs(
    title = sdg8$fig$fig7$title[language],
    x = " ",
    y = sdg8$fig$fig7$y_lab[language],
    caption = sdg8$fig$fig7$cap[language]
  )

StatBank

Method


# Transform
TUXUPAX <-
  TUXUPAX_raw %>% 
  mutate(value = value) %>% 
  filter(time >= year(Sys.time()) - 7,
         value != "NA") %>% 
  arrange(desc(time))

vec <- 1:2
names(vec) <- c(" ",  sdg8$fig$fig7$cols$col2[language])


# Table
TUXUPAX %>% 
  select(-(1:2)) %>% 
  rename(vec) %>% 
  statgl_table() %>% 
  add_footnote(sdg8$fig$fig7$foot[language],
               notation = "symbol")
International passengers on scheduled flights
2024 96.817
2023 96.362
2022 85.484
2021 39.293
2020 30.785
2019 86.989
2018 85.306
* Number of persons.

NEET


GS NEET
UDXUMG3_raw <- 
  statgl_url("UDXUMG3", lang = language) %>%
  statgl_fetch(
    alder        = px_all(),
    registrering = 5:7,
    aar          = px_all(),
    .col_code    = TRUE
  ) %>% 
  as_tibble()

#sdg8 <- read_yaml("S:/STATGS/VM/SDG_dokument/input/text/txt_08.yml")

lab_vec        <- 1:5
names(lab_vec) <- 
  c(
    "age",
    "time",
    sdg8$fig$fig8$tags$tag1[language] %>% unlist(),
    sdg8$fig$fig8$tags$tag2[language] %>% unlist(),
    sdg8$fig$fig8$tags$tag3[language] %>% unlist()
)


UDXUMG3 <-
  UDXUMG3_raw %>% 
  rename("status" = registrering, "age" = alder, "time" = aar) |> 
  mutate(status = status %>% fct_inorder()) %>% 
  spread(status, value) %>% 
  rename(
    "age"   = 1,
    "time"  = 2,
    "work"  = 3,
    "none"  = 4,
    "total" = 5
  ) %>% 
  mutate(edu = total - work - none) %>% 
  select(-total) %>% 
  rename(lab_vec) %>% 
  gather(status, value, -c(age, time)) %>% 
  mutate(time = time %>% as.numeric()) %>% 
  filter(time %in% c(min(time), mean(time), max(time))) %>%
  mutate(time = time %>% as.character() %>% fct_rev())
  

UDXUMG3 %>%
  ggplot(aes(
    x    = parse_number(age),
    y    = value,
    fill = status
  )) +
  geom_col(position = "fill") +
  facet_wrap(~ time) + 
  scale_x_continuous(labels = function(x) round(x)) +
  scale_y_continuous(labels = scales:: percent) + 
  scale_fill_statgl(reverse = TRUE) +
  theme_statgl() + 
  labs(
    title    = sdg8$fig$fig8$title[language],
    subtitle = sdg8$fig$fig8$sub[language],
    x        = sdg8$fig$fig8$x_lab[language],
    y        = " ",
    color    = colnames(UDXUMG3_raw)[2] %>% str_to_title(),
    caption  = sdg8$fig$fig8$cap[language]
)

StatBank

Method


tab <- 
  UDXUMG3 %>% 
  mutate(age = age %>% fct_inorder()) %>% 
  arrange(age, time, status) %>% 
  unite(combi, time, status, sep = ",") %>% 
  mutate(combi = combi %>% fct_inorder()) %>% 
  spread(combi, value)

vec      <- tab %>% select(-1) %>% colnames() %>% str_split(",") %>% unlist()
head_vec <- vec[c(TRUE, FALSE)] %>% table() %>% rev()
col_vec  <- vec[c(FALSE, TRUE)]

tab %>% 
  statgl_table(col.names = c(" ", col_vec)) %>% 
  add_header_above(c(" ", head_vec)) %>% 
  add_footnote(sdg8$fig$fig8$foot[language], notation = "symbol")
2023
2016
age 2023,In education 2023,In employment 2023,NEET 2016,In education 2016,In employment 2016,NEET
16 years 310 86 310 390 70 295
17 years 304 114 293 275 127 362
18 years 272 212 265 298 176 325
19 years 229 296 206 274 300 318
20 years 142 338 221 171 374 264
21 years 138 403 216 205 389 242
22 years 158 376 206 219 411 233
23 years 150 362 174 223 472 221
24 years 149 424 181 227 476 197
25 years 188 437 163 230 487 186
* Number of persons