File size: 5,585 Bytes
41d6341 53eb87d 5a54350 53eb87d 5a54350 53eb87d 5a54350 53eb87d 5a54350 53eb87d 41d6341 5a54350 41d6341 5a54350 ea4039a 5a54350 ea4039a 5a54350 ea4039a 5a54350 b5e9405 5a54350 ea4039a 5a54350 ea4039a 5a54350 ea4039a 5a54350 ea4039a 5a54350 ea4039a 5a54350 ea4039a 5a54350 ea4039a 5a54350 ea4039a 5a54350 ea4039a 5a54350 ea4039a 5a54350 ea4039a 5a54350 ea4039a 5a54350 ea4039a 5a54350 ea4039a 5a54350 ea4039a 5a54350 ea4039a 5a54350 ea4039a 5a54350 ea4039a 5a54350 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 | ---
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. |