Pxwebapi arrow¶
Features¶
Fetch metadata for a table from any Pxweb 2 API, like Statistics Norways “Statistikkbanken” or Statistics Swedens “Statistikdatabasen”
Fetch data from a table, from a API with Parquet support.
Installation¶
You can install Pxwebapi arrow from PyPI. We recomend using a package manager like uv, poetry or pdm.
uv add ssb-pxapi2-arrow
Usage¶
Fetch metadata about a table
from pxwebapi import PxAPI, STATBANK_CONFIG
statbank = PxAPI(STATBANK_CONFIG)
meta = statbank.get_table_metadata(14216)
print(f"Table last updated: {meta.updated}")
Get data from the table
df = statbank.get_table(
14216, value_codes={"ContentsCode": "Bosatte", "TettSted": "*", "Region": "*", "Tid": "*"}
)
Please see the [Reference Guide] for details.
Contributing¶
Contributions are very welcome. To learn more, see the Contributor Guide.
License¶
Distributed under the terms of the MIT license, Pxwebapi arrow is free and open source software.
Issues¶
If you encounter any problems, please file an issue along with a detailed description.
Credits¶
This project was generated from Statistics Norway’s SSB PyPI Template.