Update, October 2026: I rebuilt this project and found that two of the sites were in the wrong place and the pixel values carried an uncorrected offset, so the numbers below are superseded. The new version, its corrected numbers and a live dashboard are in Sentinel Stockpile, Revisited.
Every year the Pacific Northwest lumber supply chain does the same thing. Mills cut timber all summer, and logs pile up at export terminals along the Columbia River until ships carry them to Asia. Then winter comes, the logging roads close and the yards go quiet. Economists track this and industry reports document it. With this project, I watched it happen from 500 miles up.
Sentinel Stockpile is a commodity-tracking pipeline built on free ESA satellite imagery and Microsoft Planetary Computer. It measures industrial stockpiles at fixed locations over time. Here that means watching lumber pile up and drain away at the Port of Longview, Washington, the largest log export terminal on the Columbia River, scene by scene for a whole year.
The Time Series
Port of Longview Β· 12-month stockpile area Β· April 2025 β April 2026. Each dot is a Sentinel-2 scene. The Pacific Northwest lumber year, measured in hectares.
That chart is 12 months of lumber stockpile area at the Port of Longview. The signal is hard to miss. It's a seasonal cycle set by the Cascades timber harvest, Columbia River shipping and Asian construction markets.
| Season | Area | What's Happening |
|---|---|---|
| Spring (AprβMay) | ~20 ha | Yards at their annual low. Mills start up again after winter, and logging trucks roll once the mountain roads dry out. |
| Summer (JunβJul) | 47 ha peak | Peak harvest, with Cascades timber sales in full swing. Lumber piles up faster than ships can carry it out. Drive past in July and you'd see mountains of logs across the terminal. |
| Fall (AugβSep) | 22 ha | The drawdown. Export vessels load for Asian construction markets, and the inventory goes from 47 hectares back to 22 in six weeks. |
| Winter (Jan) | 5 ha | Rain shuts the logging roads and mills cut shifts. Things slow way down. |
July and January
Here's the port from orbit in July and again in January. The reddish-brown rectangles in the upper left are log stacks, and the bright white patches are dimensional lumber or tarped material. In July they're everywhere. In January the yard is mostly empty pavement.
July 13, 2025: peak season. Log stacks and lumber filling the terminal. Columbia River at lower left.
January 16, 2026: winter low. Same terminal, mostly bare pavement. The Columbia has risen with winter rain.
And here's what the classifier makes of the same scenes, pixel by pixel:
July 2025: 32% stockpile. Amber = stockpile. Blue = Columbia River. Brown = pavement. Green = vegetation. Nearly a third of the terminal covered in lumber.
January 2026: 3.4% stockpile. Same classifier. The terminal has emptied out, and there's more blue as the Columbia River rises. The amber is nearly gone.
How the Classification Works
Different materials reflect light differently, in ways the eye can't fully pick out but a multispectral sensor can. Sentinel-2 captures six spectral bands (visible light plus near-infrared and shortwave infrared), and from those I compute indices that put numbers on the differences.
| Index | What It Does |
|---|---|
| NDVI | Vegetation index. Picks out trees and grass so they stay out of the stockpile count |
| BSI | Bare soil index. Separates textured surfaces like lumber stacks from smooth pavement |
| Brightness | Catches the actual stockpile material, which reflects more light than surrounding terminal surfaces |
Each pixel gets classified as water, vegetation, stockpile, or ground. Count the stockpile pixels, multiply by the pixel area (100 mΒ² each), and you have a measurement in square meters. Do it across 32 scenes over 12 months and you have a time series. The thresholds between "stockpile" and "ground" were tuned by eye. I looked at the satellite imagery, compared it with the classifier's output, and adjusted until the amber pixels landed where the lumber actually sits. That part is as much craft as science.
"The yearly swing of a $40 billion industry, visible from space, measured with free tools, and repeatable by anyone with a laptop."
Beyond lumber
The Port of Longview lumber cycle is a proof of concept. The same spectral classification works for anything that piles up where you can see it at a fixed outdoor site:
Hedge funds pay six figures a year for this kind of analysis, satellite-derived commodity data that moves faster than official reports. Sentinel Stockpile shows you can build the same thing with open data, open tools and a pixi environment.
How it's put together
Each monitoring site is a JSON config file, and each commodity type has its own classification thresholds. The pipeline runs on GitHub Actions as a monthly cron job. It downloads fresh Sentinel-2 scenes from Microsoft Planetary Computer, classifies the pixels, measures the areas and redraws the time series charts. There are no API keys and no paid accounts; the European Space Agency and Microsoft provide all of it free.
Current sites: Port of Longview (12-month time series, complete), Port of Tacoma containers (configured, threshold tuning in progress) and Weyerhaeuser Longview (configured). Next up is adding Sentinel-1 radar, which sees through the Northwest clouds that blank out optical imagery from October through January.
The project is open source at github.com/bdgroves/sentinel-stockpile. Add a site config, run the pipeline, get a time series. Point it at something interesting.
