Technical writing

FHWA Highway Data: The Federal Dataset Behind Bridge Conditions, Pavement Quality, and Traffic Counts

· 18 min read· AI Analytics
FHWATransportationInfrastructureFederal Data

The Federal Highway Administration publishes more data about American roads than most people realize exists. The Highway Performance Monitoring System tracks pavement condition on every lane-mile of National Highway System road. The National Bridge Inventory catalogs the inspection records of all 620,000 public road bridges in the country. The annual Highway Statistics series assembles road mileage, registered vehicles, licensed drivers, fuel consumption, and gas tax revenues into a single longitudinal federal dataset going back to 1945. These datasets are public, machine-readable, and almost entirely ignored outside of transportation engineering circles.

FHWA and Its Statutory Mandate

The Federal Highway Administration is a modal agency within the U.S. Department of Transportation, created in its current form by the Department of Transportation Act of 1966. Its core statutory authority derives from Title 23 of the United States Code, which governs federal-aid highway programs, and from 23 USC § 502 in particular, which authorizes FHWA to conduct highway research and collect traffic and highway data from the states as a condition of receiving federal-aid highway apportionments.

The practical leverage is significant. States that accept federal-aid highway funds—all 50 do—must report HPMS data to FHWA annually. That reporting requirement is what produces a nationally consistent dataset: 50 state DOTs submitting standardized condition and inventory data on their public road networks each year. FHWA consolidates, quality-checks, and publishes the result as HPMS, which feeds congressional apportionment formulas, the biennial Conditions and Performance report to Congress, and the ASCE Infrastructure Report Card scores that generate political attention every few years.

FHWA's other major programmatic roles include administering the Interstate Highway System—47,856 miles of limited-access divided highway built under the Federal Aid Highway Act of 1956—the National Highway System, the Federal Lands Highway program serving roads on federal lands where no state DOT has jurisdiction, and the bridge program funded under 23 USC § 144.

The National Bridge Inventory

The National Bridge Inventory—NBI—is a bridge-by-bridge database of every bridge on a public road in the United States with a span of 20 feet or more. As of the 2023 data release, the NBI contains records for approximately 620,000 structures. Each record is a fixed-width flat file conforming to the FHWA Recording and Coding Guide for the Structure Inventory and Appraisal of the Nation's Bridges (publication SA-95-038, revised), which specifies 116 data items covering location, geometry, material, construction year, traffic volume, and condition ratings.

Inspection cycle and AASHTO standards

Federal law under 23 USC § 151 requires that every bridge on a public road be inspected at routine intervals not exceeding 24 months, with special underwater inspections required for bridges with substructure elements below water. The inspection standards are set by AASHTO—the American Association of State Highway and Transportation Officials—in the Manual for Bridge Evaluation and the FHWA National Bridge Inspection Standards (NBIS) at 23 CFR Part 650 Subpart C. Inspectors must be NBIS-certified, typically requiring a professional engineering license plus additional bridge inspection training.

Each inspection produces condition ratings on a 0–9 scale for three primary structural components: the deck (the roadway surface itself, including the wearing surface and deck concrete or steel), the superstructure (the beams, trusses, arches, or cables that transfer load from the deck to the substructure), and the substructure (the piers, abutments, and foundations that transfer load to the ground). The ratings run from 9 (excellent) to 0 (failed condition). A rating of 4 is described as “poor condition,” meaning the element has advanced section loss, deterioration, spalling, or scour. A rating of 2 is “critical condition” requiring close monitoring or bridge closure.

Structurally deficient vs. functionally obsolete

Two classification labels in the NBI data generate perennial media coverage and political attention, and both are routinely misunderstood.

A bridge is classified as structurally deficient when any one of its three primary condition ratings—deck, superstructure, or substructure—is rated 4 or below. The classification does not mean the bridge is imminently unsafe or about to collapse. It means the structure has deterioration significant enough that more frequent inspection or remediation is warranted. Many structurally deficient bridges carry full traffic loads for years while repair funding is programmed. The classification is a maintenance and investment signal, not an emergency closure designation. Bridges that are imminently unsafe are closed or posted—a separate NBI data element—independent of the SD classification.

