Command Palette

Search for a command to run...

Назад к скиллам
скилл № 54270

nzta-crash-data-nz

Query NZTA/Waka Kotahi Crash Analysis System public crash statistics from the no-key ArcGIS FeatureServer and data.govt.nz CKAN mirror. Use when the task…

БесплатноЗапускает вложенные скрипты
thecolab-aiот thecolab-ai★ 41 звезда на GitHub

Установить nzta-crash-data-nz в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

NZTA Crash Data NZ

Overview

Read-only CLI over the NZTA/Waka Kotahi Crash Analysis System (CAS) public open-data layer. It uses the no-login ArcGIS FeatureServer for bounded, paginated queries and data.govt.nz CKAN for source discovery.

Use it for questions about New Zealand road deaths, fatal crashes, serious or minor injury crashes, regional/TLA crash records, yearly road tolls, and public crash indicator fields such as weather, light, road surface, vehicle types, roadside objects, and roadworks.

Do not use it for live state-highway incidents, closures, or roadworks; use nz-road-closures for current operational road status. The public CAS layer does not expose exact crash dates or detailed driver contributing-factor codes such as alcohol/drugs, speed as a cause, or fatigue.

Commands

Run commands from this skill directory with python3 scripts/cli.py .... Every data command accepts --json.

Command Purpose Key flags
datasets Check ArcGIS FeatureServer and CKAN mirror reachability --json
crashes Return bounded crash records with pagination --region, --from, --to, --severity, --limit, --bbox, --near, --radius, --format, --json
road-toll Sum fatalities and fatal crashes for a calendar year --year, --json
factors Aggregate public CAS indicator fields --region, --from, --to, --top, --json

crashes accepts --severity fatal|serious|minor|non-injury. --region matches either region or tlaName as a substring, so Auckland, Wellington, and Selwyn are valid examples.

The public layer exposes crashYear and crashFinancialYear, not exact crash dates. --from and --to are accepted as YYYY-MM-DD, but the CLI applies them as calendar-year bounds and includes a date_precision note in outputs. If no date window is supplied, crashes and factors default to a bounded recent two-calendar-year window.

Spatial crashes queries use WGS84 --bbox minLon,minLat,maxLon,maxLat, or --near lon,lat --radius metres (default 500 m; maximum 10 km). Both the count and records are filtered server-side. --format geojson emits a WGS84 FeatureCollection; --json keeps the existing record envelope. Spatial and GeoJSON queries require ArcGIS and report failures without CSV fallback. JSON outputs include publisher, source URL, licence and UTC retrieval time; spatial outputs also report the mirror edit time as latest_data.

Examples

# Confirm source endpoints and mirror resources
python3 scripts/cli.py datasets --json

# Fatal crash records in Auckland for 2025
python3 scripts/cli.py crashes --region Auckland --from 2025-01-01 --to 2025-12-31 --severity fatal --limit 10

# Dominion Road corridor, all 2025 crashes, as WGS84 points
python3 scripts/cli.py crashes --bbox 174.735,-36.905,174.745,-36.875 --from 2025-01-01 --to 2025-12-31 --limit 100 --format geojson

# Crashes within 500 m of a corridor point
python3 scripts/cli.py crashes --near 174.740,-36.890 --radius 500 --from 2025-01-01 --to 2025-12-31 --json

# Machine-readable current-year road toll
python3 scripts/cli.py road-toll --year 2026 --json

# Public indicator aggregation for Wellington over a bounded window
python3 scripts/cli.py factors --region Wellington --from 2024-01-01 --to 2025-12-31 --json

Notes

  • CAS is updated monthly. Fatal crashes are usually available within about 1 working day; serious and minor injury crashes may lag by about 4 weeks, so recent DSI/minor counts can be incomplete.
  • The ArcGIS layer page size is capped by the service; crashes uses resultOffset/resultRecordCount and enforces a local --limit cap to avoid unbounded full-history downloads.
  • --source auto uses ArcGIS first and falls back to a capped CSV mirror scan if ArcGIS is unavailable. CSV fallback is intentionally capped by --scan-cap and may be partial for broad/current queries.
  • Endpoint details, field caveats, and pagination notes are in references/api-notes.md.
  • The reusable CLI and smoke test live in scripts/.

Resources

  • API/source notes: references/api-notes.md
  • CLI: scripts/cli.py
  • Smoke test: scripts/smoke_test.py
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

  • references/api-notes.md
  • references/source-notes.md
  • scripts/cli.py
  • scripts/smoke_test.py
  • scripts/spatial_contract.py
  • scripts/test_contract.py

FAQ

Что делает скилл nzta-crash-data-nz?

Query NZTA/Waka Kotahi Crash Analysis System public crash statistics from the no-key ArcGIS FeatureServer and data.govt.nz CKAN mirror. Use when the task involves New Zealand road deaths, serious injuries, crash severity by region or TLA, yearly road-toll counts, or public CAS crash indicator fields such as weather, light, road surface, vehicle type, roadside objects, and roadworks.

Как установить скилл nzta-crash-data-nz?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл nzta-crash-data-nz запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить nzta-crash-data-nz с