GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • pystatis
  • Installation
  • Getting started
  • Usage
  • Roadmap
  • Developer Information
  • License
  • Setup pystatis
  • The Table Class
  • Geovisualization of Data on the Map of Germany
  • Finding the Right Tables
  • Jobs: Loading Large Tables
  • pystatis Presentation for Data Journalists
  • pystatis package

This view

  • Original page
  • New address

GeezerVison is showing correlaid.github.io — pystatis — pystatis

pystatis

codecov Tests, Code Quality and Documentation GitHub Pages Documentation Release to PyPI

pystatis is a Python wrapper for the different GENESIS web service interfaces (API). Currently we are supporting the following databases:

  • GENESIS-Online

  • Regionaldatenbank

  • Zensus Datenbank

The main features are:

  • Simplified access to all supported API. No more need to write cumbersome API calls or switch between databases.

  • Credential management removes the need to manually add credentials. We handle all your credentials for you.

  • Database management handles different databases and lets you switch easily between them.

  • Integrated workflow enables an end-to-end process from finding the relevant data to downloading it.

  • Pandas support instead of manually parsing results.

  • Caching to enable productive work despite strict query limits.

  • Starting and handling background jobs for datasets that are too big to be downloaded directly from GENESIS.

To learn more about GENESIS, please refer to the official documentation here.

The full documentation of the main and dev branches are hosted via GitHub Pages (main) and GitHub Pages (dev).

Zensus 2022 update

The new Zensus has finally arrived and been published. However, old credentials are no longer valid and the base url has changed, too. If you have worked with pystatis and Zensus database before, you need to update your config. You can do so in two ways:

Create a new config:

  1. Delete your current user config manually or via pystatis.config.delete_config().

  2. Restart your Python session and import pystatis again, this will create a new default config.

  3. Set up your credentials via pystatis.setup_credentials().

Update your config:

  1. It is not enough to just change your credentials, you also have to change the base_url.

  2. That is why you have to manually open the current config.ini and change both username and password as well as the base_url for the Zensus database.

You can test your changes by calling pystatis.logincheck("zensus").

API Token

Zensus database now also supports authentication with an API token instead of the classic username and password. You can get your token from the Webservice interface info page when being logged in. You can use the token instead of your username, and leave the password blank. There is no extra field or parameter for the token, so you have to pass it as your username. That means pystatis is already supporting it, you can just put it as your username and leave the password blank.

Contents

  • Installation
  • Getting started
  • Usage
    • The GENESIS data model
    • Find the right data
    • Download data
    • Clear Cache
  • Roadmap
  • Developer Information
    • Contributor information
  • License

Notebooks

  • Setup pystatis
  • The Table Class
    • Downloading data
    • How pystatis prepares the data for you
    • All get_data() parameters explained
  • Geovisualization of Data on the Map of Germany
    • Libraries Overview
    • Visualization on the Level of Bundesländer
    • Visualization on the Level of Landkreise
  • Finding the Right Tables
  • Jobs: Loading Large Tables
  • pystatis Presentation for Data Journalists
    • CorrelAid
    • pystatis
    • Main Use Cases
    • Advanced Features
    • Geo-Visualization
    • Outlook

Modules

  • pystatis package
    • pystatis.cache module
    • pystatis.config module
    • pystatis.custom_exceptions module
    • pystatis.find module
    • pystatis.helloworld module
    • pystatis.http_helper module
    • pystatis.profile module
    • pystatis.table module
  • Overall Module contents
    • Find
    • Table
    • clear_cache()
    • logincheck()
    • setup_credentials()
    • whoami()

Indices and tables

  • Index

  • Module Index

  • Search Page

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.