--- language: en license: cc-by-4.0 tags: - business - economic - yelp - tabular - regression - classification dataset_info: features: - name: business_id dtype: string - name: rating_x_reviews dtype: float64 - name: review_count dtype: int64 - name: num_categories dtype: int64 - name: years_in_business dtype: float64 - name: num_checkins dtype: int64 - name: has_checkin dtype: int64 - name: is_open dtype: int64 - name: latitude dtype: float64 - name: longitude dtype: float64 - name: fips dtype: string - name: pcpi dtype: float64 - name: poverty_rate dtype: float64 - name: median_household_income dtype: float64 - name: unemployment_rate dtype: float64 - name: avg_weekly_wages dtype: float64 - name: cat_* dtype: int64 splits: - name: train num_examples: 17000+ configs: - config_name: default data_files: - split: train path: data/train-* --- # Yelp Business Economic Indicators Dataset ## ⚠️ Important Version Notice (Please Read) **Version 3 (v3) should be used instead of v1 or v2.** - **v1 (~1k rows)** and **v2 (~10k rows)** use county-level economic indicators from **2023** - **v3 (~17k rows)** uses economic indicators from **2018**, which better aligns with: - the temporal coverage of the Yelp Open Dataset - business survival modeling - avoidance of temporal leakage Earlier versions are retained for reproducibility only and are **not recommended** for modeling. --- ## Dataset Overview This dataset combines business-level information from the **Yelp Open Dataset** with **county-level economic indicators** sourced from U.S. government datasets. The dataset is designed for **predictive modeling**, particularly tasks such as: - Predicting whether a business will remain open or close - Studying business survival and risk - Analyzing interactions between local economic conditions and business outcomes Each row corresponds to a single Yelp business. --- ## What’s New in v3 Version 3 adds substantial feature improvements over v1 and v2: - ✔ Expanded dataset size (~17k rows) - ✔ Corrected economic data timing (2018 instead of 2023) - ✔ Yelp category multi-hot encoded features - ✔ Business longevity features derived from Yelp check-ins - ✔ Improved engagement signals --- ## Features (v3) ### Business Engagement & Quality | Column | Description | |------|------------| | `rating_x_reviews` | Yelp rating multiplied by log(review_count + 1) | | `review_count` | Total number of Yelp reviews | | `num_categories` | Number of Yelp categories assigned | --- ### Business Longevity (Derived from Check-ins) | Column | Description | |------|------------| | `years_in_business` | Years between first and last Yelp check-in (observed lifespan) | | `num_checkins` | Total number of Yelp check-ins | | `has_checkin` | 1 if any check-in exists, else 0 | **Note:** These features estimate *observed Yelp activity duration*, not true opening date. They are intended for **relative comparison across businesses**, not causal inference. --- ### Target Variable | Column | Description | |------|------------| | `is_open` | 1 if business is open, 0 if closed | --- ### Location | Column | Description | |------|------------| | `latitude` | Business latitude | | `longitude` | Business longitude | | `fips` | County FIPS code | --- ### County-Level Economic Indicators (2018) | Column | Description | |------|------------| | `pcpi` | Per capita personal income (USD) | | `poverty_rate` | Poverty rate (%) | | `median_household_income` | Median household income (USD) | | `unemployment_rate` | Unemployment rate (%) | | `avg_weekly_wages` | Average weekly wages (USD) | --- ### Yelp Category Indicators Multi-hot encoded binary features indicating whether a business belongs to a given category. Examples: - `cat_Restaurants` - `cat_Food` - `cat_Automotive` - `cat_Bars` - `cat_Health & Medical` - `cat_Shopping` - … Only the **most frequent categories** are included to limit sparsity. --- ## Normalization Note Some earlier versions of this dataset were normalized for convenience. **Normalization is not required and not recommended for tree-based models** such as: - XGBoost - LightGBM Version 3 is intended to be used **as-is with raw feature values**. --- ## Sources ### Yelp - **Yelp Open Dataset** https://www.yelp.com/dataset Business attributes, categories, reviews, and check-ins. ### Economic Indicators - **BLS – Quarterly Census of Employment and Wages (QCEW)** https://www.bls.gov/cew/ Average weekly wages. - **FRED – Federal Reserve Economic Data** https://fred.stlouisfed.org/ Per capita personal income (PCPI). - **U.S. Census Bureau – ACS / SAIPE** https://www.census.gov/programs-surveys/saipe.html Poverty rates, median household income, unemployment rates. --- ## Usage Notes - Missing values may exist for some businesses (e.g., no check-ins) - No feature normalization is required for tree-based models - Designed for tabular ML, feature interaction modeling, and exploratory analysis --- ## Example Usage ```python import pandas as pd from datasets import load_dataset # Load from Hugging Face dataset = load_dataset("your-username/yelp-business-economic-indicators") df = dataset["train"].to_pandas() print(df.head()) ``` ## License This dataset is released under the CC BY 4.0 License. Yelp Dataset Terms: https://www.yelp.com/dataset/terms Economic data sources are U.S. government public-domain datasets.