Skip to main content

A Python- and pandas-powered client for Statistical Data and Metadata eXchange

Project description

pandaSDMX is an Apache 2.0-licensed Python package aimed at becoming the most intuitive and versatile tool to retrieve and acquire statistical data and metadata disseminated in SDMX format. It should work with all+ SDMX data providers supporting SDMX 2.1. Currently the only known SDMX 2.1-compliant agencies are the European statistics office (Eurostat, more than 5700 dataflows) and the European Central Bank (ECB, more than 70 dataflows). While pandaSDMX is extensible to cater any output format, it currently supports only pandas, the gold-standard of data analysis in Python. But from pandas you can export your data to Excel and friends.

Main features

  • intuitive API inspired by requests

  • support for many SDMX features including

    • generic datasets

    • data structure definitions, codelists and concept schemes

    • dataflow definitions

    • categorisations and category schemes

  • pythonic representation of the SDMX information model

  • find dataflows by name or description in multiple languages if available

  • read and write local files for offline use

  • writer transforming SDMX generic datasets into multi-indexed pandas DataFrames or Series of observations and attributes

  • extensible through custom readers and writers for alternative input and output formats of data and metadata

Example

>>> from pandasdmx import Request
>>> # Get annual unemployment data from Eurostat
>>> une_resp = Request('ESTAT').get(resource_type = 'data', resource_id = 'une_rt_a')
>>> # From the received dataset, select the time series on Greece, Ireland and Spain, and write them to a pandas DataFrame
>>> une_df = une_resp.write(s for s in une_resp.msg.data.series if s.key.GEO in ['EL', 'ES', 'IE'])
>>> # Explore the DataFrame
>>> une_df.columns.names
>>> une_df.columns.levels[0:2]
>>> une_df.loc[:'2006', ('TOTAL', 'T')]

Version 0.2.0 (2015-04)

This version is a quantum leap. The whole project has been redesigned and rewritten from scratch to provide robust support for many SDMX features. The new architecture is centered around a pythonic representation of the SDMX information model. It is extensible through readers and writers for alternative input and output formats. Export to pandas has been dramatically improved. Sphinx documentation has been added.

v0.1 (2014-09)

Initial release

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pandaSDMX-0.2.0.tar.gz (51.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pandaSDMX-0.2.0-py2.py3-none-any.whl (94.0 kB view details)

Uploaded Python 2Python 3

File details

Details for the file pandaSDMX-0.2.0.tar.gz.

File metadata

  • Download URL: pandaSDMX-0.2.0.tar.gz
  • Upload date:
  • Size: 51.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pandaSDMX-0.2.0.tar.gz
Algorithm Hash digest
SHA256 af5ad5d54362a02df9aac6ff724bbdc0ca64722536c0da209a72118516e8adc2
MD5 ac63d1db4a49daafc94b7ce51e357f1f
BLAKE2b-256 5e75ce2f5ca013838e8e4c8841dd3b4a271a5f511ba7c451d013d01581477381

See more details on using hashes here.

File details

Details for the file pandaSDMX-0.2.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for pandaSDMX-0.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 56961ed4967882c476d84b4a1df957e89a80de6936b18ce7d059ce26610d2de6
MD5 93073d49d4dcebcb45450e6138f1ee8a
BLAKE2b-256 a771d03c24ecba05b383d98acbbeddaadda72c2103041d9d9061b88bb6558ea0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page