Skip to contents

Connect to a PX-Web API

Create API connection objects and check availability.

px_api() print(<px_api>) format(<px_api>)
Connect to a PX-Web API
px_api_catalogue()
List known PX-Web API instances
px_available()
Check if a PX-Web API is reachable

Discover tables

Search, inspect, and filter statistical tables.

get_tables()
Get tables from a PX-Web API
table_search()
Client-side search on a table tibble
table_describe()
Print human-readable table summaries
table_enrich()
Enrich a table tibble with full metadata
table_minimize()
Remove monotonous columns from a table tibble
table_extract_ids()
Extract table IDs from a table tibble

Explore variables

Examine dimensions and available values within a table.

get_variables()
Get variables (dimensions) for a table
variable_search()
Client-side search on a variable tibble
variable_describe()
Print human-readable variable summaries
variable_minimize()
Remove nested columns for a compact variable overview
variable_extract_ids()
Extract variable codes from a variable tibble
variable_values()
Extract values for a specific variable
variable_name_to_code()
Convert variable names to codes

Codelists

Alternative groupings and aggregations of variable values.

get_codelists()
Get codelists for a variable in a table
codelist_describe()
Print human-readable codelist summaries
codelist_extract_ids()
Extract codelist IDs
codelist_values()
Extract values for a specific codelist

Prepare and fetch data

Build queries with smart defaults and download data.

prepare_query() print(<px_query>)
Prepare a data query with smart defaults
get_data()
Fetch data from a PX-Web table
px_all() px_top() px_bottom() px_from() px_to() px_range() print(<px_selection>)
Create a PX-Web selection object

Data utilities

Post-processing helpers for downloaded data.

data_minimize()
Remove monotonous columns from a data tibble
data_legend()
Generate a plot legend from variable metadata
data_comments()
Extract comments from data
px_cite()
Generate a citation for downloaded data

Advanced query composition

Low-level functions for building and executing raw API queries.

compose_table_query()
Compose a table query URL
compose_data_query()
Compose a data query
execute_query()
Execute a composed query
get_saved_query()
Execute a saved query
save_query()
Save a query on the server

Cache management

pixieweb_cache_dir()
Get the persistent pixieweb cache directory
pixieweb_clear_cache()
Clear pixieweb cache files