Code Analysis and API Reference ============================== This section provides an in-depth look at the codebase, detailing the functionality of each module and its components. We leverage Sphinx's autodoc and autosummary features to automatically generate documentation directly from the Python source code. Module: Inhabit Matrix Core ----------------------------- The core of the Inhabit model, responsible for creating and projecting the inhabit matrix. .. automodule:: inhabit_matrix :members: :undoc-members: :show-inheritance: Module: Allocation Logic ------------------------ This module handles the complex logic of allocating households to dwellings based on various preferences and constraints. .. automodule:: scripts.allocation :members: :undoc-members: :show-inheritance: Module: Census Calibration -------------------------- Handles the process of calibrating simulation data to match German Census 2022 targets using Iterative Proportional Fitting (IPF). .. automodule:: scripts.census_calibration :members: :undoc-members: :show-inheritance: Module: Dwelling Stock Management --------------------------------- Manages and calibrates the dwelling stock, ensuring consistency with census data. .. automodule:: scripts.dwelling_stock :members: :undoc-members: :show-inheritance: Module: Filters --------------- Provides data filtering and preprocessing functions for SOEP dataframes. .. automodule:: scripts.filters :members: :undoc-members: :show-inheritance: Module: Household Stock Management ---------------------------------- Manages household stock data and performs calibration against empirical data. .. automodule:: scripts.household_stock :members: :undoc-members: :show-inheritance: Module: Input Configuration --------------------------- Central module for loading and managing all configuration parameters and file paths. .. automodule:: scripts.inputs :members: :undoc-members: :show-inheritance: Module: Miscellaneous Utilities ------------------------------- A collection of essential utility functions used across the project for path management, data cleaning, and debugging. .. automodule:: scripts.misc :members: :undoc-members: :show-inheritance: Module: Move Out Rate Calculation --------------------------------- Calculates and predicts household move-out rates, incorporating regression and scenario factors. .. automodule:: scripts.move_out_rate :members: :undoc-members: :show-inheritance: Module: SOEP Data Loader ------------------------ Handles the loading and preprocessing of SOEP survey data. .. automodule:: scripts.soep_loader :members: :undoc-members: :show-inheritance: Module: Household Classification -------------------------------- Transforms raw SOEP household data into standardized categories. .. automodule:: scripts.household :members: :undoc-members: :show-inheritance: Module: Dwelling Classification ------------------------------- Transforms raw SOEP dwelling data into standardized categories. .. automodule:: scripts.dwelling :members: :undoc-members: :show-inheritance: Module: Dwelling Stock Interface ---------------------------------- Acts as an interface layer between Inhabit evidence data and the housing model for dwelling stock projections. .. automodule:: scripts.dwell_stock_interface :members: :undoc-members: :show-inheritance: Module: Load Housing Model Data ------------------------------- Interfaces with external housing model results to create dwelling stock data. .. automodule:: scripts.load_housing_model_ds :members: :undoc-members: :show-inheritance: Module: Household Stock Matching (ML) ------------------------------------- Matches BBSR household projection data to full inhabit household vector categories using machine learning. .. automodule:: scripts.household_stock_matching :members: :undoc-members: :show-inheritance: Module: Allocation Calibration and Evaluation --------------------------------------------- Evaluates the dwelling allocation process by comparing modeled matrices against empirical data. .. automodule:: scripts.alloc_calibration :members: :undoc-members: :show-inheritance: Module: Analysis Charts ----------------------- Generates charts for analyzing model outputs. .. automodule:: scripts.analysis_charts :members: :undoc-members: :show-inheritance: Module: Dwelling Stock Charts ----------------------------- Generates charts related to dwelling stock data. .. automodule:: scripts.ds_charts :members: :undoc-members: :show-inheritance: Module: Evaluation Plots ------------------------ Generates various plots for evaluating model performance and results. .. automodule:: scripts.evaluation_plots :members: :undoc-members: :show-inheritance: Module: Living Space Charts --------------------------- Generates charts related to living space data. .. automodule:: scripts.ls_charts :members: :undoc-members: :show-inheritance: Module: Occupation Charts ------------------------- Generates charts related to occupation data. .. automodule:: scripts.occupation_charts :members: :undoc-members: :show-inheritance: Module: Check Values Labels --------------------------- Utility module for checking and managing value labels. .. automodule:: scripts.check_values_labels :members: :undoc-members: :show-inheritance: