# hudl/open-data architecture

> Architecture diagram of the GitHub repository hudl/open-data, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-07-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/hudl/open-data
- Repository: https://github.com/hudl/open-data

## Overview

#### Purpose and entry point
This repository is a versioned static distribution of StatsBomb football open data for research and analysis. There is no application runtime, API server, or executable entry point. Consumers begin with `data/competitions.json`, then traverse JSON assets by IDs.

#### Competition and season catalog
`data/competitions.json` is the top-level index of available competitions and seasons. Its competition and season identifiers define the lookup keys for match schedules.
Paths: `data/competitions.json`

#### Match catalog layer
Matches are partitioned first by competition ID directory and then season ID file. A consumer uses IDs from the competition catalog to load the relevant match list; match records provide match IDs used by the event-oriented datasets.
Paths: `data/matches/11/1.json`, `data/matches/43/106.json`, `data/matches/1470/274.json`

#### Event stream layer
Each match has a match-ID-named event file. This is the principal analytical payload: a chronological event stream for a match, joined to match metadata through the filename/match ID. Event files are independently readable, enabling selective ingestion rather than loading the complete corpus.
Paths: `data/events/15946.json`, `data/events/3773369.json`, `data/events/4020846.json`

#### Lineup layer
Lineups are stored separately but keyed one-to-one with match event files by match ID. Analysis that needs players, teams, formations, or starting/substitute context must combine the corresponding event and lineup documents.
Paths: `data/lineups/15946.json`, `data/lineups/3773369.json`, `data/lineups/4020846.json`

#### StatsBomb 360 enrichment
Selected matches have optional 360 frame data, again keyed by match ID. Its presence is not universal, so consumers must treat it as an optional enrichment over the base events and lineups rather than assume complete coverage.
Paths: `data/three-sixty/3773369.json`, `data/three-sixty/3895052.json`, `data/three-sixty/4020846.json`

#### Data contracts, boundaries, and operations
The repository boundary is static JSON on disk/Git; no database, cloud infrastructure, authentication, or live external service is included. Schema interpretation is defined by bundled PDF specifications, especially event, lineup, match, competition, and 360 contracts. Primary traversal is: competition/season → match list → match ID → events + lineup + optional 360.
Paths: `doc/Open Data Events v4.0.0.pdf`, `doc/Open Data Lineups v2.0.0.pdf`, `doc/Open Data 360 Frames v1.0.0 (1).pdf`

