Statbank API - PxWebApi
API Code Examples
Code examples for Statistics Norway's API.
R, Highcharts, Excel, JSON-Stat etc.
Highcharts
Examples using the library JSON-Stat javacript Toolkit together with Highcharts and Jquery.
- A very simple line chart based on a very small dataset
- Line chart based on a dataset on unemployment
- Simple line chart using http POST query and the filter top
- CPI line chart using POST and filter all
- More Highcharts examples
Python
Http POST in Python using the JSON-Stat library pyjstat
- pyjstat example
- stats-to-pandas From StatBank to Python pandas
R
Statistics Norway has made two packages:
- PxWebApiData: Function to read PX-Web(Statbank) data into R via API. Example of use
- KlassR : R package for standard classifications at Statistics Norway
R examples, using libraries rjstat for JSON-Stat og httr
- Simple example using readymade dataset (GET)
- API: Create your own dataset example (POST)
- Simple example using Eurostat API (GET)
Excel / Power BI
Check out the service:
Q4OpenData - Query for OpenData, which generate script-code.
Select: Statistics Norway from the menu, or see
short video
---
The JSON-stat Explorer is a useful tool for understanding JSON-stat.
Contact
-
- statistikkbanken@ssb.no