A bridge is classified as functionally obsolete when its geometry is inadequate for current traffic, regardless of structural condition. A bridge built in 1952 with 10-foot lanes and no shoulder that carries four lanes of interstate traffic may be in excellent structural condition and still be classified functionally obsolete because its lane width, vertical clearance, or load capacity does not meet current AASHTO geometric design standards. Functionally obsolete is not a condition rating—it is a design adequacy classification.

As of 2023 FHWA data, approximately 7.5 percent of the nation's bridges—roughly 46,000 structures—are classified structurally deficient. The count has declined substantially over the past two decades: in 2000, more than 29 percent of bridges were structurally deficient, reflecting accumulated deferred maintenance from the 1970s fiscal crisis era. The decline is real, not a reclassification artifact, driven by substantial federal and state bridge investment.

The NBI Sufficiency Rating

The NBI Sufficiency Rating is a composite score from 0 to 100 computed from four weighted factors: structural adequacy and safety (55 percent of the score), serviceability and functional obsolescence (30 percent), essentiality for public use (15 percent), and a special reduction factor for bridges with certain critical deficiencies. The formula is defined in the Recording and Coding Guide and produces a single number that FHWA uses to prioritize federal bridge replacement and rehabilitation funding.

Bridges with a sufficiency rating below 50 are eligible for federal replacement funding; bridges with a rating below 80 are eligible for rehabilitation funding. The rating was designed in the 1970s when the federal bridge program was primarily focused on eliminating structurally deficient and functionally obsolete bridges from the inventory; it has been criticized as a blunt instrument that does not capture asset management considerations such as remaining service life, maintenance cost projections, or the consequences of failure, but it remains the primary federal bridge funding formula variable.

The Francis Scott Key Bridge and NBI context

The collapse of the Francis Scott Key Bridge in Baltimore on March 26, 2024—when the container ship Dali lost power and struck a support pier, triggering the progressive collapse of the continuous truss structure—prompted renewed scrutiny of the NBI. The Key Bridge had a sufficiency rating of 59.6 at its last inspection and carried no structurally deficient rating on its primary elements. Its collapse was not a structural deterioration failure; it was a ship strike. The distinction matters for interpreting NBI data: the inspection and rating system is designed to detect in-service deterioration, not catastrophic external impact events. Vessel collision risk is assessed separately under AASHTO Guide Specifications for Vessel Collision Design of Highway Bridges, and many older bridges were not designed to current vessel collision standards.

The IIJA—Infrastructure Investment and Jobs Act, signed in November 2021—appropriated $40 billion over five years for bridge repair, rehabilitation, and replacement, the largest dedicated bridge investment in federal highway history. Of that total, $27.5 billion is formula-distributed to states through the Bridge Formula Program, and $12.5 billion is discretionary through the Bridge Investment Program for large and complex bridges. FHWA publishes annual apportionment tables showing state-by-state allocations, which are themselves derived from NBI sufficiency rating data.

HPMS Pavement Condition

The Highway Performance Monitoring System—HPMS—is FHWA's comprehensive annual data collection on highway extent, condition, performance, and use. States submit HPMS data each year covering every road segment on the National Highway System (NHS) and a sample of lower-functional-class roads. HPMS is the primary input to FHWA's biennial Conditions and Performance report, the document that Congress requires under 23 USC § 502(b) to assess the state of the highway system.

International Roughness Index and pavement condition

The primary pavement condition metric in HPMS is the International Roughness IndexIRI—a standardized measure of road surface roughness expressed in inches per mile (or meters per kilometer in SI units). IRI is computed from the longitudinal profile of the road surface, measured using inertial profilers (laser-based instruments mounted on vehicles that measure surface displacement at highway speed). The IRI scale runs from 0 (perfectly smooth) upward, with values above 170 in/mi considered “poor” condition for Interstate-class roads, and above 220 in/mi for other NHS routes.

