Car-park occupancy from Sentinel-1 radar in Python: Walmart store closures as a natural experiment

Measure how busy retail car parks are from free Sentinel-1 radar. Draw 45 Walmart Supercenter car parks in Chicagoland from Overture Maps, mask them to paved ground with NAIP aerial imagery, read every ascending pass since 2017, and test the signal on the 2023 store closures with a difference-in-differences and a placebo test.

Level
Advanced
Tested with
Python 3.12
Source code
Download scripts

Key takeaways

  1. Sentinel-1's 10 m pixels cannot count cars, but a car park full of them returns more radar energy than empty asphalt. Averaged over a whole car park, that difference is large enough to measure.
  2. When Walmart closed its Homewood and Chicago Chatham Supercenters in 2023, their car parks fell by 1.43 dB and 1.98 dB against the open Chicagoland stores on the same passes (p = 1.4 × 10⁻¹⁸ and 1.8 × 10⁻²⁰).
  3. Run through the same test at the same dates, the 18 open stores moved by −0.14 dB on average (standard deviation 0.68 dB). Only 1 of 18 fell as far as Homewood, and none as far as Chatham.
  4. Comparing each car park with the other car parks on the same pass cancels the weather, season and satellite, which would otherwise swamp the signal.

Before you start

  • Comfortable with GeoPandas, NumPy and pandas; Sentinel-1 SAR flood mapping in Python introduces backscatter, decibels and speckle
  • Python 3.10+ with duckdb, geopandas, rasterio, pystac-client, planetary-computer, scipy and matplotlib (pinned in requirements.txt)
  • An internet connection and patience for the first run: it reads about 12,000 small Sentinel-1 windows from the Microsoft Planetary Computer, with no account or API key, and caches them so later runs take seconds

Short answer: to measure car-park occupancy with Sentinel-1, draw each car park as a polygon, keep only paved ground, and average the linear VV backscatter over the whole car park on every pass of one orbit. Then subtract the median of the other car parks imaged on the same pass. That cancels the weather, the season and the satellite. What remains rises and falls with the cars. Test it on a known event: when Walmart closed two Chicagoland Supercenters in 2023, their car parks fell by 1.43 dB and 1.98 dB against the open stores, beyond all but one of 18 open stores run through the same test.

A full car park is a field of metal boxes. Each car’s side and the asphalt beside it form a corner reflector, and the radar pulse bounces off the ground, then off the car, straight back to the satellite. Empty asphalt is smooth and sends most of the pulse away. Sentinel-1’s 10 m pixels are far too coarse to see one car. Averaged over 40,000 m² of tarmac, though, the cars change the brightness enough to measure.

This is Part 2 of Retail from space. Part 1 runs the same idea over 134 stores across the United States and compares it with Walmart’s published transaction figures. Here, we build the method from scratch for one region and test it where the answer is known: three Chicagoland Supercenters that Walmart closed in spring 2023.

You will learn how to:

  1. find stores and their buildings in Overture Maps with DuckDB, and draw each car park from the store footprint, roads and neighbouring buildings;
  2. trim each car park to paved ground with NAIP aerial imagery;
  3. read the Sentinel-1 RTC backscatter over every car park and roof since 2017 from the Planetary Computer;
  4. test the closures with a difference-in-differences against the open stores, and a placebo test on every open store;
  5. check the result against NAIP images taken before and after a closure.

All outputs below are real results from car_park_radar.py, run on 20 November 2026 with Python 3.12, DuckDB 1.5.6, rasterio 1.5.2, pystac-client 0.9.1 and GeoPandas 1.2.0.

Why the closures make a good test

A radar signal that “goes up at Christmas” is easy to fool yourself with: the weather, the vegetation and the ground all change with the seasons too. A closure is cleaner. The car park was busy, then on a known day it was empty, and it stayed empty while the seasons carried on as before.

Walmart announced the closures itself. A Walmart statement reported by Progressive Grocer on 9 February 2023 named Homewood and Plainfield, closing by 10 March. Walmart’s own release of 11 April 2023, Walmart Announces Closure of Four Chicago Stores, named Chatham among the stores closing by 16 April.

We use the open Supercenters in the same region as controls. They share the satellite, the pass, the weather and the season with the closed stores, so if the closed car parks dim relative to them, the cars are the likeliest cause.

Step 1: stores and car parks from Overture Maps

Overture Maps publishes places, buildings and roads as GeoParquet on Amazon S3. DuckDB reads only the files whose extent overlaps our box, and only the rows inside it. We take every place whose name starts with “Walmart”, drop the in-store pharmacies, fuel stations and pickup points, and merge listings within 250 m of each other into one store.

