Welcome to today's workshop! This page will guide you through the Destatis workshop at 37c3, Day 4.
- This workshop requires beginner programming/data analysis skills: You should have an editor of your choise set up, and be able to do basic things like read in a csv file.
- The workshop materials use Python 3.
- To access the Destatis API, you'll need to registeer an account.
- Go to Genesis-Online Registration.
- Click
Registrieren
and follow the instructions.
- Clone or download this repository to your local machine.
- Git Clone: Use git clone. Learn how to do this here.
- GitHub Download: Go to the GitHub page, click the green "Code" button, then "Download ZIP".
- If unfamiliar with Git, simply ensure you download and extract the files to your computer.
- Duplicate the
config/login_example.yaml
file. - Rename the duplicate to
config/login.yaml
. - Enter your Destatis login credentials in this file.
- (Optional) Set up a virtual environment for package management.
- Install required packages using pip:
Run
pip install -r requirements.txt
in your terminal or command prompt.
Try out the notebook to look at pay by gender!
- Notebook Name:
get_data.ipynb
- Open and run the notebook to try out the workshop material. This notebook is designed to guide you through the process of fetching data using the API.
Discover data attributes in Destatis:
-
Use the Destatis Online Search to look for specific attributes, like
geschlecht
.- You can get lists of tables directly from the notebook, but the website is more user-friendly for getting an overview.
- This search will provide an overview of tables containing the searched variable. Note down the table ID numbers for API interactions.
-
The API handbook will be your friend.
- Compatibility: This code has been tested using Python version
3.10.9
. - For any questions, clarifications, or feedback regarding the workshop content, feel free to raise your hand or contact me afterwards!