FHWA aggregates IRI into the “Good/Fair/Poor” condition reporting framework used in public communications and the ASCE Report Card:

ConditionIRI Threshold (Interstate)IRI Threshold (Other NHS)
Good< 95 in/mi< 95 in/mi
Fair95–170 in/mi95–220 in/mi
Poor> 170 in/mi> 220 in/mi

As of FHWA's 2023 Conditions and Performance report, approximately 45 percent of lane-miles on the NHS are in Good condition, 42 percent in Fair, and 13 percent in Poor. Interstate highways perform better than other NHS routes; urban roads perform worse than rural roads on a lane-mile basis, partly because urban roads carry far higher vehicle loads and partly because urban subsurface utility conflicts complicate pavement maintenance.

The Present Serviceability Rating—PSR—is an older pavement condition measure derived from the AASHO Road Test of the 1950s and early 1960s, which relates pavement performance to human-rated rideability. PSR runs from 0 to 5, with 5 being perfect and 1.5 being the threshold for “poor” condition. PSR has been largely superseded by IRI for HPMS reporting because IRI is objectively measured rather than rated, but PSR terminology persists in older literature and some state pavement management systems.

NHS vs. non-NHS coverage

HPMS data quality is highest for the National Highway System—161,000 miles of roadway that includes the Interstate System plus other major routes designated as important to the nation's economy, defense, and mobility. NHS roads must be reported at the segment level with measured IRI. Non-NHS roads are reported through a stratified sample that allows FHWA to estimate national and state-level condition distributions without requiring full census collection on the 3.8 million miles of local roads and county roads that lie outside the NHS. The sampling methodology is documented in the HPMS Field Manual, updated periodically.

Traffic Monitoring: AADT, VMT, and Counting Stations

HPMS also serves as the national database for highway traffic volumes. The primary traffic volume metric is Annual Average Daily Traffic—AADT—the estimated average number of vehicles that pass a point on a road in a 24-hour period, averaged across all 365 days of the year. AADT is the unit of traffic volume used in pavement design, traffic signal optimization, truck weight regulation, and transportation planning nationwide.

Short counts, continuous counts, and WIM stations

FHWA's Traffic Monitoring Guide defines three types of traffic counting stations that contribute to AADT estimation:

Short-count stations use temporary pneumatic tube counters, video detection, or portable sensors placed at a road location for a period ranging from 24 hours to several weeks. Short-count data must be adjusted to annual averages using seasonal and day-of-week factors derived from nearby continuous count stations. Short counts are the primary data source for AADT estimates on lower-volume roads where permanent instrumentation is not cost-effective.

Continuous count stations—also called Automatic Traffic Recorders (ATRs)—use permanent inductive loop detectors, radar sensors, or piezoelectric sensors to record traffic volume continuously, typically transmitting hourly counts in real time. The approximately 5,000 continuous count stations on the NHS provide the seasonal adjustment factors used to convert short-count data and are the source of the volume-speed-density relationships used in traffic engineering. Continuous count data is submitted to FHWA via the HPMS data specification.

Weigh-in-motionWIM—stations use embedded piezoelectric sensors or bending plate systems in the roadway to measure the weight of vehicles in motion without requiring them to stop. WIM data records axle weights, gross vehicle weight, vehicle classification, and speed for every vehicle passing the sensor. WIM data is used to enforce weight limits through virtual enforcement (comparing recorded weights against legal limits), to characterize the truck loading spectrum for pavement design, and to monitor seasonal load restrictions on roads with spring weight limits. FHWA's Long-Term Pavement Performance (LTPP) program has used WIM data to calibrate pavement performance models for 30 years.

VMT computation and the national total

Vehicle Miles Traveled—VMT—is the aggregate measure of driving activity computed as AADT times road segment length, summed across all road segments and all days. FHWA computes the national VMT estimate monthly from HPMS segment-level AADT data and publishes the result in the Traffic Volume Trends report, the closest thing to a real-time indicator of national driving activity. The annual national VMT total—approximately 3.2 trillion miles in recent years—is used to compute per-mile traffic fatality rates, fuel consumption efficiency benchmarks, and emissions inventory estimates.

