# nehodove-useky: the police's accident blackspots in okres Senec

One record per accident blackspot („nehodový úsek“) the police list for územný okres Senec (`5108`) in a year: a
stretch of a road's kilometre chainage with 5 or more accidents per km. 4 stretches, 2019 to 30 Sep 2026: two in 2019
(D1 km 14,5–15,5, I/63 km 16,0–17,5) and two in 2025 (D1 km 15,0–16,0 and 17,0–18,25); none in 2020 to 2024 or so far
in 2026. Built on 26 Oct 2026 by `scripts/fetch_bezpecnost.py`, which also writes `bezpecnost` and `nehody-cesty`.
Each record lists its accidents by their `nehody-cesty` record_id, and each of those accidents carries the stretch as
`blackspot_id`.

## Rebuild

```bash
python scripts/fetch_bezpecnost.py            # writes bezpecnost.*, nehody-cesty.* and nehodove-useky.json + .csv
```

Raw pages are cached in `raw/bezpecnost/isdn/` (not committed) and re-used unless `--refresh` is given.

## Files

| File | Content |
|---|---|
| `nehodove-useky.json` | a list of records, one per stretch and year, by year |
| `nehodove-useky.csv` | the same records, one row each, same columns (`accident_ids` joined with spaces). UTF-8, CRLF, empty = null |

## Source

| What | URL |
|---|---|
| Nehodové lokality – nehodové úseky v kilometrovom systéme s hustotou 5 DN/km, okres Senec, from 1 January | `https://www.minv.sk/lnisdn/statistika/<folder>/statistika/mesacna/nlkur/nlkur-5108.html` |
| The folder's index (a year without a stretch links no such page) | `https://www.minv.sk/lnisdn/statistika/<folder>/statistika/index-public.html` |
| Folders by month | `https://www.minv.sk/?statistika-1&rok=<Y>&mesiac=<M>`; index: https://www.minv.sk/?kompletna-statistika |

Each full year comes from its December folder, the current year from the latest published month.

## Fields

- `record_id`: year, road and the stretch's start and end in metres (`2025-D1-15000-16000`). Stable.
- `year`, `report_period` (the page's "Za obdobie"), `partial_year` (true until the year's December page).
- `road` as printed (`D1`, `63`), `road_class` (`D`, `R`, `I`, `II`).
- `km_from`, `km_to`: the stretch on the road's own chainage, from the metres printed. `length_m`.
- `accidents_in_stretch`: the page's "počet DN v lokalite", the accidents in the whole stretch, in every okres it
  covers; `okresy`: those okresy as printed („Bratislava - 3, Senec“).
- `accidents`, `killed`, `seriously_injured`, `lightly_injured`, `material_damage_eur`: the page's totals ("Súčet")
  for the stretch's accidents in okres Senec. `material_damage_eur` = "Škoda v 10€" × 10.
- `accident_ids`: the eKDN numbers of those accidents as the page lists them; they are `record_id`s of `nehody-cesty`.
- `source_url`, `last_update` (the day the record last changed).

## Method and checks

- The stretches are the police's own: a density of 5 or more accidents per km of chainage in the period. Nothing here
  is computed from `nehody-cesty`.
- The page lists the stretch's accidents in okres Senec with their kilometre. The script checks that their number
  equals the page's total; on 26 Oct 2026 each stretch's deaths, injuries and damage also equalled the sum of its
  accidents in `nehody-cesty`, and every accident lay on the stretch's road between its two kilometres.
- **Skipped:** in 2021, 2022 and 2023 the page lists a "stretch" on road `0` from 0 m to 0 m, grouping 6 to 8
  accidents across several okresy (Senec, Dolný Kubín, Malacky, Nitra and others) that have no road position. It is
  not a place, so it is left out; the script prints it on every run.

## Caveats

- **Roads in the kilometre system only.** The police list blackspots on motorways, expressways and class I and II
  roads. The town's streets and class III roads have no such list (the ISDN has a "uzlový systém" page for some
  okresy, none for Senec).
- A stretch on the D1 may lie partly outside okres Senec (`okresy`); its totals here count okres Senec's accidents only.
- A partial year's stretch can name accidents that the quarterly `nehody-cesty` does not list yet; the script then
  prints them and leaves those `blackspot_id`s for the next quarter.

## License

Published by Som Senec under the Creative Commons Attribution 4.0 International licence (CC BY 4.0): https://creativecommons.org/licenses/by/4.0/. You may use it for any purpose, commercial use included, if you credit "Som Senec, somsenec.sk". The source documents that each record links to keep their own terms.
