
pixieweb is an R client for PX-Web statistical APIs. It provides a pipe-friendly, tibble-based interface for discovering and downloading data from national statistics agencies — including SCB (Sweden), SSB (Norway), Statistics Finland, and more.
Note on pxweb: The excellent pxweb package by rOpenGov already provides comprehensive R access to PX-Web APIs. pixieweb is not a replacement — it offers an alternative paradigm built around search-then-fetch discovery and progressive disclosure. If you already use pxweb and it works for you, there is no need to switch. Choose the workflow that fits your needs.
Install the development version from GitHub:
# install.packages("pak")
pak::pak("lchansson/pixieweb")library(pixieweb)
# Connect to Statistics Sweden
scb <- px_api("scb", lang = "en")
# Search for tables about population
tables <- get_tables(scb, query = "population")
# Inspect variables in a table
vars <- get_variables(scb, tables$id[1])
# Download data
data <- get_data(scb, tables$id[1])px_all(),
px_top(), px_bottom(), px_from(),
px_to(), px_range() for concise variable
selectionspixieweb_cache_dir()AGPL (>= 3)