VMT is politically significant because it appears in many federal funding formulas. States with higher VMT on their federal-aid roads receive larger apportionments under certain FHWA formula programs. This creates mild incentive for states to report higher traffic volumes, which FHWA addresses through consistency checks against fuel consumption data and through the HPMS data quality review process.

Highway Statistics: The Annual Compendium

FHWA Highway Statistics is an annual publication that compiles more than 100 data tables on the nation's highway system. It has been published continuously since 1945 and constitutes the longest running federal highway statistical series. The primary table sets cover:

Road mileage by jurisdiction—total public road lane-miles broken down by ownership (federal, state, county, municipal, and other), by surface type (paved vs. unpaved), and by functional classification (Interstate, other principal arterial, minor arterial, major collector, minor collector, local). The functional classification system has nine categories arranged in a hierarchy from Interstate at the top to local roads at the bottom. Federal-aid eligibility generally applies to roads above the collector functional class, though local roads on the federal-aid system are also eligible in certain programs.

Registered vehicles and licensed drivers—state-by-state counts of registered motor vehicles by vehicle type (passenger cars, light trucks, buses, motorcycles, trucks) and counts of licensed drivers by age group, compiled from state DMV records. These tables are the primary federal source for tracking vehicle fleet composition over time, including the growth in light truck and SUV registrations relative to passenger cars since the 1990s.

Fuel consumption and tax revenues—highway fuel consumption by fuel type (gasoline, diesel, gasohol, alternative fuels) and motor fuel tax revenues collected by state governments and the federal government. The federal motor fuel tax is levied at the point of fuel production or import and flows into the Highway Trust Fund. The fuel consumption tables show the direct connection between total highway VMT, fleet fuel efficiency, and the tax revenue base that funds highway programs.

Motor carrier data—registered commercial vehicles, commercial vehicle registrations by weight class, and International Registration Plan (IRP) apportioned registrations for trucks operating across multiple states.

The Federal-Aid Highway Program Structure

FHWA administers highway funding through a complex set of programs defined in federal surface transportation authorization legislation. The current framework derives from the Infrastructure Investment and Jobs Act (IIJA) of 2021, which authorized $110 billion for surface transportation over five years, the largest such authorization in history.

The Interstate Highway System—47,856 miles of limited-access, divided, controlled-access highway built to AASHTO geometric design standards— remains the backbone of the federal system. Interstate maintenance is primarily funded through the National Highway Performance Program (NHPP), a formula program distributing funds to states based on their share of NHS lane-miles, VMT, and estimated costs to maintain system performance. The Interstate is 100 percent paved, has no at-grade crossings, and generates AADT values that can exceed 200,000 vehicles per day in major urban corridors.

The National Highway System—161,000 miles including the Interstate plus other routes designated under 23 USC § 103—is the primary federal investment focus for both pavement and bridge conditions. NHS roads carry approximately 55 percent of all VMT despite constituting less than 5 percent of total public road miles, illustrating the extreme concentration of highway use on a relatively small network.

The Federal Lands Highway program covers roads on National Park Service lands, National Forest roads, Bureau of Land Management roads, and Indian Reservation roads where no state DOT has jurisdiction. These roads are surveyed and reported to FHWA separately from the state DOT-managed HPMS data, and their condition data feeds the broader condition assessment.

Freight Data: FAF and VIUS

FHWA's freight data programs provide the commodity-flow and vehicle-use context that HPMS traffic volumes alone cannot supply.

Freight Analysis Framework

