Tilbage


Delmål 14: Livet i havet

Forbrug af havets ressourcer


GS Forbrug af havets ressourcer
FIX020_raw <- 
  statgl_url("FIX021", lang = language) %>% 
  statgl_fetch(
    species   = px_all(),
    area      = px_all(),
    form      = px_all(),
    time      = px_all(),
    .col_code = TRUE
  ) %>% 
  as_tibble()

vec        <- 7:8
names(vec) <- c(sdg14$figs$fig0$cols$col1[language], sdg14$figs$fig0$cols$col2[language])

  
FIX020 <- 
  FIX020_raw %>% 
  mutate(
    species = species %>% fct_inorder(),
    form = form %>% fct_inorder(),
    time = time %>% as.numeric()
    ) %>% 
  spread(form, value) %>% 
  rename(
    "Rådgivning"  = 4,
    "Kvotex"      = 5,
    "Fangstx"     = 6
  ) %>% 
  filter(Kvotex > 0) %>% 
  mutate(
    Kvoteafvigelse  = Kvotex - Rådgivning,
    Fangstafvigelse = Fangstx - Rådgivning
  ) %>% 
  rename(vec) %>% 
  select(-c(4:6)) %>% 
  gather(key, value, -(1:3)) %>% 
  mutate(value = value / 1000)

FIX020 %>% 
  filter(species == unique(FIX020[[1]])[1]) %>% 
  ggplot(aes(
    x = time, 
    y = value,
    color = key
  )) +
  geom_hline(yintercept = 0, color = "red", size = 3, linetype = "dotted") +
  geom_line(size = 2) +
  scale_y_continuous(breaks= scales:: pretty_breaks()) +
  theme_statgl() + 
  scale_color_statgl(reverse = TRUE) +
  facet_wrap(~ area) +
  labs(
    title    = unique(FIX020[[1]])[1],
    subtitle = sdg14$figs$fig0$sub[language],
    y        = sdg14$figs$fig0$units$`1000_ton`[language] %>% unlist(),
    x        = " ",
    color    = " ",
    caption  = sdg14$figs$fig0$cap_fish[language]
  )

Statistikbanken


tab <- 
  FIX020_raw %>% 
  filter(
    time > year(Sys.time()) - 6,
    species == unique(FIX020_raw[[1]])[1],
    area %in% unique(FIX020_raw[[2]])[1:2]
    ) %>% 
  #arrange(desc(time)) %>% 
  mutate(time = time %>% fct_inorder()) %>% 
  spread(time, value)

tab %>% 
  select(-c(species, area)) %>% 
  rename(" " = 1) %>% 
  statgl_table() %>% 
  pack_rows(index = tab["species"] %>% table()) %>% 
  pack_rows(index = tab["area"] %>% table()) %>% 
  add_footnote(sdg14$figs$fig0$units$ton[language] %>% unlist(), notation = "symbol")
2020 2021 2022
Rejer
Vestgrønland
Fangst 107.860 108.352 112.659
Kvote 108.383 113.777 113.777
Rådgivning 108.383 113.777 113.777
Østgrønland
Fangst 3.172 3.071 5.510
Kvote 4.750 7.000 6.850
Rådgivning 2.000 3.000 3.000
* Ton





FIX020 %>% 
  filter(species == unique(FIX020[[1]])[2]) %>% 
  ggplot(aes(
    x = time, 
    y = value,
    color = key
  )) +
  geom_hline(yintercept = 0, color = "red", size = 3, linetype = "dotted") +
  geom_line(size = 2) +
  scale_y_continuous(breaks = scales:: pretty_breaks()) +
  theme_statgl() + 
  scale_color_statgl(reverse = TRUE) +
  facet_wrap(~ area) +
  labs(
    title    = unique(FIX020[[1]])[2],
    subtitle = sdg14$figs$fig0$sub[language],
    y        = sdg14$figs$fig0$units$`1000_ton`[language] %>% unlist(),
    x        = " ",
    color    = " ",
    caption  = sdg14$figs$fig0$cap_fish[language]
  )

Statistikbanken


