The price on a fuel pump is easy to see. The miles embedded in everything you buy are harder to track.
Before a bag of rice reaches a grocery shelf or a replacement part arrives at a factory, it travels through a physical network of highways, rail lines and connections. When diesel gets expensive, those journeys become more expensive, too. On Oct. 20, the national average price of diesel stood at approximately $6.32 a gallon, compared with $3.62 a year earlier, according to AAA.
Understanding how far goods must travel helps experts assess freight costs. Researchers at Arizona State University have developed a more realistic way to estimate those miles, calculating distances along the highways and railways goods use instead of straight lines between locations.
Their study, “A dataset of inter-county distances along the real-world highway and railway networks in the contiguous United States,” published in Scientific Data, a Nature Portfolio journal, introduces a dataset with more than 15.2 million county-to-county distance records across the contiguous United States. It gives researchers a more accurate foundation for studying the cost of moving goods.
Deniz Berfin Karakoc is an assistant professor of industrial engineering in the School of Computing and Augmented Intelligence, part of the Ira A. Fulton Schools of Engineering at ASU. She studies large transportation networks and how to move food and other essential commodities more efficiently.
“A straight line can tell you how close two counties are geographically, but it cannot tell you how far goods need to travel along highways or railways,” Karakoc says. “We wanted to give researchers a consistent way to measure those network distances at the county scale.”
Beyond driving directions
For anyone accustomed to getting driving directions on a phone, that might sound like a problem already solved. Commercial routing tools can calculate trips between specific addresses. But studying transportation across thousands of counties requires a standardized dataset that supports comparisons across an entire country and across transportation modes.
Existing freight information often covers regions too large to support detailed county-level analysis. Without suitable distance data, researchers sometimes rely on calculations based on latitude and longitude. Those approximations capture geographic separation but cannot follow a highway around an obstacle or trace the connections in a rail network.
Organizing distances by county allows researchers to pair the dataset with existing estimates of goods moving between counties to better assess transportation costs. Karakoc, along with industrial engineering graduate student Yongxin Cai and data science graduate student Xinyan Li, started with federal transportation maps and county boundaries. They converted highway and railway segments into networks of nodes and links, then calculated the shortest paths between representative locations within counties.
Think of a vast collection of connected line segments. Each segment carries a distance. The task is to find the combination connecting two locations with the smallest total mileage.
The resulting dataset includes highway distances for 2,863 counties and railway distances for 2,649. It is publicly available, giving other researchers a foundation they can combine with information about commodities, shipment volumes, fuel consumption or transportation costs.
The dataset could help researchers explore how fuel prices affect the cost of moving goods. Combined with information about fuel efficiency and shipment volumes, these distances could offer a clearer picture of how transportation costs vary across suppliers, locations and routes.

From miles to making decisions
Consider a hypothetical food distributor comparing two suppliers. One might appear closer in a straight-line calculation but require a longer highway trip. Establishing that difference would be one step toward comparing transportation costs. Shipment size, vehicle efficiency, delivery schedules and other operating conditions would determine the rest.
“This dataset provides a foundation for asking more detailed questions about transportation costs, infrastructure and supply chains,” Karakoc says. “By representing the distances along actual networks, we can help future analyses better reflect the geography that freight has to navigate.”
The researchers checked their method against broader freight-flow information and compared samples of county-to-county distances with independent road and rail routing systems. Those comparisons showed strong overall agreement, although individual routes differed. The data are intended as a benchmark for broad freight analysis, with limits that matter for practical use.
A shortest path is not necessarily the fastest or cheapest route. The dataset does not incorporate all directional restrictions or operating constraints. Its representative county locations are not individual warehouses, highway interchanges or freight terminals. And a rail connection on a map does not, by itself, establish that a particular shipment can use it.
Those details would need to enter any analysis intended to guide a real shipment.
Ross Maciejewski, director of the School of Computing and Augmented Intelligence, says that the value of the work extends beyond examining current fuel-price spikes.
“This publicly available dataset gives researchers a shared starting point for studying transportation costs, emissions and supply-chain disruptions,” Maciejewski says. “Instead of building their own distance estimates, they can focus on what those distances mean for the movement of food, medicine and other essential goods.”
Where should a company build a warehouse? Which suppliers are best positioned to serve it? Where would a new transportation connection help? Distance informs each of those decisions. By measuring it along actual roads and rails, Karakoc’s new dataset could help researchers evaluate the options with a clearer understanding of the journeys involved.