The Freight Analysis FrameworkFAF—is a joint program between FHWA and the Bureau of Transportation Statistics that synthesizes freight flow data by mode, commodity, origin, and destination into a single intermodal freight database. FAF is based primarily on the Bureau of the Census Commodity Flow Survey (CFS), supplemented by administrative records from FHWA, BTS, and industry sources. FAF data covers shipments by truck, rail, water, air, pipeline, and multiple modes, expressed in tons and ton-miles, by 2-digit SCTG (Standard Classification of Transported Goods) commodity code and by FAF zone (roughly metropolitan statistical areas and state residuals).

FAF is the primary data source for the national freight flow maps that FHWA and BTS produce showing the volume of truck traffic on each Interstate segment. When a freight study states that I-35 carries $X billion in freight per year, or that the Port of Los Angeles feeds Y million tons annually into the inland highway network, FAF is almost certainly the source. The data is used in the FHWA Freight Story of the Year reports, state freight plans required under FAST Act and IIJA, and metropolitan planning organization freight studies.

Border crossing freight flows are reported separately through the BTS Border Crossing Entry Data, which records truck, rail, and pipeline crossings at every US land port of entry by mode and commodity, derived from CBP administrative records. FHWA uses border crossing data in FAF to characterize cross-border freight flows to and from Mexico and Canada.

Vehicle Inventory and Use Survey

The Vehicle Inventory and Use SurveyVIUS—is a Census Bureau survey sponsored by FHWA that collects detailed characteristics of the commercial truck fleet: truck body type, configuration, fuel type, engine displacement, payload capacity, miles operated, number of weeks operated, primary range of operation (local, short-haul, long-haul), commodities carried, and whether the truck operates for hire or private carriage. VIUS was conducted in 1963, 1967, 1972, 1977, 1982, 1987, 1992, 1997, 2002, 2021—with a 19-year gap between 2002 and 2021 that substantially degraded understanding of how the truck fleet had evolved through the period of ELD adoption, fuel efficiency improvement, and fleet electrification planning. The 2021 VIUS was the first to collect data on hybrid and electric truck adoption and to include app-based delivery vehicles. VIUS is the primary federal source for truck fuel efficiency and VMT distribution by vehicle class, inputs to EPA's greenhouse gas inventory for the transportation sector.

The Highway Trust Fund: A Structural Solvency Problem

The Highway Trust Fund—HTF—is the federal account that funds nearly all FHWA highway programs. It is financed primarily by the federal motor fuel tax: $0.184 per gallon on gasoline and $0.244 per gallon on diesel. Those rates have been frozen since October 1, 1993—the last time Congress raised the federal gas tax. In real purchasing power, the gas tax is worth less than half its 1993 value. Meanwhile, the infrastructure it funds costs substantially more per lane-mile to build and maintain than it did in 1993.

The arithmetic is straightforward and increasingly severe. Fleet average fuel economy has improved substantially since 1993, meaning each vehicle-mile traveled now generates less tax revenue than it did when the rate was set. Electric vehicles pay no gas tax at all. The growth of hybrid vehicles reduces per-mile tax revenue. The result is that VMT has grown, road system investment needs have grown, but the revenue per mile has fallen in real terms every year since 1993.

FHWA's Highway Statistics tables track the gap directly: the fuel consumption tables show total gallons consumed (declining per-VMT as fleet efficiency improves) while the tax revenue tables show flat or declining nominal revenue relative to the highway investment baseline. The Congressional Budget Office has projected the HTF reaching insolvency—unable to pay current-law obligations—multiple times since 2008; each time, Congress has transferred general fund revenue into the trust fund to prevent insolvency rather than raising the tax rate. The IIJA 2021 transferred $118 billion from the general fund into the HTF to sustain funding through 2026.

The IIJA also appropriated $7.5 billion for EV charging infrastructure through the National Electric Vehicle Infrastructure (NEVI) formula program, which allocates funds to states to build a national network of EV fast chargers at 50-mile intervals along designated Alternative Fuel Corridors. FHWA administers NEVI and publishes state NEVI plans and deployment progress data. The funding is an acknowledgment that the shift to EVs—which will further erode gas tax revenues—requires parallel infrastructure investment to remain politically viable.