tab <- 
  FIX020_raw %>% 
  filter(
    time > year(Sys.time()) - 6,
    species == unique(FIX020_raw[[1]])[2],
    area != unique(FIX020_raw[[2]])[3]
    ) %>% 
  #arrange(desc(time)) %>% 
  mutate(time = time %>% fct_inorder()) %>% 
  spread(time, value)

tab %>% 
  select(-c(species, area)) %>% 
  rename(" " = 1) %>% 
  statgl_table() %>% 
  pack_rows(index = tab["species"] %>% table()) %>% 
  pack_rows(index = tab["area"] %>% table()) %>% 
  add_footnote(sdg14$figs$fig0$units$ton[language] %>% unlist(), notation = "symbol")
2020 2021 2022
Hellefisk
Vestgrønland
Fangst 18.146 17.989 18.112
Kvote 18.184 18.184 18.185
Rådgivning 18.184 18.184 18.185
Østgrønland
Fangst 7.046 8.255 8.933
Kvote 8.031 8.847 10.020
Rådgivning 8.010 8.847 10.020
* Ton





FIX020 %>% 
  filter(species == unique(FIX020[[1]])[3]) %>% 
  ggplot(aes(
    x = time, 
    y = value,
    color = key
  )) +
  geom_hline(yintercept = 0, color = "red", size = 3, linetype = "dotted") +
  geom_line(size = 2) +
  scale_y_continuous(breaks = scales:: pretty_breaks()) +
  theme_statgl() + 
  scale_color_statgl(reverse = TRUE) +
  facet_wrap(~ area) +
  labs(
    title    = unique(FIX020[[1]])[3],
    subtitle = sdg14$figs$fig0$sub[language],
    y        = sdg14$figs$fig0$units$`1000_ton`[language] %>% unlist(),
    x        = " ",
    color    = " ",
    caption  = sdg14$figs$fig0$cap_fish[language]
  )

Statistikbanken


tab <- 
  FIX020_raw %>% 
  filter(
    time > year(Sys.time()) - 6,
    species == unique(FIX020_raw[[1]])[3],
    area %in% unique(FIX020_raw[[2]])[c(1, 3)]
    ) %>% 
  #arrange(desc(time)) %>% 
  mutate(time = time %>% fct_inorder()) %>% 
  spread(time, value)

tab %>% 
  select(-c(species, area)) %>% 
  rename(" " = 1) %>% 
  statgl_table() %>% 
  pack_rows(index = tab["species"] %>% table()) %>% 
  pack_rows(index = tab["area"] %>% table()) %>% 
  add_footnote(sdg14$figs$fig0$units$ton[language] %>% unlist(), notation = "symbol")
2020 2021 2022
Torsk
Vest- Østgrønland
Fangst 15.807 16.146 21.487
Kvote 18.824 26.091 21.630
Rådgivning 3.409 6.091 8.708
Vestgrønland
Fangst NA NA NA
Kvote NA NA NA
Rådgivning NA NA NA
* Ton





FIX020_raw <- 
  statgl_url("FIX020", lang = language) %>% 
  statgl_fetch(
    species   = px_all(),
    area      = px_all(),
    form      = px_all(),
    time      = px_all(),
    .col_code = TRUE
  ) %>% 
  as_tibble()

vec        <- 7:8
names(vec) <- c(sdg14$figs$fig0$cols$col1[language], sdg14$figs$fig0$cols$col2[language])

FIX020 <- 
  FIX020_raw %>% 
  mutate(
    form = form %>% fct_inorder(),
    area = area %>% fct_inorder(),
    time = time %>% as.numeric()
    ) %>% 
  spread(form, value) %>% 
  rename(
    "Rådgivning" = 4,
    "Kvote"      = 5,
    "Fangst"     = 6
    ) %>% 
  mutate(
    Kvoteafvigelse  = Kvote - Rådgivning,
    Fangstafvigelse = Fangst - Rådgivning
  ) %>% 
  rename(vec) %>% 
  filter(Kvote > 0) %>% 
  select(-(4:6)) %>% 
  gather(key, value, -c(species, area, time))


