Learn R Programming

PxWebApiData (version 1.9.0)

PX-Web Data by API

Description

Function to read PX-Web data into R via API. The example code reads data from the three national statistical institutes, Statistics Norway, Statistics Sweden and Statistics Finland.

Copy Link

Version

Install

install.packages('PxWebApiData')

Monthly Downloads

375

Version

1.9.0

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Oyvind Langsrud

Last Published

February 2nd, 2026

Functions in PxWebApiData (1.9.0)

metadata_url

Convert between data and metadata URLs
Number

Adding leading zeros
ensure_json_stat2

Ensure JSON-stat2 output format in PxWebApi v2 URLs
info

Extract info or note parts of the comment attribute
api_data

PX-Web Data by API
get_api_data

PX-Web Data by API (GET)
list_to_df_expand

Create a data.frame from a structured list
list_records_to_df

Convert a list of records to a data.frame
ApiData

PX-Web Data by API
meta_frames

Structured PxWebApi v2 metadata
meta_code_list

PxWebApi v2 metadata for a code list
meta_data

PxWebApi v2 metadata for a table
query_url

PX-Web API query URL
make_url

Make data url from table id
MakeUrl

MakeUrl from id