neighborhood_local_index
Score a neighborhood's local business density by sampling categories, returning an aggregate Local Index and per-category stats to show chain vs independent breakdown.
Instructions
Score a neighborhood for its overall independent-business density. Samples each of a set of categories (restaurant, coffee, grocery, hardware, bookstore, bakery by default), runs LocalRoots scoring on each result, and aggregates into a single Local Index plus per-category stats. Use this when a user asks 'how local is X neighborhood' or wants to compare two areas. The per-category breakdown is the real signal; a neighborhood can be chain-dominant for restaurants and strongly independent for hardware, and surfacing that nuance is the point.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| radius_km | No | ||
| categories | No | ||
| sample_size | No | ||
| neighborhood | Yes |