FIX020 %>% 
  filter(species == unique(FIX020[[1]])[6]) %>% 
  mutate(area = fct_reorder(area, value, .fun = sum, .desc = TRUE)) %>% 
  ggplot(aes(
    x = time,
    y = value, 
    color = key
  )) +
  geom_hline(yintercept = 0, color = "red", size = 3, linetype = "dotted") +
  geom_line(size = 2) +
  facet_wrap( ~ area) +
  scale_y_continuous(breaks = scales:: pretty_breaks()) +
  theme_statgl() + 
  scale_color_statgl(reverse = TRUE) +
  labs(
    title    = unique(FIX020[[1]])[6],
    subtitle = sdg14$figs$fig0$sub[language],
    y        = sdg14$figs$fig0$y_lab[language],
    x        = " ",
    color    = " ",
    caption  = sdg14$figs$fig0$cap[language]
  )

Statistikbanken


tab <- 
  FIX020_raw %>% 
  filter(
    species == unique(FIX020[[1]])[6],
    area != unique(FIX020_raw[[2]])[3]
    ) %>% 
  mutate(area = fct_reorder(area, value, .fun = sum, .desc = TRUE)) %>% 
  filter(time > year(Sys.time()) - 6) %>% 
  #arrange(desc(time)) %>% 
  mutate(time = time %>%  fct_inorder()) %>% 
  spread(time, value)

tab %>% 
  select(-c(species, area)) %>% 
  rename(" " = 1) %>% 
  statgl_table() %>% 
  pack_rows(index = tab[["species"]] %>% table) %>% 
  pack_rows(index = tab[["area"]] %>% table()) %>% 
  add_footnote(sdg14$figs$fig0$units$antal[language] %>% unlist(), notation = "symbol")
2020 2021
Narhval
Vestgrønland
Fangst 84 235
Kvote 251 251
Rådgivning 251 251
Qaanaaq
Fangst 93 94
Kvote 103 118
Rådgivning 103 98
Melville bugt
Fangst 52 70
Kvote 70 70
Rådgivning 70 70
Østgrønland
Fangst 57 20
Kvote 50 60
Rådgivning 0 0
* Antal





FIX020 %>% 
  filter(species == unique(FIX020[[1]])[5]) %>% 
  mutate(area = fct_reorder(area, value, .fun = sum, .desc = TRUE)) %>% 
  ggplot(aes(
    x = time,
    y = value, 
    color = key
  )) +
  geom_hline(yintercept = 0, color = "red", size = 3, linetype = "dotted") +
  geom_line(size = 2) +
  facet_wrap( ~ area) +
  scale_y_continuous(breaks = scales:: pretty_breaks()) +
  theme_statgl() + 
  scale_color_statgl(reverse = TRUE) +
  labs(
    title    = unique(FIX020[[1]])[5],
    subtitle = sdg14$figs$fig0$sub[language],
    y        = sdg14$figs$fig0$y_lab[language],
    x        = " ",
    color    = " ",
    caption  = sdg14$figs$fig0$cap[language]
  )

Statistikbanken


tab <- 
  FIX020_raw %>% 
  filter(
    species == unique(FIX020[[1]])[5],
    area %in% unique(FIX020_raw[[2]])[1:2]
    ) %>% 
  mutate(area = fct_reorder(area, value, .fun = sum, .desc = TRUE)) %>% 
  filter(time > year(Sys.time()) - 6) %>% 
  #arrange(desc(time)) %>% 
  mutate(time = time %>%  fct_inorder()) %>% 
  spread(time, value)

tab %>% 
  select(-c(species, area)) %>% 
  rename(" " = 1) %>% 
  statgl_table() %>% 
  pack_rows(index = tab[["species"]] %>% table) %>% 
  pack_rows(index = tab[["area"]] %>% table()) %>% 
  add_footnote(sdg14$figs$fig0$units$antal[language] %>% unlist(), notation = "symbol")
2020 2021
Isbjørn
Vestgrønland
Fangst 80 86
Kvote 92 92
Rådgivning 92 92
Østgrønland
Fangst 73 51
Kvote 64 64
Rådgivning 54 54
* Antal





Forbrug af havets ressourcer - 2

GS Forbrug af havets ressourcer - 2
FIX020 %>% 
  filter(species == unique(FIX020[[1]])[4]) %>% 
  mutate(area = fct_reorder(area, value, .fun = sum, .desc = TRUE)) %>% 
  ggplot(aes(
    x = time,
    y = value, 
    color = key
  )) +
  geom_hline(yintercept = 0, color = "red", size = 3, linetype = "dotted") +
  geom_line(size = 2) +
  facet_wrap( ~ area) +
  scale_y_continuous(breaks = scales:: pretty_breaks()) +
  theme_statgl() + 
  scale_color_statgl(reverse = TRUE) +
  labs(
    title    = unique(FIX020[[1]])[4],
    subtitle = sdg14$figs$fig0$sub[language],
    y        = sdg14$figs$fig0$y_lab[language],
    x        = " ",
    color    = " ",
    caption  = sdg14$figs$fig0$cap[language]
  )

Statistikbanken


tab <- 
  FIX020_raw %>% 
  filter(
    species == unique(FIX020[[1]])[4],
    area %in% unique(FIX020_raw[[2]])[c(1, 4)]
    ) %>% 
  mutate(area = fct_reorder(area, value, .fun = sum, .desc = TRUE)) %>% 
  filter(time > year(Sys.time()) - 6) %>% 
  #arrange(desc(time)) %>% 
  mutate(time = time %>%  fct_inorder()) %>% 
  spread(time, value)

tab %>% 
  select(-c(species, area)) %>% 
  rename(" " = 1) %>% 
  statgl_table() %>% 
  pack_rows(index = tab[["species"]] %>% table) %>% 
  pack_rows(index = tab[["area"]] %>% table()) %>% 
  add_footnote(sdg14$figs$fig0$units$antal[language] %>% unlist(), notation = "symbol")
2020 2021
Hvidhval
Vestgrønland
Fangst 182 139
Kvote 320 265
Rådgivning 320 265
Qaanaaq
Fangst 12 9
Kvote 20 29
Rådgivning 20 37
* Antal





FIX020 %>% 
  filter(species == unique(FIX020[[1]])[1]) %>% 
  mutate(area = fct_reorder(area, value, .fun = sum, .desc = TRUE)) %>% 
  ggplot(aes(
    x = time,
    y = value, 
    color = key
  )) +
  geom_hline(yintercept = 0, color = "red", size = 3, linetype = "dotted") +
  geom_line(size = 2) +
  facet_wrap( ~ area) +
  scale_y_continuous(breaks = scales:: pretty_breaks()) +
  theme_statgl() + 
  scale_color_statgl(reverse = TRUE) +
  labs(
    title    = unique(FIX020[[1]])[1],
    subtitle = sdg14$figs$fig0$sub[language],
    y        = sdg14$figs$fig0$y_lab[language],
    x        = " ",
    color    = " ",
    caption  = sdg14$figs$fig0$cap[language]
  )

Statistikbanken


tab <- 
  FIX020_raw %>% 
  filter(
    species == unique(FIX020[[1]])[1],
    area %in% unique(FIX020_raw[[2]])[c(1)]
    ) %>% 
  mutate(area = fct_reorder(area, value, .fun = sum, .desc = TRUE)) %>% 
  filter(time > year(Sys.time()) - 6) %>% 
  #arrange(desc(time)) %>% 
  mutate(time = time %>%  fct_inorder()) %>% 
  spread(time, value)

tab %>% 
  select(-c(species, area)) %>% 
  rename(" " = 1) %>% 
  statgl_table() %>% 
  pack_rows(index = tab[["species"]] %>% table) %>% 
  pack_rows(index = tab[["area"]] %>% table()) %>% 
  add_footnote(sdg14$figs$fig0$units$antal[language] %>% unlist(), notation = "symbol")
2020 2021
Finhval
Vestgrønland
Fangst 3 2
Kvote 19 19
Rådgivning 19 19
* Antal





