TRAINS PR · Puerto RicoES

Where a train would make sense in Puerto Rico

An open analysis of routes, costs, travel time and hurricanes, built on Census data for all 78 municipalities.

Coastal LineTren Urbano + CondadoNorth BranchDashed = phases 2–3
Phase 1 investment$7.6–16.3Bmedian $11.1 B · 25.7 miEstimate
Pays off (probability)21%with paid parking and a pass · express bus 85 %▼ 63 pts
Trips where rail wins5→12of 12base design → with upgrades▲ 16 min/trip with upgrades
Hours lost in traffic68h/yrper driver, San Juan area▲ 19 h above US
After a hurricane3daysvs. 91 on the grid alone▼ 88 days

The coast and Hato Rey first; the rest only if the data asks for it

Interactive explorer (in Spanish): 10 sections with zoomable maps · tap a tab

—

La red recomendada

Línea gruesa = fase 1 o ya existe. Punteada = después, solo si la fase anterior cumple su meta.

Qué incluye la fase 1

ComponentekmInversión (M$, PR realista)Pasajeros/díaPor qué

Orden de operaciones: cada fase tiene una meta para seguir o parar

FaseQuéPuerta para seguir

An express bus pays off 4 times in 5; rail, 1 in 5

Model phase 1 (San Juan–Carolina and Bayamón–Dorado) · 1,200 simulations with historical overruns · 2026 USD

OptionInvestment (median)Riders/day with packagePays off as isPays off with package
Express bus (HOT lane)$125 M12,6711.8 %85 %
BRT (dedicated lane)$633 M14,7560.1 %58 %
Electric rail$3,471 M33,4470.0 %21 %

Source: TRAINS PR model (Monte Carlo) · package = paid parking, $30 monthly pass and development next to stations

Money and costs

Cost$7.6–16.3 BPhase 1 capital · median $11.1 B
Benefit / year$136–1,091 MTime, fuel and crashes · depends on policy
PaybackB/C 0.18–1.43Model segments: pays off in 21 % of simulations
Who paysFTA 40 % + bonds 60 %Annual gap $0.40–0.55 B = 3–4 % of the General Fund
ScenarioWhat it includesAnnual costCash inValue to peopleB/C
LowFare only ($1.50)$556 M$9 M$136 M0.18
Base+ paid parking and a $30 monthly pass$556 M$29 M$558 M0.73
High+ congestion charge, station-area tax increment, development, tolls and solar$547 M$149 M$1,091 M1.43

2026 USD

How I built it

  • The problem: San Juan-area drivers lose 68 h a year in traffic (INRIX 2025), and Tren Urbano reached 24 % of its forecast. I wanted to see where rail makes sense and what it really costs.
  • The data: Census commuting flows for all 78 municipalities, plus FTA, USDOT, NREL and NHC. Every source and its license is listed below.
  • What the AI did: Claude wrote most of the code and found sources; I set the questions, the coastal line and the rules, and decided what gets published.
DetailsThe model, how I validated it, what failed and what comes next

The problem

  • In Puerto Rico a driver loses about 50 hours a year in traffic; in Dorado, more than 100. Every few years someone proposes a train.
  • The last time one was built, Tren Urbano, the forecast was 114,000 daily trips; in 2007 it carried 24 % of that, and in 2025 it carries about 21,000.
  • I wanted to answer three questions with data rather than enthusiasm: where a train would make sense, what it would really cost, and what would have to change for it to pay off.

The data

  • The core is the Census commuting-flows table (ACS 2016–2020): how many people live in each of the 78 municipalities and work in each other one.
  • On top of that I added commute times from ACS 2020–2024, 2020 Census block population to count who lives within a 10-minute walk of each station, FHWA traffic volumes, real Tren Urbano costs and ridership from the FTA, the 2026 USDOT benefit-cost guidance, NREL's PR100 study for the price of solar power, and hurricane data from the NHC.
  • Maps use USGS tiles, which are public domain, and OpenStreetMap. Every source is listed below with its license.