A car park is not mapped as a tidy polygon everywhere, so we build one. We take the store’s building and a ring 110 m wide around it. From that ring, we cut out the neighbouring buildings and the roads, each buffered by its typical width. What is left next to the store is the car park.

car_park_radar.py
def car_park(p: shapely.Point) -> dict | None:
"""Store footprint at the place point and the car park around it, all in CRS metres."""
box = tuple(gpd.GeoSeries([p.buffer(450)], crs=CRS).to_crs(4326).total_bounds)
f = DATA / f"ctx_{p.x:.0f}_{p.y:.0f}.parquet"
if not f.exists():
b = overture("building", "'building' AS kind, NULL AS class", box)
s = overture("segment", "'road' AS kind, class", box, "subtype = 'road'")
pd.concat([b, s], ignore_index=True).to_parquet(f)
ctx = gpd.read_parquet(f).to_crs(CRS)
B = ctx[(ctx.kind == "building") & ctx.geom_type.isin(["Polygon", "MultiPolygon"])]
big = B[(B.area > 6000) & (B.distance(p) < 120)]
if big.empty:
return None
i = big.distance(p).idxmin() # the building at the place point, not a larger neighbour
fp = big.loc[i].geometry
others = B.drop(index=i)
R = ctx[(ctx.kind == "road") & ctx["class"].isin(ROAD_W)]
lot = fp.buffer(110).difference(fp.buffer(8))
lot = lot.difference(shapely.union_all(others.geometry.buffer(3).values))
lot = lot.difference(shapely.union_all([g.buffer(ROAD_W[c] / 2 + 2) for g, c in zip(R.geometry, R["class"])]))
parts = [q for q in getattr(lot, "geoms", [lot]) if q.distance(fp) < 30 and q.area > 2000]
return {"footprint": fp, "roof": fp.buffer(-15), "lot": shapely.union_all(parts)} if parts else None

We also keep the roof, the footprint shrunk by 15 m. A roof sees the same weather as the car park but never holds a car, which makes it a useful check later.

The three closed stores are no longer in the current Overture release as open shops, so the script adds them from the addresses Walmart announced. It also drops any stale listing within 400 m of them. A building of more than 9,000 m² at the point marks a Supercenter.

Output — Step 1
186 Overture places whose name starts with Walmart; top categories: {'financial_service': 33, 'department_store': 28, 'pharmacy_and_drug_store': 27, 'food_and_beverage_store': 16, 'electronics_store': 13}
56 open Walmart store points after merging duplicate listings, plus 3 closed stores
45 stores with a Supercenter-sized building (over 9,000 m2) at the listed point, 3 of them closed

Only 56 of the 186 listings are stores. The rest are the money centres, pharmacies and photo counters inside them, which is why the name filter and the 250 m merge matter.

Step 2: keep only paved ground with NAIP

The ring around a store also takes in grass verges, landscaped islands and sometimes a field. Vegetation changes its radar brightness through the year, so it would add a seasonal signal that has nothing to do with shoppers. The US National Agriculture Imagery Program (NAIP) flies every state at 0.6 m with red, green, blue and near-infrared bands, and its imagery is public domain.

Paving is grey and has no chlorophyll. We keep pixels with a low NDVI (below 0.10) and a low colour saturation (below 0.20), which drops tan soil as well as vegetation. Then we sieve out specks smaller than 60 m².

car_park_radar.py
def paved(lot: shapely.Geometry) -> tuple:
item = naip_items(to_ll(lot))[-1]
a, tr, crs = read_naip(item, lot)
ndvi = (a[3] - a[0]) / np.maximum(a[3] + a[0], 1)
sat = (a[:3].max(0) - a[:3].min(0)) / np.maximum(a[:3].max(0), 1) # asphalt and concrete are grey; soil is tan
m = sieve(((ndvi < 0.10) & (sat < 0.20) & (a[0] > 0)).astype("uint8"), size=int(60 / RES ** 2))
pv = shapely.union_all([shapely.geometry.shape(g) for g, v in shapes(m, mask=m == 1, transform=tr)])
pv = gpd.GeoSeries([pv], crs=crs).to_crs(CRS).iloc[0]
new = lot.intersection(pv).buffer(-1).buffer(1)
new = shapely.union_all([q for q in getattr(new, "geoms", [new]) if q.area > 400])
return new, item.datetime.date()
Output — Step 2
45 stores keep more than 12,000 m2 of paved car park; median 43,267 m2, median paved share of the ring 0.63
name lot_m2 paved_frac naip_date
Homewood, 17550 S Halsted St 46531.62 0.79 2023-07-10
Plainfield, 12690 S Route 59 41690.07 0.48 2023-08-18
Chicago Chatham, 8331 S Stewart Ave 38331.12 0.61 2023-07-10

