# 033-archita/monte-carlo-f1-2025-prediction architecture

> Architecture diagram of the GitHub repository 033-archita/monte-carlo-f1-2025-prediction, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/033-archita/monte-carlo-f1-2025-prediction
- Repository: https://github.com/033-archita/monte-carlo-f1-2025-prediction

## Overview

This is a Streamlit dashboard for forecasting the 2025 Formula 1 championship. A user selects simulation settings and a driver, runs forecasts for the remaining three Grands Prix and one Sprint, then explores championship probabilities, projected standings, driver distributions, and season-history comparisons. The app files contain the UI, data handling, simulation, and visualizations in a compact runtime. The tree shows two app copies; excerpts document their behavior but do not establish how the copies differ. Some detailed wiring is therefore represented only where README documentation supports it.

Main entry points: [`app.py`](https://github.com/033-archita/monte-carlo-f1-2025-prediction/blob/main/app.py) (Streamlit dashboard), [`Monte_Carlo_F1/app.py`](https://github.com/033-archita/monte-carlo-f1-2025-prediction/blob/main/Monte_Carlo_F1/app.py) (Nested app copy), [`driver_performance.csv`](https://github.com/033-archita/monte-carlo-f1-2025-prediction/blob/main/driver_performance.csv) (Driver performance), [`season_history.csv`](https://github.com/033-archita/monte-carlo-f1-2025-prediction/blob/main/season_history.csv) (Season history)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Dashboard"]
  node_root_app["Streamlit dashboard<br/>[app.py]"]
  node_nested_app["Nested app copy<br/>[app.py]"]
  node_visuals["Forecast visualizations<br/>[app.py]"]
  node_history_view["History comparison<br/>[app.py]"]
end

subgraph group_forecast["Forecasting"]
  node_race_model["Race simulation<br/>[app.py]"]
  node_championship["Points aggregation<br/>[app.py]"]
end

subgraph group_inputs["Data inputs"]
  node_performance_data["Driver performance"]
  node_history_data["Season history<br/>[season_history.csv]"]
end

node_user(("Dashboard user"))

node_user -->|"uses"| node_root_app
node_root_app -->|"loads"| node_performance_data
node_root_app -->|"loads"| node_history_data
node_root_app -->|"runs"| node_race_model
node_race_model -->|"aggregates"| node_championship
node_root_app -->|"displays"| node_visuals
node_root_app -->|"compares"| node_history_view
node_user -.->|"uses"| node_nested_app
node_nested_app -.->|"loads"| node_performance_data
node_nested_app -.->|"loads"| node_history_data
node_nested_app -.->|"runs"| node_race_model

click node_root_app "https://github.com/033-archita/monte-carlo-f1-2025-prediction/blob/main/app.py"
click node_nested_app "https://github.com/033-archita/monte-carlo-f1-2025-prediction/blob/main/Monte_Carlo_F1/app.py"
click node_performance_data "https://github.com/033-archita/monte-carlo-f1-2025-prediction/blob/main/driver_performance.csv"
click node_history_data "https://github.com/033-archita/monte-carlo-f1-2025-prediction/blob/main/season_history.csv"
click node_race_model "https://github.com/033-archita/monte-carlo-f1-2025-prediction/blob/main/app.py"
click node_championship "https://github.com/033-archita/monte-carlo-f1-2025-prediction/blob/main/app.py"
click node_visuals "https://github.com/033-archita/monte-carlo-f1-2025-prediction/blob/main/app.py"
click node_history_view "https://github.com/033-archita/monte-carlo-f1-2025-prediction/blob/main/app.py"

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_root_app,node_nested_app,node_visuals,node_history_view,node_user toneBlue
class node_race_model,node_championship toneAmber
class node_performance_data,node_history_data toneMint
```

## Components

### Dashboard

- [Streamlit dashboard](https://github.com/033-archita/monte-carlo-f1-2025-prediction/blob/main/app.py): `app.py`
- [Nested app copy](https://github.com/033-archita/monte-carlo-f1-2025-prediction/blob/main/Monte_Carlo_F1/app.py): `Monte_Carlo_F1/app.py`
- [Forecast visualizations](https://github.com/033-archita/monte-carlo-f1-2025-prediction/blob/main/app.py): `app.py`
- [History comparison](https://github.com/033-archita/monte-carlo-f1-2025-prediction/blob/main/app.py): `app.py`

### Forecasting

- [Race simulation](https://github.com/033-archita/monte-carlo-f1-2025-prediction/blob/main/app.py): `app.py`
- [Points aggregation](https://github.com/033-archita/monte-carlo-f1-2025-prediction/blob/main/app.py): `app.py`

### Data inputs

- [Driver performance](https://github.com/033-archita/monte-carlo-f1-2025-prediction/blob/main/driver_performance.csv): `driver_performance.csv`
- [Season history](https://github.com/033-archita/monte-carlo-f1-2025-prediction/blob/main/season_history.csv): `season_history.csv`

### Other components

- **Dashboard user**

## Connections

- Dashboard user → Streamlit dashboard: uses (evidence: `README.md`)
- Streamlit dashboard → Driver performance: loads (evidence: `README.md`)
- Streamlit dashboard → Season history: loads (evidence: `README.md`)
- Streamlit dashboard → Race simulation: runs (evidence: `README.md`)
- Race simulation → Points aggregation: aggregates (evidence: `README.md`)
- Streamlit dashboard → Forecast visualizations: displays (evidence: `README.md`)
- Streamlit dashboard → History comparison: compares (evidence: `README.md`)
- Dashboard user → Nested app copy: uses
- Nested app copy → Driver performance: loads
- Nested app copy → Season history: loads
- Nested app copy → Race simulation: runs
