Provids easy access to German publically availible regional statistics
- Free software: MIT license
- Documentation: https://datenguide-python.readthedocs.io.
- Overview of available statistics and regions:
- The package provides DataFrames with the available statistics and regions, which can be queried by the user without having to refer to expert knowledge on regional statistics or the documentation of the underlying GraphQL API
- Build and Execute Queries:
- The package provides the user an object oriented interface to build queries that fetch certain statistics and return the results as a pandas DataFrame for further analysis.
To use the package install the package (command line):
pip install datenguidepy
Within your python file or notebook:
- Import the package
from datenguidepy.query_builder import Query
- Creating a query
- either for single regions
query = Query.region('01')
- or for all subregions a region (e.g. all Kommunen in a Bundeland)``
query_allregions = Query.allRegions(parent='01')
- Add statistics (fields)
- Add statistics you want to get data on (How do I find the short name of the statistics?(LINK))
- Add filters
- A field can also be added with filters. E.g. you can specify, that only data from a specific year shall be returned.
- Add subfield
- A set of default subfields are defined for all statistics (year, value, source). If additional fields shall be returned, they can be specified as a field argument.
- Get results
- Get the results as a Pandas DataFrame
df = query.results()
Get information on fields and meta data
For detailed examples see the notebooks in the use_case folder.
For a detailed documentation of all statistics and fields see the _Datenguide API.
The data is retrieved via the Datenguide API from the “Statistische Ã„mter des Bundes und der LÃ¤nder”. Data being used via this package has to be credited according to the “Datenlizenz Deutschland â€“ Namensnennung â€“ Version 2.0”.
- First release on PyPI.
- Cleanup of the first release regarding naming, authors and docs.
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size datenguidepy-0.1.1-py2.py3-none-any.whl (130.0 kB)||File type Wheel||Python version py2.py3||Upload date||Hashes View|
|Filename, size datenguidepy-0.1.1.tar.gz (142.8 kB)||File type Source||Python version None||Upload date||Hashes View|
Hashes for datenguidepy-0.1.1-py2.py3-none-any.whl