Skip to main content

Basic package for querying & downloading EuroStat data by dataset name or ID.

Project description

EuroStatPy

Upload Python Package

Unit Tests

Basic package for querying & downloading EuroStat data by dataset name or ID. Currently saves data into JSONStat format or a pandas.DataFrame.

Allows for querying datasets via plain text search or table ID.

Installation

pip install eurostatpy

Usage

Importing

from eurostatpy import EuroStatPy
euroStat = EuroStatPy()

Download Data by Name

euroStat.get_table_from_name("Energy taxes by paying sector")
>>> `JSONStat` object

euroStat.get_table_from_name_as_pandas("Energy taxes by paying sector")
>>> `pandas.DataFrame` object

Download Data by ID

euroStat.get_table_from_id("rail_tf_ns20_hu")
>>> `JSONStat` object

euroStat.get_table_from_id_as_pandas("rail_tf_ns20_hu")
>>> `pandas.DataFrame` object

List Available Table Names in English, French, and German

euroStat.datasets_en
>>> ["Population connected to wastewater treatment plants", ...]
euroStat.datasets_fr
>>> ["Compte courant - données trimestrielles", ...]
euroStat.datasets_de
>>> ["Leistungsbilanz - vierteljährliche Daten", ...]

List Available Table IDs

euroStat.codes
>>> ["env_waspb", "rail_tf_ns20_hu", ...]

Print Available Datasets in English, French, and German

euroStat.list_datasets()
>>> "1. Dataset: Current account - quarterly data | Code: ei_bpm6ca_q
     2. Dataset: Financial account - quarterly data | Code: tipsbp48
     ...
     6930. Dataset: Youth unemployment ratio by sex, age and NUTS 2 regions | Code: yth_empl_140"
euroStat.list_datasets(language = "fr")
>>> "1. Compte courant - données trimestrielles | Code: ei_bpm6ca_q
     2. Dataset: Compte financier - données trimestrielles | Code: tipsbp48
     ...
     6920. Dataset: Ratio de chômage des jeunes par sexe, âge et région NUTS 2 | Code: yth_empl_140"
euroStat.list_datasets(language = "de")
>>> "1. Dataset: Leistungsbilanz - vierteljährliche Daten | Code: tipsbp40
     2. Dataset: Finanzierungskonto - vierteljährliche Daten | Code: tipsbp48
     ...
     6922. Dataset: Anteil der arbeitslosen Jugendlichen nach Geschlecht, Alter und NUTS-2-Regionen | Code: yth_empl_140"

Further Reading

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

eurostatpy-1.1.0.tar.gz (1.4 MB view details)

Uploaded Source

Built Distribution

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

eurostatpy-1.1.0-py3-none-any.whl (1.5 MB view details)

Uploaded Python 3

File details

Details for the file eurostatpy-1.1.0.tar.gz.

File metadata

  • Download URL: eurostatpy-1.1.0.tar.gz
  • Upload date:
  • Size: 1.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for eurostatpy-1.1.0.tar.gz
Algorithm Hash digest
SHA256 58d52fa6bc3f9c5b4722d26c224201403bf136afbaa1342abae2650d5a386178
MD5 ac3de71776ce3d3bdbb61d433d0fbfeb
BLAKE2b-256 e31e8eda943db4ac2f70284d9dcdf2df7570f30f6b2b94871c42cc9447cf704d

See more details on using hashes here.

File details

Details for the file eurostatpy-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: eurostatpy-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 1.5 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for eurostatpy-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7e087b7305e9927bedb00f80ccf37783c0f32bc4fabe17ccfa486082d41d970c
MD5 af1163ff3e7cfa2ce7b7e5ebb762ec99
BLAKE2b-256 98d46d891e6dcd2c3a0526ea7490557e81a6a24cd7dc3dbf15d3b40d95406fed

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