Google Places API returns thousands of results for "grocery store" across California counties. The results include supermarkets like Safeway and Trader Joe's, but also 7-Eleven locations, gas station minimarts, liquor stores, and restaurants with incidental grocery items.
For food access research, this distinction matters. A convenience store does not provide equivalent food security value to a full-service supermarket. Manual validation of thousands of locations is not feasible. Automated classification becomes necessary.
The Training Data
400 labeled locations (200 confirmed grocery stores, 200 confirmed non-grocery: convenience stores, liquor stores, miscategorized restaurants) provide enough training data for a binary classifier. The labeling takes about two hours: checking each location against its business website and Google Street View imagery.
Google Places provides several features for each location:
| Feature | Example Values |
|---|---|
| Business name | "Safeway" vs. "QuickStop" |
| Type tags | "supermarket," "convenience_store" |
| User rating | 1-5 scale |
| Review count | 12 vs. 847 |
| Price level | $ to $$$$ |
Our hypothesis: real grocery stores tend to have certain type tags, higher review counts, and names containing words like "market" or "foods" rather than "liquor" or "gas."
Model Iteration
With a labeled dataset, Claude Code can iterate through classifier specifications rapidly. Each cycle (write code, run it, evaluate accuracy, propose modifications) takes minutes rather than hours.
Article-reported iterations (not publicly reproduced):
Iteration 1: Logistic regression, raw features
→ 78% accuracy
Iteration 2: Added text features from business names
(name_has_market, name_has_liquor, name_has_gas)
→ 84% accuracy
Iteration 3: Parsed Google type tags into binary indicators
→ 88% accuracy
Iteration 4: Added review count interaction terms
→ 91% accuracy
Iteration 5: XGBoost with tuned hyperparameters
→ 94% balanced accuracy
The jump from 78% to 84% came from a simple observation: business names contain signal. "Safeway" and "Trader Joe's" differ systematically from "7-Eleven" and "Chevron Food Mart." Extracting indicator variables for common substrings captures this.
The article attributes the reported final jump to 94% to switching to XGBoost and proposes feature interactions as the explanation. Neither the model output nor that interpretation is publicly reproduced.
What the Model Learned
The article reports the following feature-importance values. No saved public model output currently reproduces the ranking or magnitudes.
Within the article-reported ranking, Google type tags receive the largest importance values and name-based features receive smaller values. That descriptive reading remains provisional until a saved output reproduces the model.
Validation
The article reports a spot-check of 50 predictions from each category. The labeled spot-check sample and output are not public, so the 94% and 96% rates are not independently reproduced.
The article describes three false negatives as ethnic markets with non-English names and two false positives as a Walgreens and a CVS. Those case labels are article-reported and not publicly reproduced.
Results
The article reports applying the classifier to 6,613 API records, with 4,847 classified as grocery stores and 1,766 as non-grocery. That full-population result is under reconciliation with the related policy articles.
The article reports that classification changes the store count by approximately 27% and that the spot-check implies roughly 6% residual misclassification. Those full-population implications remain provisional until the source populations are reconciled.
Time Investment
Without agent-assisted iteration, this work would require 2-3 days: learning the scikit-learn API, debugging feature engineering code, manual hyperparameter tuning. The agent compresses the implementation bottleneck; the human time investment is almost entirely labeling and validation.
This classify-and-validate loop is the worked example behind the data cleaning step of our Start Here guide, where every transformation is encoded so the agent can run, log, and repeat it.
The workflow is documented in this article. A related folder at the pinned public commit is available for inspection, but it is not designated as evidence for the full 6,613-record classification while that population is under reconciliation.
How to Cite This Research
Cholette, V. (2025, October 29). Grocery store classifier results under review. Too Early To Say. https://tooearlytosay.com/research/methodology/grocery-store-classifier-validation/Copy citation