capture_map_screenshot
Take a PNG of the map exactly as the user sees it, so you can look at the heat field, the plotted crashes or a coloured route yourself. Returns the picture plus the same numbers get_map_view reports. The map canvas…
maxWidth: integer?
check_route
Check a drive end to end: routes A to B, counts every death within a quarter mile of the road, colours the route by how deadly each stretch has been, and returns the worst stretches. This is the tool for "is this…
from: string, to: string
clear_selection
Drop the pin, the isolated road and the route check and go back to the whole country. Use it before starting a different question.
recenter: boolean?
find_place
Look up candidate US places for a search string without touching the map. Use it to disambiguate before dropping a pin or checking a route.
query: string, limit: integer?
get_crash_record
Pull the full FARS case file for one crash: date and time, conditions, every vehicle with speed and outcome, every person with age, restraint and injury. Use case ids from list_crashes_in_view.
state: string, year: integer, caseId: integer
get_map_view
Read the current state of the crash map: where it is centred, the zoom, the active year range, the fatal-crash toll inside the current view, and any pin, isolated road or checked route. Call this first to know what…
list_crashes_in_view
List the individual fatal crashes currently plotted, deadliest first, with the case id needed by get_crash_record. Needs the map zoomed in far enough for dots to appear; if a pin is set the list is limited to its ring.
limit: integer?
search_roads
Search the national road index by name and get each road's full 2001-2024 toll across every state it runs through. Use it to find the exact road name before isolating one.
query: string, limit: integer?
select_road
Isolate one road nationally: the map shows only its crashes, coast to coast, and reports its toll for the active year range. Takes a name from search_roads, or a colloquial one like "hwy 6", which resolves to the…
name: string
set_basemap
Switch the basemap. "dark" is the default CARTO Dark Matter, best for reading the heat field; "street" shows road names and buildings, better for a screenshot of one neighbourhood.
style: string
set_map_view
Move the map to a place, or to explicit coordinates and zoom. Zoom past level 9 to make individual crashes appear; the whole lower 48 sits near zoom 4.
place: string?, lat: number?, lng: number?, zoom: number?
set_pin
Drop the pin on a place or coordinate and scope the map to a radius around it, so every count becomes "within N miles of here". This is the tool for "how bad is it around me / around this address".
place: string?, lat: number?, lng: number?, radiusMiles: number?
set_year_range
Limit the map to a range of crash years. FARS coverage on this map runs 2001 to 2024. Everything else — the heat field, the road toll, the route check — re-counts for the chosen years.
from: integer, to: integer