Football incident attributes
Some incidents carry more detail than their name. A Goal is not just "Goal" - it can be an own
goal, a penalty, scored with the left foot from outside the box, under high pressure, with no
goalkeeper in front of it. That detail arrives as attributes[] on the incident's definition in
GET /v2/sports/{id}, and it is what the per-sport data reference already renders under
each incident that has any.
The shape
Section titled “The shape”On the sport definition, not on a match:
{ "id": 413, "name": "Goal", "attributes": [ { "id": 397, "name": "Own goal", "short_name": "own-goal", "sort_order": 1 }, { "id": 398, "name": "Penalty goal", "short_name": "penalty-goal", "sort_order": 2 } ]}sort_order is a flat display order, not a semantic grouping - own goal and penalty goal get
orders 1 and 2, but so does an unrelated attribute three groups later. There is no field on the
attribute that says which of "Goal type", "Placement", or "Technique of shot" it belongs to.
What is generated, what is curated
Section titled “What is generated, what is curated”| Layer | Source | Freshness |
|---|---|---|
| Attribute id and name | Snapshot from GET /v2/sports/{id} in data/reference/sports/, same as other data reference tables | Refreshed when that snapshot is updated (npm run spec:sports or the API-data workflow); rendered on each portal build |
| Semantic group label ("Goal type", "Placement"...) | Curated annotation file in the portal build (incident-attribute-groups.json) | curated, football only, partial |
Football's incidents render their attributes grouped under these labels on the Soccer data reference page. An attribute with no curated group still renders - under a plain Other heading - instead of silently disappearing. Every other sport's incidents render their attributes the same ungrouped way, since no one has curated groups for them yet.
Reading it in practice
Section titled “Reading it in practice”Match incidents (GET /v2/events/{id}/important-incidents by default, or events_incidents on
GET /v2/events/{id} when you already load the match - see
Time, clocks and timezones and
Show a match timeline) carry the
attribute ids that actually happened on a given incident, as a plain array. Resolve each id
against the sport definition's incidents[].attributes[] - the same table rendered on the data
reference - to get its name and group.
- Soccer data reference - the generated, grouped table itself
- Show a match timeline - where incidents appear on a real match