# andrewgaur/wec-traffic-forecasting architecture

> Architecture diagram of the GitHub repository andrewgaur/wec-traffic-forecasting, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-15). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/andrewgaur/wec-traffic-forecasting
- Repository: https://github.com/andrewgaur/wec-traffic-forecasting

## Overview

This repository is a small data-preparation prototype for WEC traffic-affected lap-time forecasting, not a complete forecasting system. Its implemented workflow loads race timing CSVs, converts and audits lap records, then builds per-lap prediction origins and history. It also has a helper for recording source-file metadata. The README describes planned train/test race use and race data organization; no model, prediction, or evaluation implementation is shown. Edges reflect the sampled script and README; other data-directory details were not inspected.

Main entry points: [`load_data.py`](https://github.com/andrewgaur/wec-traffic-forecasting/blob/main/load_data.py) (Race data loader), [`data`](https://github.com/andrewgaur/wec-traffic-forecasting/tree/main/data) (Race timing data), [`metadata/source_manifest.csv`](https://github.com/andrewgaur/wec-traffic-forecasting/blob/main/metadata/source_manifest.csv) (Source manifest)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_runner(("Script runner"))
node_race_data["Race timing data"]
node_loader["Race data loader<br/>[load_data.py]"]
node_cleaner["Lap parser and cleaner<br/>[load_data.py]"]
node_record_builder["Prediction records<br/>[load_data.py]"]
node_manifest_writer["Manifest writer<br/>[load_data.py]"]
node_manifest["Source manifest"]

node_runner -->|"runs"| node_loader
node_race_data -->|"loads CSV"| node_loader
node_loader -->|"parses and cleans"| node_cleaner
node_cleaner -->|"builds records"| node_record_builder
node_manifest_writer -->|"appends metadata"| node_manifest

click node_race_data "https://github.com/andrewgaur/wec-traffic-forecasting/tree/main/data"
click node_loader "https://github.com/andrewgaur/wec-traffic-forecasting/blob/main/load_data.py"
click node_cleaner "https://github.com/andrewgaur/wec-traffic-forecasting/blob/main/load_data.py"
click node_record_builder "https://github.com/andrewgaur/wec-traffic-forecasting/blob/main/load_data.py"
click node_manifest_writer "https://github.com/andrewgaur/wec-traffic-forecasting/blob/main/load_data.py"
click node_manifest "https://github.com/andrewgaur/wec-traffic-forecasting/blob/main/metadata/source_manifest.csv"

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_runner toneIndigo
class node_race_data,node_loader,node_cleaner,node_record_builder,node_manifest_writer,node_manifest toneTeal
```

## Components

### Other components

- **Script runner**
- [Race timing data](https://github.com/andrewgaur/wec-traffic-forecasting/tree/main/data): `data`
- [Race data loader](https://github.com/andrewgaur/wec-traffic-forecasting/blob/main/load_data.py): `load_data.py`
- [Lap parser and cleaner](https://github.com/andrewgaur/wec-traffic-forecasting/blob/main/load_data.py): `load_data.py`
- [Prediction records](https://github.com/andrewgaur/wec-traffic-forecasting/blob/main/load_data.py): `load_data.py`
- [Manifest writer](https://github.com/andrewgaur/wec-traffic-forecasting/blob/main/load_data.py): `load_data.py`
- [Source manifest](https://github.com/andrewgaur/wec-traffic-forecasting/blob/main/metadata/source_manifest.csv): `metadata/source_manifest.csv`

## Connections

- Script runner → Race data loader: runs (evidence: `load_data.py`)
- Race timing data → Race data loader: loads CSV (evidence: `load_data.py`)
- Race data loader → Lap parser and cleaner: parses and cleans (evidence: `load_data.py`)
- Lap parser and cleaner → Prediction records: builds records (evidence: `load_data.py`)
- Manifest writer → Source manifest: appends metadata (evidence: `load_data.py`)