The model

  • It has four parts, written in Python. A road network between municipalities with congestion: more cars, slower trips. A mode-choice model in which each person compares car against train on time, cost and parking.
  • An optimizer that adds track one segment at a time according to the chosen objective: time saved, people connected, jobs, or cost per rider, among others.
  • And a Monte Carlo simulation with 1,200 runs that mixes uncertainty in costs and ridership.
  • Separately, I built a physical train model (acceleration, 45-second stops, curves) to compute door-to-door times, and a simulation of how power comes back after a hurricane.

Validation

  • I did not trust my own forecasts. I calibrated car times against what people report in the ACS: in the metro area the model lands within about a minute.
  • I ran the model on Tren Urbano as it exists, and it predicts fewer riders than it carries today, because it only counts people who leave the car for a trip between towns; I prefer that error to the opposite one.
  • 42 times the estimate and carry fewer people than forecast. The hurricane simulation reproduces what happened: Tren Urbano was closed 86 days after Maria and the model gives 91.

What the AI did

  • I worked with Claude, by Anthropic. Claude wrote most of the code (the Python model, the d3 charts and this site), searched for and summarized sources, and ran red-team reviews against the analysis itself.
  • I chose the questions, proposed the El Morro–SJU coastal line, set the rules (US units, service from 6 am to 11 pm, treating the airport separately), challenged results that did not add up, and decided what gets published.
  • The numbers come from the models, not from the AI's opinion: each one traces back to a data source and an assumption.

What failed

  • Plenty. The first version overstated peak-hour delays in interior towns and had to be recalibrated.
  • In the base design the train beat the car in only 5 of 12 test trips; that forced a redesign (faster trains, no transfer at Condado, feeder buses) until it won all 12.
  • Two Old San Juan stations were misplaced at first. I could not get station-level ridership from ATI, so that part is estimated. Routes are drawn over coordinates, not exact track geometry.
  • And the most important result is uncomfortable: rail alone does not pay off. It needs policy changes, and even with them it pays off in one simulation out of five.

What comes next

  • Ask ATI and the Highway Authority for ridership by station and route to validate further, and bring these numbers to the FTA's public process.
Sources and licenses13 · Census data through ACS 2020–2024 · version of 2026-10-23
SourceWhat I useLicenseCommercial use?
US Census: ACS 2016–2020 (commuting flows), ACS 2020–2024, 2020 Census blocksCommutes, travel times, population near stationsPublic domain (US government)Yes
FHWA, Highway Performance Monitoring SystemRoad volumes and capacityPublic domainYes
FTA: National Transit Database 2024 and Predicted and Actual Impacts of New Starts (2007)Tren Urbano costs, ridership and forecastPublic domainYes
USDOT, Benefit-Cost Analysis Guidance 2026Value of time, crashes and emissionsPublic domainYes
NREL, PR100Solar and battery costsPublic domain (DOE)Yes
NOAA / National Hurricane CenterHurricane tracks and damagePublic domainYes
Flyvbjerg et al. (2007); TRB / ACRPReference class for overruns and demandCopyrighted; figures cited onlyCitation
INRIX Global Traffic ScorecardTraffic contextProprietary; published figures cited onlyCitation
LUMA, current tariffElectricity price (33.86¢/kWh)Public documentCitation
USGS The National Map (imagery and topo)Explorer base mapsPublic domainYes
OpenStreetMapExplorer street mapODbL data with attribution; OSMF tiles for light use onlyData yes; tiles: switch provider if traffic or ads grow
Natural EarthIsland outlinePublic domainYes
d3.js · Barlow Condensed · IBM PlexCharts and typeISC · SIL Open Font LicenseYes

Notice: TRAINS PR is an independent analysis by an engineering student, not an official government study or an engineering service. The numbers are model estimates with explicit assumptions: use them to ask better questions, not as a final design.