A median car park keeps 43,267 m², about 430 Sentinel-1 pixels. That is the averaging that beats speckle.

Two NAIP aerial images: on the left the Homewood Walmart with its empty car park outlined in yellow and the roof sample dashed in cyan; on the right an open Chicagoland Supercenter with a full car park outlined the same way
The paved car-park masks (yellow) and roof samples (cyan) on NAIP imagery. Left: Homewood in July 2023, four months after it closed. Right: the open store with the cleanest paved ring. Its mask also takes in part of a neighbouring car dealer's yard on the west side, where parked stock changes with sales rather than shoppers: one of the sources of noise the comparison in Step 4 has to tolerate.

Step 3: Sentinel-1 backscatter over every car park

The Planetary Computer’s sentinel-1-rtc collection holds radiometrically terrain-corrected backscatter (γ⁰) as Cloud Optimised GeoTIFFs. Each item is a whole scene, but rasterio reads only the window we ask for, so each read is a few kilobytes. For each pass, we read the VV and VH windows around the car park and average the linear values inside the car park and the roof. Averaging decibels would bias the mean low.

car_park_radar.py
def read_pass(item, name: str, zones: dict) -> dict:
"""Mean VV and VH gamma0 (linear) over the car park and the roof for one Sentinel-1 RTC item."""
rec = {"name": name, "t": item.datetime, "orbit": item.properties["sat:relative_orbit"],
"platform": item.properties.get("platform")}
for pol in ("vv", "vh"):
if pol not in item.assets:
continue
for attempt in range(4):
try:
with rasterio.open(planetary_computer.sign(item.assets[pol].href)) as src:
z = {k: gpd.GeoSeries([g], crs=CRS).to_crs(src.crs).iloc[0] for k, g in zones.items()}
x0, y0, x1, y1 = z["lot"].union(z["roof"]).bounds
w = from_bounds(x0 - 20, y0 - 20, x1 + 20, y1 + 20, src.transform).round_offsets().round_lengths()
arr = src.read(1, window=w, boundless=True, fill_value=0).astype("f8")
tr = src.window_transform(w)
break
except rasterio.errors.RasterioIOError:
if attempt == 3:
raise
time.sleep(3 + 5 * attempt)
for k, g in z.items():
v = arr[geometry_mask([g], out_shape=arr.shape, transform=tr, invert=True) & (arr > 0)]
rec[f"{pol}_{k}"] = v.mean() if v.size else np.nan
return rec

We keep ascending passes only. Over Chicago, they cross at about 18:40 local time, early evening, when shops are busy. The descending passes cross at about 06:40, when car parks are nearly empty. Part 1 uses those dawn passes as a control.

Output — Step 3
5,978 store-passes read in 0 s; dates per ascending orbit: {19: 5, 121: 292}; usual local time of the pass: 18:40

The “0 s” is a rerun from the cache; the first run reads the same passes from the Planetary Computer, 32 at a time. Nearly every pass is from relative orbit 121, which covers the region every 12 days, or every 6 days while Sentinel-1A and 1B flew together until December 2021. Orbit 19 grazed the area on only five dates. Fixing one orbit keeps the viewing geometry the same from pass to pass.

Step 4: did the car parks go quiet when the stores closed?

Raw backscatter swings by several decibels with rain, snow and freezing, all of which hit every car park in the region at once. So for each store and pass, we subtract the median of the other open car parks on that same pass. This is the difference-in-differences: we compare the change at the closed store with the change at the open ones.

The closure step is the mean of that relative series from 30 days to two years after the closure, minus its mean over the two years before. The 30-day gap leaves out the closing-down weeks. To see how big a step chance can produce, we put every open store through the same test, at both closure dates, as a placebo.

car_park_radar.py
def relative(name: str) -> pd.DataFrame:
"""One store's car park minus the median of the other open car parks on the same pass, in dB."""
s = S[S.name == name]
ctrl = S[S.name.isin(open_names - {name})].groupby(["orbit", "date"]).vv_db_lot.median()
return s.assign(rel=s.vv_db_lot.values - ctrl.reindex(pd.MultiIndex.from_frame(s[["orbit", "date"]])).values)
def step(rel: pd.DataFrame, when: pd.Timestamp) -> tuple:
"""Mean relative backscatter from 30 days to two years after a date, minus the two years before."""
d = (rel.date - when).dt.days
before, after = rel.rel[(d >= -730) & (d < -30)].dropna(), rel.rel[(d > 30) & (d <= 730)].dropna()
return after.mean() - before.mean(), stats.ttest_ind(after, before, equal_var=False).pvalue, len(before), len(after)

