Skip to content

somildoshi12/RevPAR-Analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

23 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🏠 BroadVail RevPAR Intelligence Platform

Rice Datathon 2026 - Finance Track

Redefining 'Local' in the X-Minute City: Predicting apartment performance based on neighborhood amenities and understanding how renter preferences changed post-COVID.

🌐 Live Demo

Try the platform: https://revpar-analysis.streamlit.app/


πŸ“Š Project Overview

This project predicts RevPAR (Revenue Per Available Unit) Growth for multifamily apartment properties using machine learning. We analyze how neighborhood amenities, location characteristics, and market dynamics influence apartment performance.

Key Findings

  1. Time Period Effect: Pre vs Post COVID distinction accounts for ~67% of prediction importance
  2. Location Matters: State and metro-level features are crucial predictors
  3. Optimal Drivetime: 10-minute drivetime radius provides best predictive power
  4. Model Performance: Ensemble model achieves 0.1092 RMSE (18.3% improvement over baseline)

πŸš€ Quick Start

1. Setup Environment

# Navigate to project
cd "/Users/somildoshi/Somil Doshi/UH - Coding/Finance"

# Create virtual environment
python3 -m venv venv
source venv/bin/activate

# Install dependencies
pip install -r requirements.txt

# Install OpenMP for XGBoost (Mac only)
brew install libomp

2. Set API Key

# Create .env file
echo 'OPENAI_API_KEY=your_key_here' > .env
echo 'RANDOM_STATE=42' >> .env

3. Train Models

# Train on 15-minute drivetime (default)
python train.py --drivetime drv15

# Or train on other drivetimes
python train.py --drivetime drv10
python train.py --drivetime drv30

4. Generate Full Submission

python generate_full_submission.py

5. Run Dashboard

streamlit run app/app.py

πŸ“ Project Structure

Finance/
β”œβ”€β”€ data/
β”‚   β”œβ”€β”€ master_panel_drv10.csv    # 10-minute drivetime data
β”‚   β”œβ”€β”€ master_panel_drv15.csv    # 15-minute drivetime data
β”‚   β”œβ”€β”€ master_panel_drv30.csv    # 30-minute drivetime data
β”‚   β”œβ”€β”€ scoring.csv               # Held-out test set
β”‚   └── dictionary.csv            # Data dictionary
β”‚
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ __init__.py               # Package init
β”‚   β”œβ”€β”€ config.py                 # Configuration settings
β”‚   β”œβ”€β”€ data_loader.py            # Data loading & wrangling
β”‚   β”œβ”€β”€ features.py               # Feature engineering
β”‚   └── model.py                  # Model training & evaluation
β”‚
β”œβ”€β”€ app/
β”‚   └── app.py                    # Streamlit dashboard
β”‚
β”œβ”€β”€ models/                       # Saved model checkpoints
β”‚   β”œβ”€β”€ baseline_ridge.pkl
β”‚   β”œβ”€β”€ xgboost_model.pkl
β”‚   β”œβ”€β”€ lightgbm_model.pkl
β”‚   └── ensemble_model.pkl
β”‚
β”œβ”€β”€ outputs/                      # Predictions & analysis
β”‚   β”œβ”€β”€ submission_final_*.csv
β”‚   └── feature_importance_*.csv
β”‚
β”œβ”€β”€ train.py                      # Main training script
β”œβ”€β”€ generate_full_submission.py   # Generate predictions
β”œβ”€β”€ requirements.txt              # Dependencies
β”œβ”€β”€ .env                          # Environment variables
└── README.md                     # This file

πŸ”¬ Methodology

Data Wrangling

  • Handled missing values (median imputation for numeric, 'Unknown' for categorical)
  • Handled multi-phase buildings (same UBID with different yearbuilt)
  • Outlier clipping at 1st/99th percentiles
  • Created target variable based on time_window_tag

Feature Engineering

  • Amenity Density: Count / trade area size
  • Amenity Ratios: High-end grocery / total grocery, sit-down / total food
  • Composite Scores: Proximity, transit, health, housing composites from AARP metrics
  • Building Features: Age, renovation status, size indicators
  • Supply Features: Growth rate, expansion indicators
  • Affordability Features: Rent-to-mortgage ratio, rent advantage indicator

Models

Model CV RMSE CV RΒ²
Baseline (Ridge) 0.1337 56.0%
XGBoost 0.1095 70.5%
LightGBM 0.1104 70.0%
Ensemble 0.1092 70.6%

Cross-Validation

  • GroupKFold with 5 folds
  • Grouped by UBID to prevent data leakage
  • Same property never appears in both train and validation

πŸ“ˆ Key Results

Top 15 Important Features

  1. is_pre_covid (39.4%)
  2. is_post_covid (28.0%)
  3. time_window_tag (9.4%)
  4. state (4.7%)
  5. state_metro (4.3%)
  6. zip_metro (1.4%)
  7. aarp_met_house_access_step (1.1%)
  8. aarp_met_trans_delay (0.7%)
  9. aarp_met_health_hospital (0.6%)
  10. mrkt_name (0.4%)

Drivetime Comparison

Drivetime Ensemble RMSE
drv10 0.1091 ⭐
drv15 0.1092
drv30 0.1098

🌍 Social Impact

Housing Affordability Insights

  • Post-COVID, local amenities matter more than downtown proximity
  • Properties with good grocery access outperform regardless of location type
  • The 15-minute city concept should be adapted by neighborhood type

Recommendations

  • For Renters: Look for "hidden gem" neighborhoods with high local amenity density
  • For Urban Planners: Invest in local amenities in underserved suburban areas
  • For Investors: Consider supply growth as a key risk factor

πŸ† Competition Deliverables

  1. βœ… Code Repository: Complete with clear instructions
  2. βœ… Methodology Summary: This README + notebook analysis
  3. βœ… Predictions CSV: outputs/submission_final_*.csv
  4. βœ… Dashboard: Interactive Streamlit app

πŸ“š References

  • Abbiasov et al., "The 15-minute city quantified using human mobility data," Nature Human Behaviour 8, no. 3 (2024)
  • BroadVail Capital Partners Finance Track Problem Statement

πŸ‘₯ Team

Rice Datathon 2026 Participant


πŸ“„ License

This code is provided for the Rice Datathon 2026 competition only. Data must be deleted after the event.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors