## Read data directly from Statistics Greenland website using 'pxweb'
library(pxweb)
library(dplyr)
url <- "https://bank.stat.gl/api/v1/en/Greenland/BE/BE80/BEXFERTR.PX"
query <- list(area = "ALL",
"mother's year of birth" = as.character(1950:2006),
"mother's age" = "*",
gender = c("K", "M"),
time = as.character(2011:2020))
pxweb_births <- pxweb_get(url = url,
query = query) %>%
as.data.frame(column.name.type = "text",
variable.value.type = "text")
saveRDS(pxweb_births,
file = "data-raw/pxweb_births.rds")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.