Before this, the script keeps only passes on which at least five open stores were imaged, so that the median is meaningful. A store needs at least 20 comparable passes on each side of the date.

Output — Step 4
left out: 25 stores (1 closed: Plainfield, 12690 S Route 59) with fewer than 20 comparable passes on one side of the date; they lie at the edge of the regular ascending track
store group date step_db p passes_before passes_after
Homewood, 17550 S Halsted St closed 2023-03-10 -1.43 1.4e-18 59 55
Chicago Chatham, 8331 S Stewart Ave closed 2023-04-16 -1.98 1.8e-20 59 55
open stores run through the same test (placebo), n = 18: mean -0.14 dB, sd 0.68 dB, range -1.46 to +0.88 dB
closed stores: mean step -1.70 dB, -2.3 placebo standard deviations; share of open stores with a step as low as each closed store: [0.056, 0.0]

Both car parks went dark. Homewood fell by 1.43 dB and Chatham by 1.98 dB relative to the other stores, and with 55 to 59 passes on each side, neither change is plausibly chance within the store (p = 1.4 × 10⁻¹⁸ and 1.8 × 10⁻²⁰). The placebo puts that in context. Open stores move by −0.14 dB on average, with a standard deviation of 0.68 dB. One of the 18 (5.6%) fell as far as Homewood, and none as far as Chatham.

A drop of 1.4 to 2 dB means the car park returns roughly 28% to 37% less energy, which is what you would expect if most of the cars have gone.

Plainfield is the honest casualty. It sits at the western edge of the orbit 121 track and was imaged on too few dates to test, so the script reports it rather than quietly dropping it.

Histogram of the closure-step test for 18 open Supercenters, centred just below zero, with vertical lines for Homewood at −1.43 dB near the left tail and Chicago Chatham at −1.98 dB beyond it
The same test run on every open store at the closure dates (blue) against the two closed stores. Chatham falls beyond every open store; one open store fell as far as Homewood.

The time series shows something else. Both closed car parks were already dimming through 2022, a year before Walmart closed them. A store that is losing customers has an emptier car park, and Walmart said it closed the stores because they were not performing. The radar sees that decline as well as the closure. It is also why the step for Homewood, measured against the two years before, understates the full fall from 2021.

Line chart from 2017 to 2026 of car-park backscatter relative to the open stores: Homewood in red falls from about −1.8 dB to −4 dB and Chicago Chatham in purple from about +1.3 dB to −1 dB around the closures in spring 2023, while the median open store stays near zero
Each closed car park relative to the open ones on the same pass, as a 90-day running mean. The levels differ from store to store; what matters is the change. Both car parks begin to dim through 2022 and drop again after closing.

Step 5: see it in the aerial imagery

NAIP flew Homewood in September 2021, about 18 months before the closure, and again in July 2023, four months after it. The car park in 2021 is already sparse, which matches the dimming in the radar. In 2023, only a few scattered vehicles remain in front of the store, while the outparcels around it, which stayed open, still have cars outside.

Two NAIP aerial images of the Homewood Walmart: on 8 September 2021 the car park in front of the store has scattered rows of parked cars; on 10 July 2023 it is almost empty
Walmart Homewood in NAIP imagery on 8 September 2021 and 10 July 2023, before and after it closed on 10 March 2023.

NAIP is also how you would calibrate the radar in cars rather than decibels. Each NAIP flight is a snapshot of cars you can count at 0.6 m. The catch is timing: NAIP flies mid-morning, a few times a decade, while Sentinel-1 passes at 06:40 and 18:40. So use it to check the masks and the direction of a change, rather than to fit a precise conversion.

How far can you push this?

  • Closures and openings, yes. A store that goes from full to empty moves its car park by 1.2 to 2.7 dB (see Part 1 for five closures nationally), and that stands well clear of the noise.
  • Seasons and weekdays, on average. Across many stores, the evening car parks brighten between Black Friday and Christmas and on Fridays. One store on one pass is too noisy to read.
  • Small changes at one store, no. A 2% change in footfall would move a car park by a few hundredths of a decibel, far below the 0.68 dB spread between open stores.

Next steps, if you want to go further:

  • add the descending passes as a control: a real change in shoppers should appear in the evening and not at dawn;
  • use the roof (vv_db_roof) as a second control, subtracting it from the car park to remove local weather;
  • try VH as well as VV, or combine them;
  • swap the box and the store names for another chain, or another closure.

