Core Functions
run_land_analysis
Sales and universe data pair containing property information
Configuration dictionary with modeling instructions and parameters
If True, print detailed progress information during analysis
- Gathers predictions from main, hedonic, and vacant models
- Calculates land allocation ratios for each model
- Compares model performance using MAPE, R², and RMSE
- Optimizes ensemble by iteratively removing worst-performing models
- Saves final land analysis results to parquet
convolve_land_analysis
Sales and universe data pair
Settings dictionary with modeling configuration
Enable verbose output for debugging
- R² (OLS and y=x comparison)
- Slope of regression line
- Median sales ratio
- Coefficient of Dispersion (COD)
finalize_land_values
Input DataFrame containing properties to value
Settings dictionary
Print progress information
GeoDataFrame with columns:
model_market_value: Total predicted market valuemodel_land_value: Predicted land valuemodel_impr_value: Predicted improvement valuemodel_land_value_land_{unit}: Land value per area unitmodel_market_value_land_{unit}: Market value per land areamodel_market_value_impr_{unit}: Market value per improvement area
- Loads cached land analysis results for each model group
- Applies land allocation ratios to calculate land values
- Derives improvement values (market value - land value)
- Applies quality control checks to land values
- Calculates per-area values
- Saves final predictions to parquet format
Private Helper Functions
_run_land_analysis
Internal function that performs the core land analysis workflow for a single model group. Handles model comparison, ensemble optimization, and result persistence._convolve_land_analysis
Internal function for spatial land value analysis on vacant land sales._finalize_land_values
Internal function that processes land allocation results and derives final land and improvement values with quality control.Usage Example
Methodology
Vacant Land Approach
Models vacant land sales directly to estimate land value per area unit, then applies these rates to improved properties.Hedonic Land Approach
Uses regression models to isolate land characteristics’ contribution to total property value, deriving land allocation ratios statistically.Ensemble Optimization
The module automatically:- Compares multiple model approaches
- Calculates performance metrics (MAPE, R², RMSE)
- Iteratively removes poorest-performing models
- Selects optimal ensemble based on:
- Minimizing negative allocations
- Minimizing allocations > 100%
- Maximizing prediction accuracy