The American Society of Civil Engineers' Infrastructure Report Card, which ASCE publishes every four years, awarded American roads a grade of D in its 2021 edition, citing the condition and performance data from FHWA's Conditions and Performance report. The ASCE Report Card grades are based directly on HPMS and NBI data. The D grade reflects the share of road miles in poor condition, the backlog of bridge rehabilitation needs, and the projected investment shortfall relative to what FHWA estimates is needed to maintain current conditions over the next decade.

Data Quality: The State-Reporting Consistency Problem

HPMS data is state-reported, which means that 50 different state DOTs, with different pavement management systems, different measurement equipment, and different organizational priorities, produce the national dataset. FHWA applies quality checks—consistency tests, outlier detection, and comparison against prior-year data—but cannot fully eliminate the between-state variation in how condition metrics are measured and reported.

The IRI measurement problem is the most documented. While the profiling equipment is standardized and FHWA certifies profilers, states vary in how frequently they measure each road segment (some measure every segment annually, others on multi-year cycles), in how they handle measuring roads at speed (some roads require lower-speed measurement that affects IRI values), and in how they aggregate multiple runs on the same segment. These differences mean that a direct state-to-state comparison of “percent of NHS in poor condition” reflects both actual condition differences and measurement methodology differences.

NBI data has similar issues at the inspector level. Two certified inspectors examining the same bridge component may assign different condition ratings because the 0–9 scale involves professional judgment at the margins. FHWA's FHWA's Quality Assurance Reviews—in which federal reviewers conduct independent inspections on a sample of state-inspected bridges and compare ratings—show consistent within-state patterns but meaningful between-state differences in rating tendencies. States that systematically rate more conservatively will show higher shares of structurally deficient bridges than states with comparable actual conditions but less conservative rating cultures.

FHWA acknowledges these limitations in the HPMS Field Manual and in the methodology section of the Conditions and Performance report. For longitudinal analysis within a single state, HPMS and NBI data are generally reliable. For cross-state comparisons, the between-state consistency limitations are a significant analytical constraint that should be disclosed in any research or policy analysis using the data.

Python: Downloading NBI Bridge Data and Visualizing Structurally Deficient Bridges

The following script downloads the NBI flat file for Texas from FHWA, identifies structurally deficient bridges using the FHWA condition rating threshold, and plots the distribution of structurally deficient bridges by sufficiency rating band.

import requests
import pandas as pd
import io
import matplotlib.pyplot as plt
import matplotlib.ticker as mticker

# FHWA publishes the National Bridge Inventory (NBI) as annual flat-file downloads.
# Download the state-level CSV from:
#   https://www.fhwa.dot.gov/bridge/nbi/ascii.cfm
# File naming convention: [STATE_CODE]23.txt where 23 = 2023 data year.
# Column layout documented in the NBI Coding Guide (FHWA publication SA-95-038).

# For this example we download the Texas NBI flat file directly.
# Replace STATE_CODE with the two-digit FIPS code for your state.
STATE_CODE = "48"   # Texas
YEAR = "23"         # 2023 data
NBI_URL = (
    "https://www.fhwa.dot.gov/bridge/nbi/"
    + YEAR + "/" + STATE_CODE + YEAR + ".txt"
)

resp = requests.get(NBI_URL, timeout=180)
resp.raise_for_status()

# NBI is fixed-width format; the FHWA also provides a CSV variant at the same location
# (some years use .txt, some .csv). Parse as CSV with no header; assign column names
# for the fields we need from the NBI Coding Guide record layout.

# Full record is 767 characters wide. We read only named columns via usecols after
# loading to avoid the full layout specification.
raw = pd.read_csv(
    io.StringIO(resp.text),
    header=None,
    dtype=str,
    low_memory=False,
)