Frequently asked questions

Can Sentinel-1 count cars?

No. Its pixels are 10 m across in this product, and a car is about 4.5 by 1.8 m. What it measures is the average brightness of the whole car park, which rises as more cars stand on it. Counting individual cars needs imagery of about 0.5 m or better, such as NAIP for occasional snapshots, or commercial satellites.

Why compare against other car parks rather than use the raw backscatter?

Because rain, snow, frozen ground and the satellite itself change the raw value by more than the cars do. On a single pass, all the car parks in the region share those conditions, so subtracting the median of the others removes most of them. What is left is specific to that car park.

Why ascending passes only?

Over the central United States, the ascending passes cross at about 18:40 local time and the descending passes at about 06:40. Shoppers are there in the evening, so the ascending passes carry the signal. Mixing the two would also mix two viewing geometries.

Why was Plainfield left out?

It lies at the edge of the regular ascending track, so it was imaged on too few comparable dates. The script requires 20 passes on each side of the closure and reports any store that falls short, rather than testing it on a handful of passes.

Does this work outside the United States?

Sentinel-1 and Overture Maps are global. NAIP is US-only, so elsewhere you would mask paving with another source: Sentinel-2 NDVI at 10 m, a national aerial survey, or the OpenStreetMap amenity=parking polygons where they are mapped well.

Next steps

Data and licences

  • Sentinel-1: contains modified Copernicus Sentinel data (2017–2026), radiometrically terrain corrected by Microsoft Planetary Computer. Copernicus data are free, full and open, with attribution.
  • NAIP: USDA Farm Production and Conservation Business Center, public domain, via Microsoft Planetary Computer.
  • Overture Maps: places, buildings and transportation, release 2026-11-18.0, © Overture Maps Foundation, including data © OpenStreetMap contributors under the ODbL.
  • Store closures: Walmart statements reported by Progressive Grocer (9 February 2023), and Walmart, Walmart Announces Closure of Four Chicago Stores (11 April 2023).

Walmart is a trademark of Walmart Inc., used here only to identify its stores. TechnicalGIS is not affiliated with or endorsed by Walmart Inc.

Key terms

Backscatter (γ⁰)
The share of the radar pulse returned towards the satellite, normalised for the illuminated area and usually shown in decibels (dB).
RTC
Radiometric terrain correction: Sentinel-1 backscatter corrected for the slope and illuminated area of the ground, so passes from different geometries can be compared.
Double bounce
Radar energy that reflects off the ground and then off a vertical surface, such as a car's side, straight back to the sensor. It is why rows of parked cars brighten smooth asphalt.
Difference-in-differences
Comparing the change at a treated site with the change at untreated sites over the same period, so shared influences cancel out.
Placebo test
Running the same test on sites where nothing happened, to see how often chance alone produces a result as large as the real one.
Histogram of the change in car-park radar brightness at 204 open-store series, centred on zero, with red lines for five closed Walmart stores between −1.2 and −2.7 dB, all to the left of most open stores

Article Remote Sensing Part 1 of 3

Watching car parks from space: what Sentinel-1 radar shows about Walmart's shoppers

Free Sentinel-1 radar measured 134 Walmart car parks across the United States on every pass from 2017 to November 2026. It shows the stores that closed, the Christmas rush, Friday evenings and the spring 2020 lockdowns. Here is how it compares with the transaction figures Walmart publishes, what it cannot show, and which other satellite data helps.

Intermediate 13 min read

Three line charts of Sentinel-1 VV, VH and ratio backscatter through the 2023–24 season for wheat, oilseed rape, spring barley and maize

Tutorial Python

Sentinel-1 crop monitoring in Python: SAR time series for wheat and oilseed rape

Monitor crops through cloud with free Sentinel-1 radar. Build VV, VH and VH/VV ratio time series for 247 fields in Cambridgeshire, beat speckle by field-averaging, read the growth signatures of winter wheat and oilseed rape, and compare with the gaps that cloud leaves in Sentinel-2 NDVI.

Intermediate 16 min read

Greyscale radar map of a 49 by 51 km sea area with orange circles marking 87 detected vessels and blue squares marking the wind farm turbines

Tutorial Python

Sentinel-1 ship detection in Python: a CA-CFAR detector off the Port of Rotterdam

Detect ships in free Sentinel-1 SAR imagery with a cell-averaging CFAR detector written in NumPy and SciPy: mask the land, set a threshold from a speckle model, cluster detections into targets, reject wind turbines, sidelobes and ambiguities, compare VV with VH and export the vessels as GeoJSON.

Intermediate 16 min read