# abdelghanikemmissa/football-international-1872-aujourd-hui- architecture

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

- Interactive diagram: https://gitdiagram.com/abdelghanikemmissa/football-international-1872-aujourd-hui-
- Repository: https://github.com/abdelghanikemmissa/football-international-1872-aujourd-hui-

## Overview

This is a football-data analytics project: raw match-related CSVs are loaded into DuckDB, transformed through dbt staging, intermediate, and mart models, then exported as CSVs for analysis in the Power BI report. The loader and exporter relationships are visible in the sampled Python files. SQL model dependencies and the report’s data connections were not sampled, so those links are shown as unverified rather than asserted.

Main entry points: [`football_bi/models/intermediate/int_matches.sql`](https://github.com/abdelghanikemmissa/football-international-1872-aujourd-hui-/blob/main/football_bi/models/intermediate/int_matches.sql) (Match integration), [`football_bi/dev.duckdb`](https://github.com/abdelghanikemmissa/football-international-1872-aujourd-hui-/blob/main/football_bi/dev.duckdb) (DuckDB warehouse), [`football_bi/models/marts/fact_match.sql`](https://github.com/abdelghanikemmissa/football-international-1872-aujourd-hui-/blob/main/football_bi/models/marts/fact_match.sql) (Match fact), [`football_bi/load_raw.py`](https://github.com/abdelghanikemmissa/football-international-1872-aujourd-hui-/blob/main/football_bi/load_raw.py) (Raw data loader)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingestion["Data ingestion"]
  node_raw_files["Raw CSV datasets"]
  node_loader["Raw data loader<br/>[load_raw.py]"]
  node_duckdb[("DuckDB warehouse<br/>[dev.duckdb]")]
end

subgraph group_dbt["dbt transformations"]
  node_stg_results["Results staging<br/>[stg_results.sql]"]
  node_stg_shootouts["Shootouts staging<br/>[stg_shootouts.sql]"]
  node_stg_goalscorers["Goalscorers staging"]
  node_stg_former_names["Former names staging"]
  node_int_matches["Match integration<br/>[int_matches.sql]"]
  node_int_goals["Goal integration<br/>[int_goals.sql]"]
  node_int_shootouts["Shootout integration<br/>[int_shootouts.sql]"]
end

subgraph group_marts["Analytics marts"]
  node_dim_date["Date dimension<br/>[dim_date.sql]"]
  node_dim_team["Team dimension<br/>[dim_team.sql]"]
  node_dim_tournament["Tournament dimension<br/>[dim_tournament.sql]"]
  node_dim_venue["Venue dimension<br/>[dim_venue.sql]"]
  node_fact_match["Match fact<br/>[fact_match.sql]"]
  node_team_match["Team-match view<br/>[v_team_match.sql]"]
end

subgraph group_consumption["Reporting and export"]
  node_exporter["Mart CSV exporter<br/>[export_marts.py]"]
  node_exports["Exported mart CSVs"]
  node_power_bi["Power BI report"]
end

node_loader -->|"reads CSVs"| node_raw_files
node_loader -->|"loads tables"| node_duckdb
node_stg_results -.->|"reads raw data"| node_duckdb
node_stg_shootouts -.->|"reads raw data"| node_duckdb
node_stg_goalscorers -.->|"reads raw data"| node_duckdb
node_stg_former_names -.->|"reads raw data"| node_duckdb
node_int_matches -.->|"transforms"| node_stg_results
node_int_goals -.->|"transforms"| node_stg_goalscorers
node_int_shootouts -.->|"transforms"| node_stg_shootouts
node_dim_date -.->|"builds dimension"| node_int_matches
node_dim_team -.->|"builds dimension"| node_int_matches
node_dim_team -.->|"uses name history"| node_stg_former_names
node_dim_tournament -.->|"builds dimension"| node_int_matches
node_dim_venue -.->|"builds dimension"| node_int_matches
node_fact_match -.->|"builds fact"| node_int_matches
node_fact_match -.->|"uses goals"| node_int_goals
node_fact_match -.->|"uses shootouts"| node_int_shootouts
node_team_match -.->|"derives view"| node_fact_match
node_exporter -->|"copies mart tables"| node_duckdb
node_exporter -->|"writes CSVs"| node_exports
node_power_bi -.->|"may consume"| node_exports

click node_raw_files "https://github.com/abdelghanikemmissa/football-international-1872-aujourd-hui-/tree/main/football_bi/data/raw"
click node_loader "https://github.com/abdelghanikemmissa/football-international-1872-aujourd-hui-/blob/main/football_bi/load_raw.py"
click node_duckdb "https://github.com/abdelghanikemmissa/football-international-1872-aujourd-hui-/blob/main/football_bi/dev.duckdb"
click node_stg_results "https://github.com/abdelghanikemmissa/football-international-1872-aujourd-hui-/blob/main/football_bi/models/staging/stg_results.sql"
click node_stg_shootouts "https://github.com/abdelghanikemmissa/football-international-1872-aujourd-hui-/blob/main/football_bi/models/staging/stg_shootouts.sql"
click node_stg_goalscorers "https://github.com/abdelghanikemmissa/football-international-1872-aujourd-hui-/blob/main/football_bi/models/staging/stg_goalscorers.sql"
click node_stg_former_names "https://github.com/abdelghanikemmissa/football-international-1872-aujourd-hui-/blob/main/football_bi/models/staging/stg_former_names.sql"
click node_int_matches "https://github.com/abdelghanikemmissa/football-international-1872-aujourd-hui-/blob/main/football_bi/models/intermediate/int_matches.sql"
click node_int_goals "https://github.com/abdelghanikemmissa/football-international-1872-aujourd-hui-/blob/main/football_bi/models/intermediate/int_goals.sql"
click node_int_shootouts "https://github.com/abdelghanikemmissa/football-international-1872-aujourd-hui-/blob/main/football_bi/models/intermediate/int_shootouts.sql"
click node_dim_date "https://github.com/abdelghanikemmissa/football-international-1872-aujourd-hui-/blob/main/football_bi/models/marts/dim_date.sql"
click node_dim_team "https://github.com/abdelghanikemmissa/football-international-1872-aujourd-hui-/blob/main/football_bi/models/marts/dim_team.sql"
click node_dim_tournament "https://github.com/abdelghanikemmissa/football-international-1872-aujourd-hui-/blob/main/football_bi/models/marts/dim_tournament.sql"
click node_dim_venue "https://github.com/abdelghanikemmissa/football-international-1872-aujourd-hui-/blob/main/football_bi/models/marts/dim_venue.sql"
click node_fact_match "https://github.com/abdelghanikemmissa/football-international-1872-aujourd-hui-/blob/main/football_bi/models/marts/fact_match.sql"
click node_team_match "https://github.com/abdelghanikemmissa/football-international-1872-aujourd-hui-/blob/main/football_bi/models/marts/v_team_match.sql"
click node_exporter "https://github.com/abdelghanikemmissa/football-international-1872-aujourd-hui-/blob/main/football_bi/export_marts.py"
click node_exports "https://github.com/abdelghanikemmissa/football-international-1872-aujourd-hui-/tree/main/football_bi/exports"
click node_power_bi "https://github.com/abdelghanikemmissa/football-international-1872-aujourd-hui-/blob/main/football_bi/football_bi_project.pbix"

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_raw_files,node_loader,node_duckdb toneBlue
class node_stg_results,node_stg_shootouts,node_stg_goalscorers,node_stg_former_names,node_int_matches,node_int_goals,node_int_shootouts toneAmber
class node_dim_date,node_dim_team,node_dim_tournament,node_dim_venue,node_fact_match,node_team_match toneMint
class node_exporter,node_exports,node_power_bi toneRose
```

## Components

### Data ingestion

- [Raw CSV datasets](https://github.com/abdelghanikemmissa/football-international-1872-aujourd-hui-/tree/main/football_bi/data/raw): `football_bi/data/raw`
- [Raw data loader](https://github.com/abdelghanikemmissa/football-international-1872-aujourd-hui-/blob/main/football_bi/load_raw.py): `football_bi/load_raw.py`
- [DuckDB warehouse](https://github.com/abdelghanikemmissa/football-international-1872-aujourd-hui-/blob/main/football_bi/dev.duckdb): `football_bi/dev.duckdb`

### dbt transformations

- [Results staging](https://github.com/abdelghanikemmissa/football-international-1872-aujourd-hui-/blob/main/football_bi/models/staging/stg_results.sql): `football_bi/models/staging/stg_results.sql`
- [Shootouts staging](https://github.com/abdelghanikemmissa/football-international-1872-aujourd-hui-/blob/main/football_bi/models/staging/stg_shootouts.sql): `football_bi/models/staging/stg_shootouts.sql`
- [Goalscorers staging](https://github.com/abdelghanikemmissa/football-international-1872-aujourd-hui-/blob/main/football_bi/models/staging/stg_goalscorers.sql): `football_bi/models/staging/stg_goalscorers.sql`
- [Former names staging](https://github.com/abdelghanikemmissa/football-international-1872-aujourd-hui-/blob/main/football_bi/models/staging/stg_former_names.sql): `football_bi/models/staging/stg_former_names.sql`
- [Match integration](https://github.com/abdelghanikemmissa/football-international-1872-aujourd-hui-/blob/main/football_bi/models/intermediate/int_matches.sql): `football_bi/models/intermediate/int_matches.sql`
- [Goal integration](https://github.com/abdelghanikemmissa/football-international-1872-aujourd-hui-/blob/main/football_bi/models/intermediate/int_goals.sql): `football_bi/models/intermediate/int_goals.sql`
- [Shootout integration](https://github.com/abdelghanikemmissa/football-international-1872-aujourd-hui-/blob/main/football_bi/models/intermediate/int_shootouts.sql): `football_bi/models/intermediate/int_shootouts.sql`

### Analytics marts

- [Date dimension](https://github.com/abdelghanikemmissa/football-international-1872-aujourd-hui-/blob/main/football_bi/models/marts/dim_date.sql): `football_bi/models/marts/dim_date.sql`
- [Team dimension](https://github.com/abdelghanikemmissa/football-international-1872-aujourd-hui-/blob/main/football_bi/models/marts/dim_team.sql): `football_bi/models/marts/dim_team.sql`
- [Tournament dimension](https://github.com/abdelghanikemmissa/football-international-1872-aujourd-hui-/blob/main/football_bi/models/marts/dim_tournament.sql): `football_bi/models/marts/dim_tournament.sql`
- [Venue dimension](https://github.com/abdelghanikemmissa/football-international-1872-aujourd-hui-/blob/main/football_bi/models/marts/dim_venue.sql): `football_bi/models/marts/dim_venue.sql`
- [Match fact](https://github.com/abdelghanikemmissa/football-international-1872-aujourd-hui-/blob/main/football_bi/models/marts/fact_match.sql): `football_bi/models/marts/fact_match.sql`
- [Team-match view](https://github.com/abdelghanikemmissa/football-international-1872-aujourd-hui-/blob/main/football_bi/models/marts/v_team_match.sql): `football_bi/models/marts/v_team_match.sql`

### Reporting and export

- [Mart CSV exporter](https://github.com/abdelghanikemmissa/football-international-1872-aujourd-hui-/blob/main/football_bi/export_marts.py): `football_bi/export_marts.py`
- [Exported mart CSVs](https://github.com/abdelghanikemmissa/football-international-1872-aujourd-hui-/tree/main/football_bi/exports): `football_bi/exports`
- [Power BI report](https://github.com/abdelghanikemmissa/football-international-1872-aujourd-hui-/blob/main/football_bi/football_bi_project.pbix): `football_bi/football_bi_project.pbix`

## Connections

- Raw data loader → Raw CSV datasets: reads CSVs (evidence: `football_bi/load_raw.py`)
- Raw data loader → DuckDB warehouse: loads tables (evidence: `football_bi/load_raw.py`)
- Results staging → DuckDB warehouse: reads raw data
- Shootouts staging → DuckDB warehouse: reads raw data
- Goalscorers staging → DuckDB warehouse: reads raw data
- Former names staging → DuckDB warehouse: reads raw data
- Match integration → Results staging: transforms
- Goal integration → Goalscorers staging: transforms
- Shootout integration → Shootouts staging: transforms
- Date dimension → Match integration: builds dimension
- Team dimension → Match integration: builds dimension
- Team dimension → Former names staging: uses name history
- Tournament dimension → Match integration: builds dimension
- Venue dimension → Match integration: builds dimension
- Match fact → Match integration: builds fact
- Match fact → Goal integration: uses goals
- Match fact → Shootout integration: uses shootouts
- Team-match view → Match fact: derives view
- Mart CSV exporter → DuckDB warehouse: copies mart tables (evidence: `football_bi/export_marts.py`)
- Mart CSV exporter → Exported mart CSVs: writes CSVs (evidence: `football_bi/export_marts.py`)
- Power BI report → Exported mart CSVs: may consume
