# Makefile — Airbnb Hedonic Pricing Analysis # Ultra-advanced hedonic model for Airbnb listing prices PYTHON = python3 STREAMLIT = streamlit DATA_FILE = data/raw/cleaned_dataset_sample.csv OUTPUT_DIR = results PAPER_DIR = paper .PHONY: all clean download features models figures tables paper dashboard help help: @echo "Airbnb Hedonic Pricing Analysis" @echo "================================" @echo "" @echo " make install Install Python dependencies" @echo " make download Download/prepare raw data" @echo " make clean Clean intermediate files" @echo " make features Build hedonic feature set" @echo " make models Estimate all models" @echo " make figures Generate publication figures" @echo " make tables Generate publication tables" @echo " make paper Compile LaTeX paper" @echo " make dashboard Launch Streamlit dashboard" @echo " make all Run full pipeline" @echo " make test Run basic tests" @echo "" all: install features models figures tables paper install: pip install -r requirements.txt download: @echo "Using existing data file: $(DATA_FILE)" @echo "Place the Inside Airbnb extract in data/raw/ (see data/raw/README.md)" @test -f $(DATA_FILE) || (echo "ERROR: $(DATA_FILE) not found" && exit 1) @echo "Data file found: $$(wc -l < $(DATA_FILE)) lines" clean: rm -rf data/interim/* rm -rf data/processed/* rm -rf data/duckdb/* rm -rf $(OUTPUT_DIR)/tables/* rm -rf $(OUTPUT_DIR)/figures/* rm -rf $(OUTPUT_DIR)/models/* @echo "Cleaned all intermediate and output files" features: $(PYTHON) scripts/run_analysis.py --data-file $(DATA_FILE) --models-only 2>&1 | head -50 @echo "Feature engineering complete" models: $(PYTHON) scripts/run_analysis.py --data-file $(DATA_FILE) @echo "All models estimated" figures: $(PYTHON) scripts/run_analysis.py --data-file $(DATA_FILE) --figures-only @echo "Figures saved to $(OUTPUT_DIR)/figures/" tables: @echo "Tables generated during model estimation" @ls -la $(OUTPUT_DIR)/tables/ 2>/dev/null || echo "Run 'make models' first" paper: cd $(PAPER_DIR) && make @echo "Paper compiled: $(PAPER_DIR)/main.pdf" dashboard: $(STREAMLIT) run scripts/app.py test: $(PYTHON) -c "from src import config; print('config OK')" $(PYTHON) -c "from src import data_loader; print('data_loader OK')" $(PYTHON) -c "from src import cleaning; print('cleaning OK')" $(PYTHON) -c "from src import feature_engineering; print('feature_engineering OK')" $(PYTHON) -c "from src import hedonic_models; print('hedonic_models OK')" $(PYTHON) -c "from src import ml_models; print('ml_models OK')" @echo "All module imports successful"