FIX020 %>% 
  filter(species == unique(FIX020[[1]])[2]) %>% 
  mutate(area = fct_reorder(area, value, .fun = sum, .desc = TRUE)) %>% 
  ggplot(aes(
    x = time,
    y = value, 
    color = key
  )) +
  geom_hline(yintercept = 0, color = "red", size = 3, linetype = "dotted") +
  geom_line(size = 2) +
  facet_wrap( ~ area) +
  scale_y_continuous(breaks = scales:: pretty_breaks()) +
  theme_statgl() + 
  scale_color_statgl(reverse = TRUE) +
  labs(
    title    = unique(FIX020[[1]])[2],
    subtitle = sdg14$figs$fig0$sub[language],
    y        = sdg14$figs$fig0$y_lab[language],
    x        = " ",
    color    = " ",
    caption  = sdg14$figs$fig0$cap[language]
  )

Statistikbanken


tab <- 
  FIX020_raw %>% 
  filter(
    species == unique(FIX020[[1]])[2],
    area %in% unique(FIX020_raw[[2]])[c(1)]
    ) %>% 
  mutate(area = fct_reorder(area, value, .fun = sum, .desc = TRUE)) %>% 
  filter(time > year(Sys.time()) - 6) %>% 
  #arrange(desc(time)) %>% 
  mutate(time = time %>%  fct_inorder()) %>% 
  spread(time, value)

tab %>% 
  select(-c(species, area)) %>% 
  rename(" " = 1) %>% 
  statgl_table() %>% 
  pack_rows(index = tab[["species"]] %>% table) %>% 
  pack_rows(index = tab[["area"]] %>% table()) %>% 
  add_footnote(sdg14$figs$fig0$units$antal[language] %>% unlist(), notation = "symbol")
2020 2021
Grønlandshval
Vestgrønland
Fangst 0 0
Kvote 2 2
Rådgivning 2 2
* Antal





FIX020 %>% 
  filter(species == unique(FIX020[[1]])[3]) %>% 
  mutate(area = fct_reorder(area, value, .fun = sum, .desc = TRUE)) %>% 
  ggplot(aes(
    x = time,
    y = value, 
    color = key
  )) +
  geom_hline(yintercept = 0, color = "red", size = 3, linetype = "dotted") +
  geom_line(size = 2) +
  facet_wrap( ~ area) +
  scale_y_continuous(breaks = scales:: pretty_breaks()) +
  theme_statgl() + 
  scale_color_statgl(reverse = TRUE) +
  labs(
    title    = unique(FIX020[[1]])[3],
    subtitle = sdg14$figs$fig0$sub[language],
    y        = sdg14$figs$fig0$y_lab[language],
    x        = " ",
    color    = " ",
    caption  = sdg14$figs$fig0$cap[language]
  )

Statistikbanken


tab <- 
  FIX020_raw %>% 
  filter() %>% 
  filter(
    species == unique(FIX020[[1]])[3],
    area %in% unique(FIX020_raw[[2]])[1:3]
    ) %>% 
  mutate(area = fct_reorder(area, value, .fun = sum, .desc = TRUE)) %>% 
  filter(time > year(Sys.time()) - 6) %>% 
  #arrange(desc(time)) %>% 
  mutate(time = time %>%  fct_inorder()) %>% 
  spread(time, value)

tab %>% 
  select(-c(species, area)) %>% 
  rename(" " = 1) %>% 
  statgl_table() %>% 
  pack_rows(index = tab[["species"]] %>% table) %>% 
  pack_rows(index = tab[["area"]] %>% table()) %>% 
  add_footnote(sdg14$figs$fig0$units$antal[language] %>% unlist(), notation = "symbol")
2020 2021
Hvalros
Nordvandet
Fangst 21 48
Kvote 79 79
Rådgivning 84 84
Vestgrønland
Fangst 75 67
Kvote 74 74
Rådgivning 86 86
Østgrønland
Fangst 8 12
Kvote 17 17
Rådgivning 19 19
* Antal





