scripts.household
Define functions to count households by income, household type, age and household size.
This module provides functions for processing household demographic data from SOEP (Socio-Economic Panel) surveys. The functions handle encoding transformations, classification of households, and calculation of income quintiles.
- Functions defined in this script:
household_types: Replace encoding of household types with custom encoding
size_class: Assign household size class to every person
age_class: Assign age classes to every person
income_quintiles: Calculate weighted income quintiles
- Disaggregation of households in inhabit matrix:
Region –> Income Quantile –> household type –> age –> number of people
Functions are applied in “inhabit_matrix.py”.
Functions
|
Assign age classes to every person. |
|
Replace encoding of household types with custom encoding. |
|
Calculate weighted income quintiles for DataFrame and add them in new column. |
|
Assign household size class to every person. |