The Candidates repository has a third entry: madrid-accidentes-trafico, one model — AccidentInvolvedPerson — covering traffic accidents registered by Madrid’s Policía Municipal. Browse it alongside the other two candidates on the search page.
If this is your first time hearing about the Candidates repository, the introductory post explains what it is and why it exists.
A different kind of source
Our first two candidates came from formal ontologies. This one is different: it’s built directly from a 3-page PDF field specification published by Madrid’s Dirección General de la Policía Municipal — a plain data dictionary, in Spanish, with no OWL, no RDF, nothing machine-readable at all. That’s exactly the kind of source Candidates is meant to handle: most open data in the world looks like this, not like a formal ontology.
One design detail worth calling out: Madrid’s dataset publishes one row per person involved in an accident — drivers, passengers, pedestrians — not one row per accident. A single serious incident can generate over 40 rows. This candidate mirrors that structure faithfully with a single flat entity rather than splitting accident and person data apart, so a row in the real CSV maps directly to one entity instance, no extra grouping logic required.
Real data almost always disagrees with the spec, a little
Because we had both the specification and the real published dataset, we could check one against the other — and found genuine gaps, all documented in the candidate’s standard-metadata.yaml:
- The PDF describes 8 broad accident-type categories in prose. The real 2023 data records 13 more granular ones as independent values — for example, what the spec calls one category (“Colisión doble”) actually appears in the data as three separate values depending on the collision angle.
- The PDF says accident times are grouped into 1-hour ranges. The real data has full minute-level precision.
- The PDF describes the sex field as “hombre, Mujer o no asignado.” The real data uses “Desconocido” instead of “no asignado.”
In every case, the schema follows what’s actually in the published data, not what the specification claims — because a schema that matches the document but not the dataset isn’t useful to anyone trying to load real records.
Tested against every real row, not a sample
This candidate introduces something new to the repository: a generic, reusable CSV validator (tools/validate_against_csv.py) that converts real CSV rows into JSON per a column mapping and checks them against a schema.json, with stratified sampling and full date/time format checking. We used it to validate this candidate against Madrid’s entire published 2023 dataset — not a sample. All 48,830 real rows pass.
The tool is schema-agnostic, so it’s ready to reuse on any future candidate with a real CSV or tabular source to test against.
What’s still open
Two things this candidate does not resolve, flagged directly rather than glossed over: the source PDF doesn’t state a license for the dataset, and we haven’t checked whether this overlaps with any existing official Smart Data Models Transportation model. Both are worth checking before this goes any further.
Real corrections, comments, and pull requests are welcome on standards/madrid-accidentes-trafico.