FIX020 %>% 
  filter(species == unique(FIX020[[1]])[7]) %>% 
  mutate(area = fct_reorder(area, value, .fun = sum, .desc = TRUE)) %>% 
  ggplot(aes(
    x = time,
    y = value, 
    color = key
  )) +
  geom_hline(yintercept = 0, color = "red", size = 3, linetype = "dotted") +
  geom_line(size = 2) +
  facet_wrap( ~ area) +
  scale_y_continuous(breaks = scales:: pretty_breaks()) +
  theme_statgl() + 
  scale_color_statgl(reverse = TRUE) +
  labs(
    title    = unique(FIX020[[1]])[7],
    subtitle = sdg14$figs$fig0$sub[language],
    y        = sdg14$figs$fig0$y_lab[language],
    x        = " ",
    color    = " ",
    caption  = sdg14$figs$fig0$cap[language]
  )

Statistikbanken


tab <- 
  FIX020_raw %>% 
  filter(
    species == unique(FIX020[[1]])[7],
        area %in% unique(FIX020_raw[[2]])[c(1)]
    ) %>% 
  mutate(area = fct_reorder(area, value, .fun = sum, .desc = TRUE)) %>% 
  filter(time > year(Sys.time()) - 6) %>% 
  #arrange(desc(time)) %>% 
  mutate(time = time %>%  fct_inorder()) %>% 
  spread(time, value)

tab %>% 
  select(-c(species, area)) %>% 
  rename(" " = 1) %>% 
  statgl_table() %>% 
  pack_rows(index = tab[["species"]] %>% table) %>% 
  pack_rows(index = tab[["area"]] %>% table()) %>% 
  add_footnote(sdg14$figs$fig0$units$antal[language] %>% unlist(), notation = "symbol")
2020 2021
Pukkelhval
Vestgrønland
Fangst 4 7
Kvote 10 10
Rådgivning 10 10
* Antal





FIX020 %>% 
  filter(species == unique(FIX020[[1]])[8]) %>% 
  mutate(area = fct_reorder(area, value, .fun = sum, .desc = TRUE)) %>% 
  ggplot(aes(
    x = time,
    y = value, 
    color = key
  )) +
  geom_hline(yintercept = 0, color = "red", size = 3, linetype = "dotted") +
  geom_line(size = 2) +
  facet_wrap( ~ area) +
  scale_y_continuous(breaks = scales:: pretty_breaks()) +
  theme_statgl() + 
  scale_color_statgl(reverse = TRUE) +
  labs(
    title    = unique(FIX020[[1]])[8],
    subtitle = sdg14$figs$fig0$sub[language],
    y        = sdg14$figs$fig0$y_lab[language],
    x        = " ",
    color    = " ",
    caption  = sdg14$figs$fig0$cap[language]
  )

Statistikbanken


tab <- 
  FIX020_raw %>% 
  filter(
    species == unique(FIX020[[1]])[8],
    area %in% unique(FIX020_raw[[2]])[1:2]
    ) %>% 
  mutate(area = fct_reorder(area, value, .fun = sum, .desc = TRUE)) %>% 
  filter(time > year(Sys.time()) - 6) %>% 
  #arrange(desc(time)) %>% 
  mutate(time = time %>%  fct_inorder()) %>% 
  spread(time, value)

tab %>% 
  select(-c(species, area)) %>% 
  rename(" " = 1) %>% 
  statgl_table() %>% 
  pack_rows(index = tab[["species"]] %>% table) %>% 
  pack_rows(index = tab[["area"]] %>% table()) %>% 
  add_footnote(sdg14$figs$fig0$units$antal[language] %>% unlist(), notation = "symbol")
2020 2021
Vågehval
Vestgrønland
Fangst 138 177
Kvote 164 164
Rådgivning 164 164
Østgrønland
Fangst 20 21
Kvote 20 20
Rådgivning 20 20
* Antal





Bruttoværditilvækst for brancher under fiskeri


GS Bruttoværditilvækst for brancher under fiskeri
# Import 
NRX0418_raw <- 
  statgl_url("NRX0418", lang = language) %>%  
  statgl_fetch(
    units     = "K",
    industry  = c("BVTTOT", "BVT0301", "BVT0302", "BVT0303"), 
    time      = px_all(),
    .col_code = TRUE
  ) %>% 
  as_tibble()
  


