# Import
OFXUKN1_raw <-
statgl_url("OFXUKN1", lang = "da") %>%
statgl_fetch(
keyfigures = "_3sum_ald_3_5_x",
"daycare institutions" = 1:5,
.col_code = TRUE) %>%
as_tibble()
# Transform
OFXUKN1 <-
OFXUKN1_raw %>%
mutate(time = time %>%
make_date())
# Plot
OFXUKN1 %>%
ggplot(aes(
x = time,
y = value,
fill = `daycare institutions`
)) +
geom_col() +
scale_y_continuous(labels = scales::unit_format(
suffix = " ",
big.mark = ".",
decimal.mark = ","
)) +
theme_statgl() +
scale_fill_statgl(reverse = TRUE,
guide = guide_legend(reverse = TRUE)) +
labs(
title = "Børn i dagtilbud, 3-5 år",
x = " ",
y = "Antal børn",
fill = " ",
caption = "Kilde: https://bank.stat.gl/OFDUKN1"
)
# Import
OFXUKN1_raw <-
statgl_url("OFXUKN1", lang = "da") %>%
statgl_fetch(
keyfigures = "_3sum_ald_3_5_x",
"daycare institutions" = 1:5,
residence = c("By", "Bygd"),
.col_code = TRUE) %>%
as_tibble()
# Transform
OFXUKN1 <-
OFXUKN1_raw %>%
mutate(time = time %>% make_date())
# Plot
OFXUKN1 %>%
ggplot(aes(
x = time,
y = value,
fill = `daycare institutions`
)) +
geom_col() +
facet_wrap(~ residence,
scales = "free_y") +
theme_statgl() +
scale_fill_statgl(reverse = TRUE,
guide = guide_legend(reverse = TRUE)) +
labs(
title = "Børn i dagtilbud efter bosted, 3-5 år",
x = " ",
y = "Antal børn",
fill = NULL,
caption = "Kilde: https://bank.stat.gl/OFDUKN1"
)
# Import
UDXTKB_raw <-
statgl_url("UDXTKB", lang = "da") %>%
statgl_fetch(
subject = px_all(),
grade = c(3, 7),
unit = "B",
.col_code = TRUE) %>%
as_tibble()
# Transform
UDXTKB <-
UDXTKB_raw %>%
mutate(time = time %>%
make_date())
# Plot
UDXTKB %>%
ggplot(aes(
x = time,
y = value,
color = subject
)) +
geom_line(size = 2) +
facet_wrap(~ grade) +
scale_y_continuous(labels = scales::percent_format(
scale = 1,
accuracy = 1,
big.mark = ".",
decimal.mark = ","
)) +
theme_statgl() +
scale_color_statgl() +
labs(
title = "Trintest-resultater",
subtitle = "Løsningssikkerhed (pct. rigtige)",
x = " ",
y = " ",
color = "Fag",
caption = "Kilde: https://bank.stat.gl/UDDTKB"
)
# Import
UDXTKB_raw <-
statgl_url("UDXTKB", lang = "da") %>%
statgl_fetch(
subject = px_all(),
grade = c(3, 7),
unit = "B",
"place of residence" = 1:2,
.col_code = TRUE) %>%
as_tibble()
# Transform
UDXTKB <-
UDXTKB_raw %>%
mutate(time = time %>% make_date())
# Plot
UDXTKB %>%
ggplot(aes(
x = time,
y = value,
color = subject
)) +
geom_line(size = 2) +
facet_grid(grade ~ `place of residence`) +
scale_y_continuous(labels = scales::percent_format(
scale = 1,
accuracy = 1,
big.mark = ".",
decimal.mark = ","
)) +
theme_statgl() +
scale_color_statgl() +
labs(
title = "Trintest-resultater efter bosted",
subtitle = "Løsningssikkerhed (pct. rigtige)",
x = " ",
y = " ",
color = "Fag",
caption = "Kilde: https://bank.stat.gl/UDDTKB"
)
# Import
UDXFKK_raw <-
statgl_url("UDXFKK", lang = "da") %>%
statgl_fetch(
unit = "Avg",
grade = "FO",
subject = c("01", "02", "03", "04"),
"type of grades" = 56:58,
.col_code = TRUE) %>%
as_tibble()
# Transform
UDXFKK <-
UDXFKK_raw %>%
mutate(`type of grades` = `type of grades` %>%
str_remove_all("Prøvekarakter -") %>%
trimws() %>%
str_to_title())
# Plot
UDXFKK %>%
mutate(time = time %>% make_date()) %>%
ggplot(aes(
x = time,
y = value,
color = `type of grades`
)) +
geom_line(size = 2) +
facet_wrap( ~ subject, ncol = 2) +
theme_statgl() +
scale_color_statgl() +
labs(
title = "Prøvekarakterer for folkeskolens afgangselever",
color = "Karaktertype",
x = "",
y = "Karaktergennemsnit",
caption = "Kilde: https://bank.stat.gl/UDDFKK"
)
# Import
UDXTRFA1_raw <-
statgl_url("UDXTRFA1", lang = "da") %>%
statgl_fetch(
"number of years after lower secondary education" = 2,
"educational status" = px_all(),
"graduation year" = px_all(),
.col_code = TRUE) %>%
as_tibble()
# Transform
UDXTRFA1 <-
UDXTRFA1_raw %>%
mutate(`graduation year` = `graduation year` %>% make_date())
# Plot
UDXTRFA1 %>%
ggplot(aes(
x = `graduation year`,
y = value,
fill = `educational status`
)) +
geom_col(positi