household
Define functions to count households by income, household type, age and household size.
Functions definded in this script: - Load data on person level - Define changes in disaggregagtion of different SOEP variables and replace encoding - Calculate income quintiles - Caclulate weighted shares for one variable (e.g. income)
Disaggregation of heouseholds 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 own encoding. |
|
Calculate income quintiles for df and add them in "income_quintile" column. |
|
Assign Household size class to every person. |