Interactive dashboard for the Spanish electricity market built with Streamlit and the Datons ESIOS Data API.
# 1. Download and install
git clone https://github.com/datons/esios-data-dashboard.git
cd esios-data-dashboard
uv syncOr download as ZIP, unzip, and run uv sync inside the folder.
# 2. Add your API key
cp .env.example .env
# Edit .env and paste your keyGet your free API key at datons.com/account/api-keys.
# 3. Run the dashboard
uv run streamlit run src/app.pyOpen localhost:8501.
| Page | Description |
|---|---|
| Market overview | Spot price, demand, renewable share, technology mix |
| Indicators | ESIOS time series (PVPC, demand, wind, solar…) with geography filter |
| Operational data | Per-unit revenue, energy, captured price by market program |
This repo includes MCP configs for both VS Code and Claude Code, so you can query the API conversationally:
- VS Code: The
.vscode/mcp.jsonconfig supports OAuth (no key needed) or API key auth - Claude Code: The
.mcp.jsonconfig readsDATONS_API_KEYfrom your environment
Example questions you can ask the AI chat:
- "What was the day-ahead price in Spain yesterday?"
- "Show me BRUC's revenue by program for January 2025"
- "Add a filter by technology to the operational data page"
Use the AI chat in VS Code or Claude Code to modify the dashboard. Examples:
- "Add a comparison chart: nuclear vs wind generation"
- "Create a new page showing market share by company"
- "Add a download button to export data as CSV"
See CLAUDE.md for the full technical reference (tables, SQL patterns, SDK reference).