All Projects → CorrelAid → Datenguide Python

CorrelAid / Datenguide Python

Licence: mit

Projects that are alternatives of or similar to Datenguide Python

Nyc uber forecasting
Forecasting Uber demand in NYC neighborhoods
Stars: ✭ 29 (-3.33%)
Mutual labels:  jupyter-notebook
Doing Frequentist Statistics With Scipy
Repository for the PyData DC 2016 tutorial
Stars: ✭ 29 (-3.33%)
Mutual labels:  jupyter-notebook
An Unexpectedly Large Count Of Trees In The Western Sahara And Sahel
This repository contains the code for the paper "An unexpectedly large count of trees in the western Sahara and Sahel".
Stars: ✭ 29 (-3.33%)
Mutual labels:  jupyter-notebook
Machine learning notebooks
Stars: ✭ 29 (-3.33%)
Mutual labels:  jupyter-notebook
Kaggle Web Traffic Time Series Forecasting
Solution to Kaggle - Web Traffic Time Series Forecasting
Stars: ✭ 29 (-3.33%)
Mutual labels:  jupyter-notebook
Super Resolution
Tensorflow 2.x based implementation of EDSR, WDSR and SRGAN for single image super-resolution
Stars: ✭ 952 (+3073.33%)
Mutual labels:  jupyter-notebook
Dscourses19
ECON 5253: Data Science for Economists, University of Oklahoma (Spring 2019)
Stars: ✭ 29 (-3.33%)
Mutual labels:  jupyter-notebook
Deep Hedging
Deep Hedging Demo - An Example of Using Machine Learning for Derivative Pricing.
Stars: ✭ 30 (+0%)
Mutual labels:  jupyter-notebook
Particle Filter Prototype
Particle Filter Implementations in Python and C++, with lecture notes and visualizations
Stars: ✭ 29 (-3.33%)
Mutual labels:  jupyter-notebook
Islplot
Library to plot integer sets and maps
Stars: ✭ 29 (-3.33%)
Mutual labels:  jupyter-notebook
Potter
Using NLTK to run an analysis on the Harry Potter corpus - different versions of this talk were given at Codeland in NYC and DjangoCon US in San Diego in 2018.
Stars: ✭ 29 (-3.33%)
Mutual labels:  jupyter-notebook
Zalando Pytorch
Various experiments on the [Fashion-MNIST](https://github.com/zalandoresearch/fashion-mnist) dataset from Zalando
Stars: ✭ 29 (-3.33%)
Mutual labels:  jupyter-notebook
Python for ml
brief introduction to Python for machine learning
Stars: ✭ 29 (-3.33%)
Mutual labels:  jupyter-notebook
Hottbox Tutorials
📙 HOTTBOX: Higher Order Tensors ToolBOX. Tutorials
Stars: ✭ 29 (-3.33%)
Mutual labels:  jupyter-notebook
Neuromatch Academy
Preparatory Materials, Self-guided Learning, and Project Management for Neuromatch Academy activities
Stars: ✭ 30 (+0%)
Mutual labels:  jupyter-notebook
Skymap
High-throughput gene to knowledge mapping through massive integration of public sequencing data.
Stars: ✭ 29 (-3.33%)
Mutual labels:  jupyter-notebook
Course
Slides and Jupyter notebooks
Stars: ✭ 29 (-3.33%)
Mutual labels:  jupyter-notebook
Ukbiobank deep pretrain
Pretrained neural networks for UK Biobank brain MRI images. SFCN, 3D-ResNet etc.
Stars: ✭ 29 (-3.33%)
Mutual labels:  jupyter-notebook
Kaggle rsna 2nd place solution
Notebooks to accompany the blog posts about the 2nd place Kaggle RSNA winners: https://github.com/darraghdog/rsna
Stars: ✭ 30 (+0%)
Mutual labels:  jupyter-notebook
Machinelearning fall2015
BUS 41204: Machine Learning
Stars: ✭ 29 (-3.33%)
Mutual labels:  jupyter-notebook

Datenguide Python

.. image:: https://img.shields.io/pypi/v/datenguidepy.svg :target: https://pypi.python.org/pypi/datenguidepy

.. image:: https://img.shields.io/travis/CorrelAid/datenguide-python.svg :target: https://travis-ci.org/CorrelAid/datenguide-python

.. image:: https://readthedocs.org/projects/datenguidepy/badge/?version=latest :target: https://datenguidepy.readthedocs.io/en/latest/readme/#quick-start

.. image:: https://mybinder.org/badge_logo.svg :target: https://mybinder.org/v2/gh/CorrelAid/datenguide-python/master?filepath=use_case

The package provides easy access to German publicly available regional statistics. It does so by providing a wrapper for the GraphQL API of the Datenguide project.

Features

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.

Automatic inclusion of relevant meta data Queries automatically retrieve some meta data along with the actual data to give the user more convenient access to the statistics without having to worry about too many technichal details

Full fidelity data The package provides full fidelity data access to the datenguide API. This allows all use cases to use precicely the data that they need if it is available. It also means that most data cleaning has to be done by the user.

Quick Start

============ Install

To use the package install the package (command line):

.. code-block:: python

pip install datenguidepy

=============== Minimal example

To see the package work and obtain a DataFrame containing some statistics, the followin constitutes a minimal example.

.. code-block:: python

from datenguidepy import Query

q = Query.region('01')
q.add_field('BEV001')
result_df = q.results()

================ Complex examples

These examples is intendend to illustrate many of the package's features at the same time. The idea is to give an impression of some of the possibilities. A more detailed explanation of the functionality can be found in the the rest of the documentation.

.. code-block:: python

q = Query.region(['02','11'])
stat = q.add_field('BEVSTD')
stat.add_args({'year' : [2011,2012]})
stat2 = q.add_field('AI1601')
stat2.add_args({'year' : [2011,2012]})
q.results(
    verbose_statistics = True,
    add_units = True,
).iloc[:,:7]

==== ==== ======= ====== ============================================= ============= ============================ ============= .. id name year Verfügbares Einkommen je Einwohner (AI1601) AI1601_unit Bevölkerungsstand (BEVSTD) BEVSTD_unit ==== ==== ======= ====== ============================================= ============= ============================ ============= 0 02 Hamburg 2011 22695 EUR 1718187 Anzahl 1 02 Hamburg 2012 22971 EUR 1734272 Anzahl 0 11 Berlin 2011 18183 EUR 3326002 Anzahl 1 11 Berlin 2012 18380 EUR 3375222 Anzahl ==== ==== ======= ====== ============================================= ============= ============================ =============

.. code-block:: python

q = Query.region('11')
stat = q.add_field('BEVSTD')
stat.add_args({
    'GES' : 'GESW',
    'statistics' : 'R12411',
    'NAT' : 'ALL',
    'year' : [1995,1996]
})
stat.add_field('GES')
stat.add_field('NAT')
q.results(verbose_enums = True).iloc[:,:6]

==== ==== ====== ======== ================ ====== ======== .. id name GES NAT year BEVSTD ==== ==== ====== ======== ================ ====== ======== 0 11 Berlin weiblich Ausländer(innen) 1995 191378 1 11 Berlin weiblich Deutsche 1995 1605762 2 11 Berlin weiblich Gesamt 1995 1797140 3 11 Berlin weiblich Deutsche 1996 1590407 4 11 Berlin weiblich Ausländer(innen) 1996 195301 5 11 Berlin weiblich Gesamt 1996 1785708 ==== ==== ====== ======== ================ ====== ========

======================================= Get information on fields and meta data

Get information on region ids

.. code-block:: python

from datenguidepy import get_regions

get_regions()

Use pandas query() functionality to get specific regions. E.g., if you want to get all IDs on "Bundeländer" use. For more information on "nuts" levels see Wikipedia_.

.. code-block:: python

get_regions().query("level == 'nuts1'")

Get information on statistic shortnames

.. code-block:: python

from datenguidepy import get_statistics

get_statistics()
# return statistical descriptions in English
get_statistics(target_language = 'en')

Get information on single fields

You can further information about description, possible arguments, fields and enum values on a field you added to a query.

.. code-block:: python

q = Query.region("01")
stat = q.add_field("BEV001")
stat.get_info()

=================== Further information

For detailed examples see the notebooks within the use_case_ folder.

For a detailed documentation of all statistics and fields see the Datenguide API.

Credits

All this builds on the great work of Datenguide_ and their GraphQL API datenguide/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"_.

This package was created with Cookiecutter_ and the audreyr/cookiecutter-pypackage_ project template.

.. _Cookiecutter: https://github.com/audreyr/cookiecutter .. _audreyr/cookiecutter-pypackage: https://github.com/audreyr/cookiecutter-pypackage .. _datenguide/datenguide-api: https://github.com/datenguide/datenguide-api .. _Datenguide: https://datengui.de/ .. _GraphQL API of the Datenguide project: https://github.com/datenguide/datenguide-api .. _regional statistics: https://www.regionalstatistik.de/genesis/online/logon .. _use_case: https://github.com/CorrelAid/datenguide-python/tree/master/use_case .. _credited according to the "Datenlizenz Deutschland – Namensnennung – Version 2.0": https://www.regionalstatistik.de/genesis/online;sid=C636A83329D19AF20E3A4F9E767576A9.reg2?Menu=Impressum .. _Wikipedia: https://de.wikipedia.org/wiki/NUTS:DE#Liste_der_NUTS-Regionen_in_Deutschland_(NUTS_2016)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].