# NBI column positions (0-indexed) for key fields from the FHWA Coding Guide:
# Item 1  (col 0):   State Code
# Item 5A (col 4):   Structure Number (bridge ID within state)
# Item 27 (col 26):  Year Built
# Item 67 (col 66):  Structure Length (ft, 5 chars)
# Item 58 (col 57):  Deck Condition Rating (0-9 scale, N=not applicable)
# Item 59 (col 58):  Superstructure Condition Rating
# Item 60 (col 59):  Substructure Condition Rating
# Item 67 (col 66):  Total Length
# Item 70 (col 69):  Bridge Posting (load restriction code)
# Item 67a (col 66): Sufficiency Rating (col 113 in full layout, 2 decimal float)

# Because column positions vary slightly across NBI editions, we use the known
# CSV export from the FHWA ASCII download which includes a header row.
# If header is present, read again:
resp2 = requests.get(NBI_URL, timeout=180)
lines = resp2.text.splitlines()
has_header = not lines[0].strip()[0].isdigit()

nbi = pd.read_csv(
    io.StringIO(resp2.text),
    header=0 if has_header else None,
    dtype=str,
    low_memory=False,
)

# Standardise column names to NBI item numbers (works for headerless files too).
# Map by position for the fields we need:
COLS = {
    0: "STATE_CODE",
    4: "STRUCTURE_NUMBER",
    26: "YEAR_BUILT",
    57: "DECK_COND",
    58: "SUPERSTRUCTURE_COND",
    59: "SUBSTRUCTURE_COND",
    66: "STRUCTURE_LENGTH",
    113: "SUFFICIENCY_RATING",
    67: "BRIDGE_POSTING",
}

if not has_header:
    # Rename columns by position index
    rename_map = {i: name for i, name in COLS.items() if i < len(nbi.columns)}
    nbi = nbi.rename(columns=rename_map)

# Convert numeric fields
nbi["SUFFICIENCY_RATING"] = pd.to_numeric(nbi.get("SUFFICIENCY_RATING"), errors="coerce")
nbi["DECK_COND"]          = pd.to_numeric(nbi.get("DECK_COND"),          errors="coerce")
nbi["SUPERSTRUCTURE_COND"] = pd.to_numeric(nbi.get("SUPERSTRUCTURE_COND"), errors="coerce")
nbi["SUBSTRUCTURE_COND"]  = pd.to_numeric(nbi.get("SUBSTRUCTURE_COND"),  errors="coerce")
nbi["YEAR_BUILT"]         = pd.to_numeric(nbi.get("YEAR_BUILT"),         errors="coerce")

# FHWA definition: a bridge is Structurally Deficient (SD) when
# ANY of its three condition ratings (deck, superstructure, substructure)
# is rated 4 or lower on the 0-9 scale.
nbi["STRUCTURALLY_DEFICIENT"] = (
    (nbi["DECK_COND"] <= 4) |
    (nbi["SUPERSTRUCTURE_COND"] <= 4) |
    (nbi["SUBSTRUCTURE_COND"] <= 4)
)

sd_bridges = nbi[nbi["STRUCTURALLY_DEFICIENT"]].copy()

total = len(nbi.dropna(subset=["DECK_COND"]))
sd_count = len(sd_bridges)
sd_pct = round(sd_count / total * 100, 1)

print("Total bridges in dataset: " + str(total))
print("Structurally deficient: " + str(sd_count) + " (" + str(sd_pct) + "%)")

# Bin sufficiency ratings for SD bridges into ranges 0-24, 25-49, 50-74, 75-100
bins   = [0, 25, 50, 75, 101]
labels = ["0-24 (Critical)", "25-49 (Poor)", "50-74 (Fair)", "75-100 (Marginal SD)"]

sd_bridges["RATING_BIN"] = pd.cut(
    sd_bridges["SUFFICIENCY_RATING"].dropna(),
    bins=bins,
    labels=labels,
    right=False,
    include_lowest=True,
)

bin_counts = sd_bridges["RATING_BIN"].value_counts().reindex(labels, fill_value=0)

# Plot distribution of SD bridges by sufficiency rating band
fig, ax = plt.subplots(figsize=(8, 5))
colors = ["#d62728", "#ff7f0e", "#ffbb78", "#aec7e8"]
ax.bar(labels, bin_counts.values, color=colors, edgecolor="white", linewidth=0.5)

