SPB Git forge

spb/wp4_uqo

Public
3commits 1branches 1releases
5.4 MBsize
maindefault branch
25 min agolast push
Python 64.6% TeX 23.3% HTML 11.6% Makefile 0.5%
2.6 KB · 80 lines make
Raw Blame History
1# Makefile — Airbnb Hedonic Pricing Analysis2# Ultra-advanced hedonic model for Airbnb listing prices34PYTHON = python35STREAMLIT = streamlit6DATA_FILE = data/raw/cleaned_dataset_sample.csv7OUTPUT_DIR = results8PAPER_DIR = paper910.PHONY: all clean download features models figures tables paper dashboard help1112help:13	@echo "Airbnb Hedonic Pricing Analysis"14	@echo "================================"15	@echo ""16	@echo "  make install       Install Python dependencies"17	@echo "  make download      Download/prepare raw data"18	@echo "  make clean         Clean intermediate files"19	@echo "  make features      Build hedonic feature set"20	@echo "  make models        Estimate all models"21	@echo "  make figures       Generate publication figures"22	@echo "  make tables        Generate publication tables"23	@echo "  make paper         Compile LaTeX paper"24	@echo "  make dashboard     Launch Streamlit dashboard"25	@echo "  make all           Run full pipeline"26	@echo "  make test          Run basic tests"27	@echo ""2829all: install features models figures tables paper3031install:32	pip install -r requirements.txt3334download:35	@echo "Using existing data file: $(DATA_FILE)"36	@echo "Place the Inside Airbnb extract in data/raw/ (see data/raw/README.md)"37	@test -f $(DATA_FILE) || (echo "ERROR: $(DATA_FILE) not found" && exit 1)38	@echo "Data file found: $$(wc -l < $(DATA_FILE)) lines"3940clean:41	rm -rf data/interim/*42	rm -rf data/processed/*43	rm -rf data/duckdb/*44	rm -rf $(OUTPUT_DIR)/tables/*45	rm -rf $(OUTPUT_DIR)/figures/*46	rm -rf $(OUTPUT_DIR)/models/*47	@echo "Cleaned all intermediate and output files"4849features:50	$(PYTHON) scripts/run_analysis.py --data-file $(DATA_FILE) --models-only 2>&1 | head -5051	@echo "Feature engineering complete"5253models:54	$(PYTHON) scripts/run_analysis.py --data-file $(DATA_FILE)55	@echo "All models estimated"5657figures:58	$(PYTHON) scripts/run_analysis.py --data-file $(DATA_FILE) --figures-only59	@echo "Figures saved to $(OUTPUT_DIR)/figures/"6061tables:62	@echo "Tables generated during model estimation"63	@ls -la $(OUTPUT_DIR)/tables/ 2>/dev/null || echo "Run 'make models' first"6465paper:66	cd $(PAPER_DIR) && make67	@echo "Paper compiled: $(PAPER_DIR)/main.pdf"6869dashboard:70	$(STREAMLIT) run scripts/app.py7172test:73	$(PYTHON) -c "from src import config; print('config OK')"74	$(PYTHON) -c "from src import data_loader; print('data_loader OK')"75	$(PYTHON) -c "from src import cleaning; print('cleaning OK')"76	$(PYTHON) -c "from src import feature_engineering; print('feature_engineering OK')"77	$(PYTHON) -c "from src import hedonic_models; print('hedonic_models OK')"78	$(PYTHON) -c "from src import ml_models; print('ml_models OK')"79	@echo "All module imports successful"80