NRX0418_raw %>% 
  mutate(time = time %>% as.numeric()) %>% 
  mutate(industry = industry %>% str_remove_all("[:digit:]") %>% trimws()) %>% 
  ggplot(aes(
    x = time,
    y = value/1e3,
    color = industry
  )) +
  geom_line(size = 2) +
  facet_wrap(~ industry, scales = "free") +
  theme_statgl() + 
  theme(legend.position = "none") +
  scale_color_statgl() +
  labs(
    title    = sdg14$figs$fig9$title[language],
    subtitle = NRX0418_raw %>% pull(units) %>% unique(),
    y        = sdg14$figs$fig9$y_lab[language],
    x        = " ",
    caption  = sdg14$figs$fig9$cap[language]
  )

Statistikbanken


table <- 
  NRX0418_raw %>% 
  mutate(industry = industry %>% str_remove_all("[:digit:]") %>% trimws() %>% fct_inorder()) %>% 
  mutate(time = time %>% as.numeric()) %>% 
  filter(!time %in% 2019:2020) %>% 
  filter(time >= max(time) - 7) %>% 
  #arrange(desc(time)) %>% 
  mutate(time = time %>% as.character() %>% fct_inorder()) %>% 
  mutate(value = round(value / 1000, 1)) %>% 
  spread(time, value)

table %>% 
  select(-units) %>% 
  rename(" " = 1) %>% 
  statgl_table() %>% 
  pack_rows(index = table[1] %>% table()) %>% 
  add_footnote(sdg14$figs$fig9$y_lab[language], notation = "symbol")
2016 2017 2018 2021 2022 2023
2010-priser, kædede værdier
Bruttoværditilvækst i alt 14,7 14,8 15,0 15,8 16,1 16,3
Kystnært fiskeri 0,3 0,3 0,4 NA NA NA
Udenskærs fiskeri 1,0 1,1 1,1 NA NA NA
Fiskeri i øvrigt 0,3 0,2 0,2 NA NA NA
* Milliarder kroner
NRX13_raw <- 
  statgl_url("NRX13", lang = language) %>% 
  statgl_fetch(
    Kode  = c("VBVT0301", "VBVT0302", "VBVT0303"),
    time      = px_all(),
    .col_code = TRUE
  ) %>% 
  as_tibble() %>% 
  rename("industry" = 1, "time" = 2)

NRX13_raw %>% 
  drop_na() %>% 
  mutate(industry = industry %>% str_remove_all("[:digit:]") %>% trimws() %>% fct_rev()) %>% 
  mutate(time = time %>% as.numeric()) %>% 
  ggplot(aes(
    x = time,
    y = value,
    color = industry
  )) +
  geom_line(size = 2) +
  geom_hline(yintercept = 0, linetype = "dashed") + 
  facet_wrap(~ industry, scales = "free", ncol = 1) +
    scale_y_continuous(labels  = scales::percent_format(
    scale = 1
  )) +
  theme_statgl() + 
  theme(legend.position = "none") +
  scale_color_statgl() +
  labs(
    title    = sdg14$figs$fig11$title[language],
    y        = sdg14$figs$fig11$y_lab[language],
    x        = " ",
    caption  = sdg14$figs$fig11$cap[language]
  )

Statistikbanken


NRX13_raw %>% 
  drop_na() %>% 
  mutate(industry = industry %>% str_remove_all("[:digit:]") %>% trimws() %>% fct_rev()) %>% 
  mutate(time = time %>% as.numeric()) %>% 
  filter(time >= max(time) -5) %>% 
  #arrange(desc(time)) %>% 
  mutate(time = time %>% as.character() %>% fct_inorder()) %>% 
  spread(time, value) %>% 
  rename(" " = 1) %>% 
  statgl_table() %>% 
  add_footnote(sdg14$figs$fig11$y_lab[language], notation = "symbol")
2015 2016 2017 2018 2019 2020
Udenskærs fiskeri -1,59 1,43 1,05 -0,39 0,45 0,12
Kystnært fiskeri -1,84 1,28 -0,02 0,55 0,26 -0,41
Fiskeri i øvrigt 0,04 0,43 -0,43 -0,11 0,22 -0,41
* Procentpoint