ax.set_title("Structurally Deficient Bridges by Sufficiency Rating Band
(Texas NBI, 2023)", fontsize=12)
ax.set_xlabel("Sufficiency Rating Range", fontsize=10)
ax.set_ylabel("Bridge Count", fontsize=10)
ax.yaxis.set_major_formatter(mticker.FuncFormatter(lambda x, _: str(int(x))))

for rect, val in zip(ax.patches, bin_counts.values):
    ax.text(
        rect.get_x() + rect.get_width() / 2,
        rect.get_height() + max(bin_counts.values) * 0.01,
        str(val),
        ha="center", va="bottom", fontsize=9,
    )

plt.tight_layout()
plt.savefig("sd_bridges_tx_sufficiency.png", dpi=150)
plt.show()

print("Chart saved to sd_bridges_tx_sufficiency.png")

A few implementation notes. The NBI flat file format has been stable in its primary structure for decades but varies in whether FHWA publishes a header row in a given year's release; the script handles both cases. Column position 113 for the Sufficiency Rating is correct for the standard 767-character NBI record layout; if FHWA's CSV export reorders columns, the script's column-renaming approach will need adjustment against the current FHWA Coding Guide. The structurally deficient determination requires all three condition ratings to be present; bridges rated N (not applicable) on a component—typically culverts and certain specialized structures—should be handled separately. FHWA publishes pre-computed SD and sufficiency rating flags in the NBI download file for convenience, but computing them from component ratings verifies the methodology.

Data Access

FHWA provides access to its major datasets through several channels:

National Bridge Inventory—annual flat-file downloads at fhwa.dot.gov/bridge/nbi/ascii.cfm. State-level files and a national combined file are available in fixed-width and delimited formats. The NBI Coding Guide documenting the full 116-item record layout is available at the same location. Data is updated annually, typically released in the spring following the reference year.

HPMS data—HPMS segment-level data is available to state DOTs and metropolitan planning organizations through the HPMS submission system. National summary tables derived from HPMS—condition percentages, lane-mile totals, pavement type distributions—are published in the Conditions and Performance report and in FHWA's annual data tables at fhwa.dot.gov/policyinformation/statistics.cfm. Segment-level HPMS data for research purposes requires a data use agreement with FHWA.

Highway Statistics tables—all annual tables in the Highway Statistics series are available online at the FHWA Policy Information page, organized by year and table number. Tables cover the full data series going back to 1945 for some metrics. The data is provided as spreadsheet files suitable for direct analysis.

Traffic Volume Trends—the monthly VMT estimate publication is available at the FHWA Office of Highway Policy Information page, updated with approximately a two-month lag. Monthly VMT data disaggregated by road type (urban/rural, Interstate/other) is available as downloadable tables.

Freight Analysis Framework—FAF5 data (the current edition, based on the 2017 CFS with traffic assignment updates) is available for download at ops.fhwa.dot.gov/freight/freight_analysis/faf, including OD matrices by commodity and mode, network assignment data, and visualization tools.

Related writing

For NHTSA's Fatality Analysis Reporting System—how FARS structures 50 years of crash death records, what the accident, vehicle, and person files contain, and how to compute pedestrian fatality rates by state from raw NBI data: NHTSA FARS: The Federal Census of Every US Traffic Fatality Since 1975 →

For FMCSA carrier safety data—how the SAFER registry and SMS BASIC percentile system cover 550,000 trucking companies, what out-of-service rates reveal, and how freight brokers and insurers use the data: FMCSA Carrier Safety Ratings: The Federal Database Behind 550,000 Trucking Companies →

For BLS occupational injury data—how the Survey of Occupational Injuries and Illnesses measures workplace injury rates, what the Total Recordable Incident Rate formula means, and how construction and transportation industries compare: BLS Occupational Injuries: The SOII Dataset Behind 2.8 Million Annual Workplace Injuries →