# aviborg/vagtrafikskador architecture

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

- Interactive diagram: https://gitdiagram.com/aviborg/vagtrafikskador
- Repository: https://github.com/aviborg/vagtrafikskador

## Overview

This is an early-stage planning repository, not a working observatory website: it contains no frontend, published statistics, ingestion pipeline, or news-event workflow. Its implemented runtime capability is validating official-statistics release registries, including release metadata, observations, and quality annotations. The README describes a future site with maps, statistics, trends, comparisons, search, and filters; those capabilities are not represented as implemented components. The schema relationship is documented at a high level, but the sampled validator excerpt does not show its schema-loading code.

Main entry points: [`scripts/validate_official_statistics.py`](https://github.com/aviborg/vagtrafikskador/blob/main/scripts/validate_official_statistics.py) (Registry validator), [`schemas/v1/official-statistics.schema.json`](https://github.com/aviborg/vagtrafikskador/blob/main/schemas/v1/official-statistics.schema.json) (Statistics schema), [`data/official`](https://github.com/aviborg/vagtrafikskador/tree/main/data/official) (Official releases)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_validation["Contract validation"]
  node_validator["Registry validator"]
  node_contract["Statistics schema"]
end

subgraph group_official_data["Official statistics"]
  node_registry[("Official releases")]
end

node_operator(("Data maintainer"))

node_operator -->|"runs validation"| node_validator
node_validator -->|"validates registry"| node_registry
node_validator -.->|"checks against"| node_contract

click node_validator "https://github.com/aviborg/vagtrafikskador/blob/main/scripts/validate_official_statistics.py"
click node_contract "https://github.com/aviborg/vagtrafikskador/blob/main/schemas/v1/official-statistics.schema.json"
click node_registry "https://github.com/aviborg/vagtrafikskador/tree/main/data/official"

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_validator,node_contract toneBlue
class node_registry toneAmber
class node_operator toneIndigo
```

## Components

### Contract validation

- [Registry validator](https://github.com/aviborg/vagtrafikskador/blob/main/scripts/validate_official_statistics.py): `scripts/validate_official_statistics.py`
- [Statistics schema](https://github.com/aviborg/vagtrafikskador/blob/main/schemas/v1/official-statistics.schema.json): `schemas/v1/official-statistics.schema.json`

### Official statistics

- [Official releases](https://github.com/aviborg/vagtrafikskador/tree/main/data/official): `data/official`

### Other components

- **Data maintainer**

## Connections

- Data maintainer → Registry validator: runs validation (evidence: `README.md`)
- Registry validator → Official releases: validates registry (evidence: `scripts/validate_official_statistics.py`)
- Registry validator → Statistics schema: checks against
