Retail Location Similarity
Find retail locations similar to your best-performing stores
Retail Location Similarity is a geospatial tool for finding locations that resemble your best-performing stores. It converts map data into H3 feature vectors, compares a reference location with candidate areas and ranks the matches on a map.

Who it helps
Retail operators and analysts comparing potential locations with a known area.
The problem
An operator needs to find places with similar built environment, amenity and access characteristics instead of judging candidates from location names alone.
What it needs
- Choose a known reference location.
- Compare many feature dimensions on a consistent geographic grid.
- Inspect matching cells, source coverage and data provenance on a map.
What it does
London feature matrix
The verified private 54 MB matrix contains 131,596 H3 resolution-10 locations and 1,956 numeric features. Retained builders use Overture Maps Places, Base, Buildings and Transportation; exact per-record provenance is not retained.
Leo similarity score
Normalize feature dimensions and compute Leo’s historical distance calibration and logistic similarity score; independently expressed functions matched the original on ten real full-dimensional rows.
Nearby exclusion and map
Exclude the reference cell’s 15-ring neighbourhood and display ranked H3 matches.
Synthetic example
A standalone companion runs the scorer on generated sample features; values are illustrative and not observations of London.
Global pipeline source
Global build scripts and estimates are retained; a completed global matrix has not been verified.
How it works
- Select a reference London location or enter coordinates
- Find its H3 cell and feature vector
- Normalize features against the matrix
- Score other cells and exclude the immediate neighbourhood
- Review ranked matching cells on the map
Design decisions
- Use H3 cells as a common spatial index for location features.
- Preserve the independently expressed historical Leo formula and identify its difference from the published DIEM reference implementation.
- Bound the private adapter to one fresh calculation at a time and cache three computed examples.
- Keep software licensing and the Overture/OSM-derived data rights as separate review subjects.
- The operator chooses reference stores using their own performance records; the engine compares their geographic context.
Current state
The reusable scorer runs from a fresh clone. Its hosted example computes matches from 90 generated H3 records across five features. The original London matrix contains 131,596 cells and 1,956 numeric features; a full comparison was verified privately. That historical data remains separate while its original attribution is reconciled. Global matrix-building code is preserved.
Continue the project
Run the synthetic example locally and explore the retained matrix-building source.
Build with it
server.py · diem_batch.py · _scoring.py · create_synthetic.py · requirements.txt