# wilfriedv/energy-pricing-heatmap architecture

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

- Interactive diagram: https://gitdiagram.com/wilfriedv/energy-pricing-heatmap
- Repository: https://github.com/wilfriedv/energy-pricing-heatmap

## Overview

A small Streamlit app lets a user choose a date, fetches Belgian day-ahead prices from ENTSO-E, parses and aggregates the response, then displays a heatmap-style chart. The runtime is implemented in one file; the graph separates its meaningful stages without implying a storage layer. Relationships are based on the excerpted app source; no additional subsystems are documented.

Main entry points: [`src/heatmap_app.py`](https://github.com/wilfriedv/energy-pricing-heatmap/blob/main/src/heatmap_app.py) (ENTSO-E retrieval)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Streamlit application"]
  node_ui["Date selection UI<br/>[heatmap_app.py]"]
end

subgraph group_data["Price data workflow"]
  node_retrieval["ENTSO-E retrieval<br/>[heatmap_app.py]"]
  node_xmlparse["XML parsing<br/>[heatmap_app.py]"]
  node_aggregation["Hourly aggregation<br/>[heatmap_app.py]"]
end

subgraph group_visualization["Price visualization"]
  node_chart["Heatmap chart<br/>[heatmap_app.py]"]
end

node_user(("Date selector user"))
node_entsoe{{"ENTSO-E API"}}

node_user -->|"selects date"| node_ui
node_ui -->|"requests prices"| node_retrieval
node_retrieval -->|"fetches XML"| node_entsoe
node_retrieval -->|"passes response"| node_xmlparse
node_xmlparse -->|"returns records"| node_aggregation
node_aggregation -->|"supplies hourly prices"| node_chart
node_chart -->|"displays figure"| node_ui

click node_ui "https://github.com/wilfriedv/energy-pricing-heatmap/blob/main/src/heatmap_app.py"
click node_retrieval "https://github.com/wilfriedv/energy-pricing-heatmap/blob/main/src/heatmap_app.py"
click node_xmlparse "https://github.com/wilfriedv/energy-pricing-heatmap/blob/main/src/heatmap_app.py"
click node_aggregation "https://github.com/wilfriedv/energy-pricing-heatmap/blob/main/src/heatmap_app.py"
click node_chart "https://github.com/wilfriedv/energy-pricing-heatmap/blob/main/src/heatmap_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_ui,node_user toneBlue
class node_retrieval,node_xmlparse,node_aggregation toneAmber
class node_chart,node_entsoe toneMint
```

## Components

### Streamlit application

- [Date selection UI](https://github.com/wilfriedv/energy-pricing-heatmap/blob/main/src/heatmap_app.py): `src/heatmap_app.py`

### Price data workflow

- [ENTSO-E retrieval](https://github.com/wilfriedv/energy-pricing-heatmap/blob/main/src/heatmap_app.py): `src/heatmap_app.py`
- [XML parsing](https://github.com/wilfriedv/energy-pricing-heatmap/blob/main/src/heatmap_app.py): `src/heatmap_app.py`
- [Hourly aggregation](https://github.com/wilfriedv/energy-pricing-heatmap/blob/main/src/heatmap_app.py): `src/heatmap_app.py`

### Price visualization

- [Heatmap chart](https://github.com/wilfriedv/energy-pricing-heatmap/blob/main/src/heatmap_app.py): `src/heatmap_app.py`

### Other components

- **Date selector user**
- **ENTSO-E API**

## Connections

- Date selector user → Date selection UI: selects date (evidence: `src/heatmap_app.py`)
- Date selection UI → ENTSO-E retrieval: requests prices (evidence: `src/heatmap_app.py`)
- ENTSO-E retrieval → ENTSO-E API: fetches XML (evidence: `src/heatmap_app.py`)
- ENTSO-E retrieval → XML parsing: passes response (evidence: `src/heatmap_app.py`)
- XML parsing → Hourly aggregation: returns records (evidence: `src/heatmap_app.py`)
- Hourly aggregation → Heatmap chart: supplies hourly prices (evidence: `src/heatmap_app.py`)
- Heatmap chart → Date selection UI: displays figure (evidence: `src/heatmap_app.py`)