Main entry points: [`data/events/15946.json`](https://github.com/hudl/open-data/blob/master/data/events/15946.json) (Event streams), [`data/lineups/15946.json`](https://github.com/hudl/open-data/blob/master/data/lineups/15946.json) (Lineups), [`data/three-sixty/3773369.json`](https://github.com/hudl/open-data/blob/master/data/three-sixty/3773369.json) (360 frames), [`data/competitions.json`](https://github.com/hudl/open-data/blob/master/data/competitions.json) (Competition & season index)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_catalog["Catalogs"]
  node_competitions["Competition &amp; season index<br/>JSON catalog<br/>[competitions.json]"]
  node_match_lists["Season match lists<br/>partitioned JSON<br/>[1.json]"]
  node_match_ids{{"Match IDs<br/>join key"}}
end

subgraph group_match_data["Match Data"]
  node_events["Event streams<br/>match JSON<br/>[15946.json]"]
  node_lineups["Lineups<br/>match JSON<br/>[15946.json]"]
  node_three_sixty["360 frames<br/>optional match JSON<br/>[3773369.json]"]
end

subgraph group_contracts["Contracts"]
  node_event_contract["Event specification<br/>PDF contract"]
  node_lineup_contract["Lineup specification<br/>PDF contract"]
  node_frames_contract["360 specification<br/>PDF contract"]
end

node_consumer(("Data consumer<br/>research workflow"))

node_consumer -->|"starts with"| node_competitions
node_competitions -->|"competition + season IDs"| node_match_lists
node_match_lists -->|"match records"| node_match_ids
node_match_ids -->|"filename key"| node_events
node_match_ids -->|"filename key"| node_lineups
node_match_ids -.->|"filename key; if present"| node_three_sixty
node_consumer -->|"selective ingestion"| node_events
node_events -->|"combine by match ID"| node_lineups
node_events -.->|"optional enrichment"| node_three_sixty
node_event_contract -.->|"defines schema"| node_events
node_lineup_contract -.->|"defines schema"| node_lineups
node_frames_contract -.->|"defines schema"| node_three_sixty

click node_competitions "https://github.com/hudl/open-data/blob/master/data/competitions.json"
click node_match_lists "https://github.com/hudl/open-data/blob/master/data/matches/11/1.json"
click node_events "https://github.com/hudl/open-data/blob/master/data/events/15946.json"
click node_lineups "https://github.com/hudl/open-data/blob/master/data/lineups/15946.json"
click node_three_sixty "https://github.com/hudl/open-data/blob/master/data/three-sixty/3773369.json"
click node_event_contract "https://github.com/hudl/open-data/blob/master/doc/Open%20Data%20Events%20v4.0.0.pdf"
click node_lineup_contract "https://github.com/hudl/open-data/blob/master/doc/Open%20Data%20Lineups%20v2.0.0.pdf"
click node_frames_contract "https://github.com/hudl/open-data/blob/master/doc/Open%20Data%20360%20Frames%20v1.0.0%20(1).pdf"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_competitions,node_match_lists,node_match_ids toneBlue
class node_events,node_lineups,node_three_sixty toneAmber
class node_event_contract,node_lineup_contract,node_frames_contract toneMint
class node_consumer toneNeutral
```

## Components

### Catalogs

- [Competition & season index](https://github.com/hudl/open-data/blob/master/data/competitions.json): JSON catalog · Top-level catalog of available competitions and seasons. · `data/competitions.json`
- [Season match lists](https://github.com/hudl/open-data/blob/master/data/matches/11/1.json): partitioned JSON · Competition-ID directories contain season-ID match schedules. · `data/matches/11/1.json`
- **Match IDs**: join key · Match records supply IDs for match-scoped documents.

### Match Data

- [Event streams](https://github.com/hudl/open-data/blob/master/data/events/15946.json): match JSON · Chronological, independently readable analytical payloads. · `data/events/15946.json`
- [Lineups](https://github.com/hudl/open-data/blob/master/data/lineups/15946.json): match JSON · Player, team, formation, and starter context keyed by match ID. · `data/lineups/15946.json`
- [360 frames](https://github.com/hudl/open-data/blob/master/data/three-sixty/3773369.json): optional match JSON · Optional spatial enrichment with incomplete match coverage. · `data/three-sixty/3773369.json`

### Contracts

- [Event specification](https://github.com/hudl/open-data/blob/master/doc/Open%20Data%20Events%20v4.0.0.pdf): PDF contract · `doc/Open Data Events v4.0.0.pdf`
- [Lineup specification](https://github.com/hudl/open-data/blob/master/doc/Open%20Data%20Lineups%20v2.0.0.pdf): PDF contract · `doc/Open Data Lineups v2.0.0.pdf`
- [360 specification](https://github.com/hudl/open-data/blob/master/doc/Open%20Data%20360%20Frames%20v1.0.0%20(1).pdf): PDF contract · `doc/Open Data 360 Frames v1.0.0 (1).pdf`

### Other components

- **Data consumer**: research workflow · Traverses static JSON assets by identifier.

## Connections

- Data consumer → Competition & season index: starts with
- Competition & season index → Season match lists: competition + season IDs
- Season match lists → Match IDs: match records
- Match IDs → Event streams: filename key
- Match IDs → Lineups: filename key
- Match IDs → 360 frames: filename key; if present
- Data consumer → Event streams: selective ingestion
- Event streams → Lineups: combine by match ID
- Event streams → 360 frames: optional enrichment
- Event specification → Event streams: defines schema
- Lineup specification → Lineups: defines schema
- 360 specification → 360 frames: defines schema
