Skip to content

SyntheticHousingMarket

The SyntheticHousingMarket class is a container for preprocessed housing market data that organizes housing units and their relationships with households. It handles the initial state of housing ownership and rental relationships for model initialization.

Core Functionality

The class handles:

  1. Housing Unit Data:

    • Property identification and valuation
    • Rental status and rates
    • Owner-occupancy classification
    • Property characteristics
  2. Housing-Household Relationships:

    • Owner-property matching
    • Renter-property matching
    • Vacant property tracking
    • Social housing allocation
  3. Market Structure:

    • Rental market availability
    • Property value distribution
    • Geographic clustering (if applicable)
    • Market segment classification

Key Attributes

  • country_name: Country identifier for data collection
  • housing_market_data: DataFrame containing:
  • House ID: Unique identifier for each housing unit
  • Is Owner-Occupied: Boolean flag for owner-occupied properties
  • Corresponding Owner Household ID: ID of the owning household
  • Corresponding Inhabitant Household ID: ID of the residing household
  • Value: Property value in local currency units
  • Rent: Monthly rental amount (if applicable)
  • Up for Rent: Boolean flag for rental market availability
  • Newly on the Rental Market: Tracks new rental listings

Implementation

Module for preprocessing synthetic housing market data.

This module provides a framework for preprocessing and organizing housing market data that will be used to initialize behavioral models. It focuses on establishing the initial state of housing ownership and rental relationships between housing units and households. Key preprocessing tasks include:

  1. Housing Unit Data:
  2. Property identification and valuation
  3. Rental status and rates
  4. Owner-occupancy classification
  5. Property characteristics

  6. Housing-Household Relationships:

  7. Owner-property matching
  8. Renter-property matching
  9. Vacant property tracking
  10. Social housing allocation

  11. Market Structure:

  12. Rental market availability
  13. Property value distribution
  14. Geographic clustering (if applicable)
  15. Market segment classification
Note

This module is NOT used for simulating housing market behavior. It only handles the preprocessing and organization of housing market data that will later be used to initialize behavioral models in the simulation package. The actual housing market dynamics (buying, selling, renting) are implemented elsewhere.

SyntheticHousingMarket

Container for preprocessed housing market data.

This class organizes data about housing units and their relationships with households (both owners and renters). It processes and structures data about property ownership, rental arrangements, and market availability. It does NOT implement any market behavior - it only handles data preprocessing.

The preprocessing workflow includes: 1. Property Data Processing: - Housing unit identification - Property valuation - Rental rate calculation - Occupancy status tracking

  1. Relationship Mapping:
  2. Owner-property associations
  3. Renter-property matches
  4. Social housing assignments
  5. Vacancy tracking

  6. Market Status:

  7. Rental availability flags
  8. New market entry tracking
  9. Market segment labeling
  10. Geographic clustering (if applicable)
The housing market data is stored in a pandas DataFrame with columns
  • House ID: Unique identifier for each housing unit
  • Is Owner-Occupied: Boolean flag for owner-occupied properties
  • Corresponding Owner Household ID: ID of the owning household
  • Corresponding Inhabitant Household ID: ID of the residing household
  • Value: Property value in local currency units
  • Rent: Monthly rental amount (if applicable)
  • Up for Rent: Boolean flag for rental market availability
  • Newly on the Rental Market: Tracks new rental listings

Attributes:

Name Type Description
country_name str

Country identifier for data collection

housing_market_data DataFrame

Preprocessed housing market data containing property details and household relationships

country_name = country_name instance-attribute
housing_market_data = housing_market_data instance-attribute
__init__(country_name: str, housing_market_data: pd.DataFrame)

Default Implementation

The DefaultSyntheticHousingMarket class provides a standard implementation for processing housing market data using common data sources.

Data Processing

The default implementation handles:

  1. Data Collection:

    • Household survey data
    • Property registration records
    • Rental market statistics
    • Social housing records
  2. Property Matching:

    • Owner-occupied property identification
    • Rental property classification
    • Social housing allocation
    • Vacancy tracking
  3. Market Initialization:

    • Property value assignment
    • Rental rate calculation
    • Market availability flags
    • New listing identification

Factory Methods

The class provides a factory method init_from_datadict that creates a DefaultSyntheticHousingMarket instance by:

  1. Converting dictionary data to DataFrame format
  2. Setting initial rental market availability
  3. Establishing property-household relationships

Implementation

Module for preprocessing default synthetic housing market data.

This module provides a default implementation for preprocessing housing market data using standard household survey data and property records. It handles the organization of housing ownership and rental relationships using commonly available housing statistics.

DefaultSyntheticHousingMarket

Default implementation for preprocessing housing market data.

This class provides a standard implementation for processing housing market data using common data sources like household surveys and property records. It organizes data about housing units and their relationships with households using widely available housing statistics.

The preprocessing workflow includes: 1. Data Collection: - Household survey data - Property registration records - Rental market statistics - Social housing records

  1. Property Matching:
  2. Owner-occupied property identification
  3. Rental property classification
  4. Social housing allocation
  5. Vacancy tracking

  6. Market Initialization:

  7. Property value assignment
  8. Rental rate calculation
  9. Market availability flags
  10. New listing identification
Note

This implementation uses default data sources and standard preprocessing methods. For specialized preprocessing needs, create a new implementation of the base SyntheticHousingMarket class.

init_from_datadict(country_name: str, housing_data_dict: dict) classmethod

Create preprocessed housing market data from a dictionary source.

This method processes housing market data from a dictionary containing property and household relationship information. It initializes the market state by: 1. Converting dictionary data to DataFrame format 2. Setting initial rental market availability 3. Establishing property-household relationships

Parameters:

Name Type Description Default
country_name str

Country to process data for

required
housing_data_dict dict

Dictionary containing housing market data with keys matching the required DataFrame columns

required

Returns:

Name Type Description
DefaultSyntheticHousingMarket

Container with preprocessed housing market data ready for model initialization