Short answer: to choose a retail site with GIS, build a road network and measure drive-time catchments rather than circles. Put households and income from the census on the network, and list the competing stores with their floor areas. Score candidate sites with a transparent weighted overlay of demand, spending power, the gap to the nearest competitor and road access. Then run a Huff gravity model, which shares each household’s spending among all the stores it could reach, to estimate what a new store would take from the competition. Check the result against stores that already trade, and against one that failed.
The question in Part 2 was how busy a store is. This part asks the question that comes before it: where should a store go at all? Retailers, property developers and planners answer it with the same building blocks: who lives within a short drive, how much they can spend, who else competes for that spending, and how easy the site is to reach.
We work in metro Albuquerque, New Mexico, with open data only. It is a good test because Walmart closed one of its Albuquerque Supercenters, on San Mateo Boulevard SE, in March 2023, so we can ask how that store looked to the model before it closed.
This is Part 3 of Retail from space. You will learn how to:
- get households and income for census tracts from the American Community Survey, with no API key;
- build a drivable road network from Overture Maps transportation segments, and run shortest paths with SciPy;
- spread demand onto the network, and list the competing stores with their floor areas from Overture places and buildings;
- map 5, 10 and 15-minute catchments;
- score candidate sites with a weighted overlay, and check its demand criteria against where Walmart already trades;
- estimate captured spending with a Huff model;
- replay 2022 with the closed store back in place.
All outputs below are real results from site_selection.py, run on 20 November 2026 with Python 3.12, DuckDB 1.5.6, GeoPandas 1.2.0 and SciPy 1.18.1.
Store chains are named only to identify real stores in the model. TechnicalGIS has no connection with Walmart Inc. or any other retailer named here, and the results are a teaching exercise in location analysis, not a view on any company’s business or shares.
Step 1: households and income from the ACS
Demand starts with people. The American Community Survey (ACS) five-year estimates for 2019–2023 give households, population and median household income for every census tract. The Census Bureau publishes each table as one pipe-delimited file for the whole country, so no API key is needed. Tract boundaries come from the 2023 TIGER/Line shapefile for New Mexico.
def acs_table(table: str) -> pd.DataFrame: """One ACS 5-year detailed table for every geography, from the key-free table-based summary file.""" f = DATA / f"acsdt5y2023-{table}.dat" if not f.exists(): url = f"https://www2.census.gov/programs-surveys/acs/summary_file/2023/table-based-SF/data/5YRData/{f.name}" r = requests.get(url, headers=UA, timeout=600) r.raise_for_status() f.write_bytes(r.content) t = pd.read_csv(f, sep="|", dtype={"GEO_ID": str}, low_memory=False) return t[t.GEO_ID.str.startswith("1400000US35")].set_index("GEO_ID")
acs = pd.DataFrame({ "households": acs_table("b11001")["B11001_E001"], "population": acs_table("b01003")["B01003_E001"], "median_income": acs_table("b19013")["B19013_E001"],})Households times median income gives each tract’s aggregate household income. We use it as a proxy for spending power: it is not what people spend in supermarkets, but it ranks places in the same order.
192 tracts | 761,664 people | 317,069 households | median of tract median incomes $65,033Step 2: a drivable network from Overture Maps
Overture’s transportation theme gives road segments and the connectors where they join. Each segment lists its connectors with a fraction at along its length. Splitting every segment at its connectors gives the edges of a graph, and each edge’s travel time comes from its length and a typical urban speed for its road class.
cid, xs, ys, edges = {}, [], [], []for s in seg.itertuples(): ids = [] for c in sorted(s.connectors, key=lambda c: c["at"]): if c["connector_id"] not in cid: p = s.geometry.interpolate(c["at"], normalized=True) cid[c["connector_id"]] = len(xs); xs.append(p.x); ys.append(p.y) ids.append((cid[c["connector_id"]], c["at"])) for (a, ta), (b, tb) in zip(ids, ids[1:]): if a != b: edges.append((a, b, s.length_m * (tb - ta) / (SPEED[s.cls] / 3.6) / 60, s.cls))nodes = np.c_[xs, ys]E = pd.DataFrame(edges, columns=["a", "b", "minutes", "cls"])n = len(nodes)W = coo_matrix((np.r_[E.minutes, E.minutes] + 1e-6, (np.r_[E.a, E.b], np.r_[E.b, E.a])), shape=(n, n)).tocsr()A sparse matrix of travel times is all SciPy’s dijkstra needs. It finds every drive time from a set of sources in one call, which is much faster than routing site by site in a general-purpose graph library.
83,834 road segments -> 139,842 junctions and 177,041 edges; the largest connected network holds 99.8% of junctionsThe graph is undirected, so one-way streets and turn restrictions are ignored. For a metro-wide comparison of sites, that error is small and shared by every site.
Step 3: put the households on the network
Households live along residential streets, not at tract centroids. We spread each tract’s households and income evenly over the junctions of its residential, tertiary and unclassified roads.
317,069 households placed on 67,159 junctions (100.0% of the tracts' total)Step 4: the competition
A new store’s prospects depend on who else is nearby. We take the big grocery and general-merchandise chains from Overture places, drop the in-store pharmacies, fuel stations and pickup points, and attach each store to the building beneath it. The building’s floor area becomes the store’s attractiveness: bigger stores carry more lines and draw from further away.
places = gpd.sjoin_nearest(places, bld, max_distance=60, how="inner")stores = (places.sort_values("confidence", ascending=False) .drop_duplicates("index_right") # one store per building, whichever listing is most confident .drop(columns="index_right").reset_index(drop=True))stores = stores[stores.floor_m2 > 2500].reset_index(drop=True)Walmart’s San Mateo Boulevard SE store closed on 10 March 2023, as Walmart confirmed to KRQE (reported by Nexstar via The Hill). Overture still lists it, so the script removes it from today’s network and keeps it for Step 8.
76 chain listings -> 52 stores with a building of more than 2,500 m2 stores median_floor_m2fmtAlbertsons 12 6783.0Costco 3 14808.0Sam's Club 3 12482.0Smith's 8 6670.0Sprouts 6 5627.0Target 5 11580.0Walmart Neighborhood Market 7 3964.0Walmart Supercenter 6 19882.0Whole Foods 2 3856.0San Mateo Blvd SE (closed 2023): building 19,926 m2Six Supercenters of about 19,900 m² each are the largest stores in the city by a wide margin. In a Huff model, that size is a large part of their pull.
Step 5: drive-time catchments
A 3 km circle treats a river, a motorway and a cul-de-sac the same. A drive-time catchment follows the roads. From the Supercenter nearest downtown, one dijkstra call gives the minutes to every junction.
T_ex = dijkstra(W, indices=[example], limit=20)[0]ex_ll = gpd.GeoSeries([wm.geometry[ex]], crs=CRS).to_crs(4326).iloc[0]for m in (5, 10, 15): print(f"{m:2d}-minute catchment of the Supercenter at {ex_ll.y:.4f}, {ex_ll.x:.4f}: " f"{demand_hh[T_ex <= m].sum():8,.0f} households") 5-minute catchment of the Supercenter at 35.1120, -106.6079: 23,036 households10-minute catchment of the Supercenter at 35.1120, -106.6079: 138,991 households15-minute catchment of the Supercenter at 35.1120, -106.6079: 233,180 households918 candidate sites (one per 500 m cell on trunk, primary and secondary roads in built-up tracts)The catchment grows six-fold between 5 and 10 minutes, as the drive reaches the arterials and the interstate. Within 15 minutes are 74% of the metro’s households. A Supercenter is a destination people drive to, which is why the 10-minute catchment is the one we score on.
Candidate sites are junctions on trunk, primary and secondary roads in built-up tracts, one per 500 m grid cell. A big store needs an arterial road for its customers and its lorries.
Step 6: a weighted-overlay suitability score
The weighted overlay is the classic GIS approach, and its strength is that anyone can read it. Each candidate is ranked on four criteria, and the percentile ranks are added with weights:
- households within 10 minutes (35%);
- aggregate household income within 10 minutes (25%);
- the gap: minutes to the nearest existing large store (25%);
- road access: 1.0 on a trunk or primary road, 0.7 on a secondary (15%).
C["gap"] = nearest_store[cand] # minutes to the nearest existing large storeC["access"] = pd.Series(node_cls[cand]).map({"trunk": 1.0, "primary": 1.0, "secondary": 0.7}).to_numpy()WEIGHTS = {"hh10": 0.35, "spend10": 0.25, "gap": 0.25, "access": 0.15}for k in WEIGHTS: C[f"r_{k}"] = C[k].rank(pct=True)C["score"] = sum(w * C[f"r_{k}"] for k, w in WEIGHTS.items())The weights are a judgement, and that is the method’s weakness as well as its strength. So we test the demand half of it against reality: if households and income within 10 minutes matter, the existing Supercenters should rank high on them.
mean min 50% maxhh10 8.473591e+04 2.886600e+03 8.181900e+04 1.580743e+05spend10 5.649686e+09 2.070025e+08 5.622091e+09 9.895790e+09gap 2.860000e+00 2.400000e-01 2.420000e+00 1.160000e+01access 8.000000e-01 7.000000e-01 7.000000e-01 1.000000e+00huff 8.370255e+08 1.902942e+08 8.721131e+08 1.085048e+09score 5.000000e-01 1.400000e-01 4.900000e-01 8.400000e-01existing Supercenters on households and spending within 10 minutes: median percentile 72% (range 7%-88%, 67% in the top half)The existing Supercenters sit at a median 72nd percentile on those criteria, and four of the six are in the top half. The two below halfway are the stores on the northern and south-western edges of the metro, with fewer than 45,000 households within 10 minutes (Step 8). Much of their trade comes from beyond our study area: a reminder that one box of census tracts is not a store’s whole market.
Step 7: the Huff model
The overlay counts the gap to the nearest competitor, but not how big that competitor is or how many others are a little further away. The Huff model handles both. The probability that a household at junction i shops at store j is
P(i, j) = Aj f(Tij) / Σk Ak f(Tik), with f(T) = 1 / (1 + T)λ,
where A is floor area, T is drive time in minutes and λ = 2. A new store’s captured spending is its share of every household’s spending, summed over the metro.
def batch_metrics(src: np.ndarray, S: np.ndarray) -> pd.DataFrame: """Households and spending inside CATCH minutes, and Huff-captured spending, for each source junction.""" rows = [] for k in range(0, len(src), 200): T = dijkstra(W, indices=src[k:k + 200], limit=30) a = A_new * decay(T) rows.append(pd.DataFrame({"hh10": (demand_hh * (T <= CATCH)).sum(1), "spend10": (demand_spend * (T <= CATCH)).sum(1), "huff": (demand_spend * a / (S + a + 1e-12)).sum(1)})) return pd.concat(rows, ignore_index=True)S is the sum of Ak f(Tik) over the existing stores at every junction, computed once. Each candidate then only adds its own term, so all 918 candidates take a few seconds.
lat lon hh10 gap score huff_$m share_of_metro35.104 -106.671 142579.171 3.023 0.822 1085.0 0.04735.174 -106.542 73901.266 0.616 0.430 1077.0 0.04635.209 -106.701 56170.986 3.149 0.460 1067.0 0.04635.181 -106.675 84275.051 1.335 0.548 1058.0 0.04535.104 -106.705 116716.240 1.697 0.668 1052.0 0.045metro aggregate household income $23.3bn | correlation between overlay score and Huff capture across candidates: 0.44The best site, just west of downtown near the Rio Grande, would capture an estimated 4.7% of the metro’s household income, $1,085m a year. It also has the highest overlay score of the five. But the two methods only partly agree across all candidates (r = 0.44). The second-best Huff site, in the north-east, sits just 0.6 minutes from a competitor and scores only 0.43 on the overlay. In the overlay, a nearby store counts against a site however small it is. In the Huff model it counts only in proportion to its floor area, so a 20,000 m² Supercenter can still win most of the spending around it. The overlay cannot see that.
The dollar figures are aggregate household income, not grocery sales, so read them as a ranking rather than a revenue forecast.
Step 8: replaying 2022 with the San Mateo store
Now put San Mateo Boulevard SE back and run the Huff model over all the stores as they were in 2022. Dividing each Supercenter’s captured spending by its floor area gives a measure of how well its location supports a store of its size.
where name floor_m2 hh10 inc10 huff_$m per_m20 35.111, -106.701 Walmart 22676.5 100208.1 62434.1 1121.3 49447.71 35.243, -106.699 Walmart 20948.4 44822.5 83254.5 1016.6 48528.22 35.112, -106.608 Walmart Albuquerque - Carlisle Blvd NE 19909.9 138991.4 56662.7 814.1 40891.63 35.079, -106.530 Walmart Albuquerque - Eubank Blvd NE 19464.1 121105.6 61992.4 772.4 39682.04 35.107, -106.549 Walmart Albuquerque - Wyoming Blvd NE 19655.4 128361.0 64688.5 751.9 38255.75 35.076, -106.588 Walmart (San Mateo Blvd SE, closed 2023) 19925.9 96335.8 52674.5 722.7 36270.96 35.026, -106.711 Walmart Albuquerque - Coors Blvd SW 19853.7 38610.1 58012.2 570.1 28713.6San Mateo ranked 6 of 7 Supercenters on modelled spending per m2 of storeSan Mateo ranked 6th of 7, at $36,300 of modelled spending per square metre against $49,400 for the best. Its 10-minute catchment had the lowest income of any Supercenter, $52,700 per household, and it sat between the Carlisle and Wyoming stores, which shared its customers.
That fits the closure, but it would be wrong to say the model predicted it. The Coors Boulevard SW store ranked lower still and remains open, and much of its catchment lies beyond the south-western edge of our study area. Walmart described the stores it closed in 2023 as underperforming, and a store’s performance depends on far more than its location.
Where this goes next
- Calibrate λ. The distance-decay exponent sets how far people will drive. Fit it to real visit data, such as loyalty-card postcodes or anonymised mobile data, if you can get them.
- Use spending, not income. Consumer expenditure surveys give the share of income spent on groceries and general merchandise, which turns the dollar figures into sales estimates.
- Add the land. Real site selection also checks plot size, zoning, the price of land and planning rules, which sit outside this model.
- Check it from space. Part 2 shows how to measure how busy a car park actually is with Sentinel-1, which gives you a way to test the model against what happened.
Frequently asked questions
What is the Huff model used for in retail?
It estimates the share of each area’s spending that a store will capture, given its size and its drive time compared with every competing store. Retailers use it to compare sites, estimate how much a new store would take from their own existing stores, and size a store for its location.
Why use drive time rather than distance?
Because shoppers experience time, not distance. A river with one bridge, a motorway with few junctions or a gated suburb can make a short distance a long drive. Drive time on a road network captures that; a buffer does not.
Do I need ArcGIS Network Analyst or a routing engine?
No. A road graph in a SciPy sparse matrix and scipy.sparse.csgraph.dijkstra give every drive time from hundreds of sources in seconds. ArcGIS Pro’s Network Analyst, pgRouting or OSRM add one-way streets, turn rules and traffic, which matter more for routing vehicles than for comparing sites.
How should I choose the overlay weights?
Start from what the business says matters, then test the criteria against the stores that already trade, as in Step 6. If successful stores do not rank high on a criterion, question it. Keep the weights in the report, so that a reader can change them and see the effect.
Is the data free to use commercially?
Yes. ACS and TIGER/Line data are US Government works in the public domain. Overture Maps data is open, with attribution, and contains OpenStreetMap data under the ODbL, which requires attribution and share-alike for derived databases.
Next steps
- Part 1: Watching car parks from space measures how busy 134 stores are from Sentinel-1 radar.
- Part 2: Car-park occupancy from Sentinel-1 radar in Python builds that method step by step.
- Location-allocation in Python chooses several sites at once to cover demand.
- Spatial accessibility with the 2SFCA method measures access to services with catchments and supply.
Data and licences
- Households, population and income: US Census Bureau, American Community Survey 2019–2023 five-year estimates, tables B11001, B01003 and B19013. Public domain.
- Census tracts: US Census Bureau, 2023 TIGER/Line shapefiles. Public domain.
- Roads, places and buildings: Overture Maps, release 2026-11-18.0, © Overture Maps Foundation, including data © OpenStreetMap contributors under the ODbL.
- Basemap: Esri, HERE, Garmin, © OpenStreetMap contributors.
- Store closure: Walmart’s confirmation to KRQE, as reported by Nexstar via The Hill, February 2023.
Walmart, Target, Costco and the other store names are trademarks of their owners, used here only to identify their stores. TechnicalGIS is not affiliated with or endorsed by any of them.