Fra Rail Safety

v0.2.1
io.github.pipeworx-io/fra-rail-safety Checked 1 day ago Published 1 month ago

FRA Rail Safety — US railroad accidents and highway-rail grade crossing incidents reported to the…

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

rail_accidents

US train accidents and derailments reported to the Federal Railroad Administration (FRA Form 54, 1975–present). Returns individual rail equipment accident reports — derailments, train collisions, obstruction and other impacts — with date, reporting railroad (e.g. UP, BNSF, CSX, NS, Amtrak), accident type, FRA primary cause code and description (e.g. H702 "Switch improperly lined", T110 "Wide gage"), state and county, train speed, hazmat cars released, people evacuated, killed, injured and damage cost. Newest first. Filter by year, state, railroad, cause code or accident type. Use for "tr…

ParameterTypeDescription
accident_typestringAccident type text, matched as a substring: "Derailment", "Head on collision", "Rear end collision", "Side collision", "Raking collision", "Hwy-rail crossing", "Obstruction", "Fire/violent rupture", "…
cause_codestringFRA accident cause code or its prefix: "H702" exactly, or "T" for all track causes, "H" human factors, "E" equipment, "S" signal, "M" miscellaneous.
limitnumberMax reports to return (default 25, max 200).
min_damage_usdnumberOnly accidents with total reported damage at or above this amount in US dollars.
railroadstringReporting railroad: a reporting-mark code ("UP", "BNSF", "CSX", "NS", "ATK") or part of its name ("Norfolk Southern").
statestringUS state as a two-letter code or full name, e.g. "OH" or "Ohio".
yearnumberCalendar year of the accident (1975–present), e.g. 2023.

crossing_incidents

Highway-rail grade crossing collisions in the US — trains striking cars, trucks, pedestrians and cyclists at railroad crossings (FRA Form 57, 1975–present). Each incident carries the date, railroad, USDOT crossing id, state, county and city, road name, road user type and action (e.g. drove around gate, stopped on crossing), vehicle and train speed, crossing warning devices, weather, killed and injured. Newest first. Filter by state, county, city, year, railroad or a specific crossing id. Use for "railroad crossing accidents in Harris County Texas", "pedestrians hit by trains in California…

ParameterTypeDescription
citystringCity name, matched as a substring, e.g. "Houston".
countystringCounty name, e.g. "Harris" (matched case-insensitively, "County" suffix optional).
crossing_idstringUSDOT grade crossing inventory number, e.g. "812329E".
fatal_onlybooleanOnly incidents with at least one person killed.
highway_userstringRoad user type, matched as a substring: "Auto", "Truck", "Truck-trailer", "Pick-up truck", "Pedestrian", "Bus", "Motorcycle", "Van", "Other motor vehicle".
limitnumberMax incidents to return (default 25, max 200).
railroadstringRailroad reporting-mark code ("UP", "BNSF") or part of its name.
statestringUS state as a two-letter code or full name, e.g. "TX" or "Texas".
yearnumberCalendar year of the incident (1975–present).

rail_accident_summary

Counts and totals of FRA-reported US railroad accidents or grade crossing incidents, grouped by railroad, cause, accident type, state, year or road user. Returns per-group incident count, killed, injured and (for train accidents) damage cost. Use for "which railroads had the most derailments in 2023", "top causes of train accidents in Texas", "crossing deaths per year since 2015", "rail accident trend by year".

ParameterTypeDescription
group_by *stringGrouping. "cause" and "accident_type" apply to accidents; "highway_user" to crossings; the rest to both.
datasetstring"accidents" = rail equipment accidents (Form 54, default); "crossings" = highway-rail grade crossing incidents (Form 57).
from_yearnumberRestrict to this year and later (use with group_by "year" for a trend).
limitnumberMax groups (default 20, max 100).
railroadstringRestrict to one railroad (reporting-mark code or name substring).
statestringRestrict to one US state (code or name).
yearnumberRestrict to one calendar year.