{"id":29416223,"url":"https://github.com/oalles/pypsa-eur-map-viewer","last_synced_at":"2026-04-12T11:45:01.413Z","repository":{"id":302813365,"uuid":"1013696218","full_name":"oalles/pypsa-eur-map-viewer","owner":"oalles","description":"Interactive European energy map viewer built with React, Vite, Deck.gl, and MapLibre.","archived":false,"fork":false,"pushed_at":"2025-07-04T11:13:37.000Z","size":8571,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-11T01:46:29.010Z","etag":null,"topics":["deckgl","electricity-grid","maplibre","pypsa","react","typescript","voltage","zustand"],"latest_commit_sha":null,"homepage":"https://oalles.github.io/pypsa-eur-map-viewer/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oalles.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-04T10:10:20.000Z","updated_at":"2025-07-04T11:20:27.000Z","dependencies_parsed_at":"2025-07-04T11:49:33.969Z","dependency_job_id":null,"html_url":"https://github.com/oalles/pypsa-eur-map-viewer","commit_stats":null,"previous_names":["oalles/pypsa-eur-map-viewer"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/oalles/pypsa-eur-map-viewer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oalles%2Fpypsa-eur-map-viewer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oalles%2Fpypsa-eur-map-viewer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oalles%2Fpypsa-eur-map-viewer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oalles%2Fpypsa-eur-map-viewer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oalles","download_url":"https://codeload.github.com/oalles/pypsa-eur-map-viewer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oalles%2Fpypsa-eur-map-viewer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280806836,"owners_count":26394451,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-24T02:00:06.418Z","response_time":73,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deckgl","electricity-grid","maplibre","pypsa","react","typescript","voltage","zustand"],"created_at":"2025-07-11T19:02:15.084Z","updated_at":"2026-04-12T11:45:01.394Z","avatar_url":"https://github.com/oalles.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PyPSA-Eur Grid Explorer\n\nInteractive explorer for the European high-voltage electricity grid, built on the public PyPSA-Eur dataset (DOI 10.5281/zenodo.14144752).\n\n## Live Demo\n\n[https://oalles.github.io/pypsa-eur-map-viewer/](https://oalles.github.io/pypsa-eur-map-viewer/)\n\n![App snapshot](img/pypsa.gif)\n\n## About the PyPSA-Eur Dataset\n\nhttps://zenodo.org/records/14144752\n\nThe PyPSA-Eur dataset is an open-source model of the European high-voltage electricity transmission network. It includes detailed information on substations, AC lines, HVDC links, transformers, and converters for 37 European countries. The dataset is designed for energy system analysis and research, and is widely used in academic and industry studies.\n\n- **Source:** [PyPSA-Eur on Zenodo](https://zenodo.org/record/14144752)\n- **Version:** v0.8.0 (latest as of July 2025)\n- **License:** [MIT License](https://opensource.org/licenses/MIT)\n- **Authors:** Fabian Neumann, Jonas Hörsch, Tom Brown, et al.\n- **Coverage:** 37 European countries, including detailed grid topology, line parameters, and generation data.\n- **Citation:**\n  \u003e Fabian Neumann, Jonas Hörsch, Tom Brown (2024). PyPSA-Eur: An Open Optimisation Model of the European Transmission System. Zenodo. https://doi.org/10.5281/zenodo.14144752\n\nFor more details, see the [official documentation](https://pypsa-eur.readthedocs.io/).\n\n## Modes\n\nThe application has two main modes, selectable from the header:\n\n### Explore\n\nThe default mode. Browse the European transmission grid interactively:\n\n- **6 layer types** — AC lines, HVDC links, buses, transformers, converters, and heatmap\n- **Advanced filtering** — dual-range voltage slider, multi-select country picker, construction status toggle\n- **Detail panel** — click any element to see its properties (voltage, capacity, length, etc.)\n- **Quick search** — Cmd+K / Ctrl+K command palette to find elements by name or ID\n- **Statistics** — charts and summaries powered by Recharts\n- **Color schemes** — switchable color palettes for network layers\n- **Display controls** — line width, opacity, and point radius adjustments\n\n### Simulate (new)\n\nA topological blackout simulator. It models what happens when grid components fail: the network splits into islands, and each island is either **energized** (still connected to a power source) or in **blackout**.\n\n**How it works:**\n\n1. **Choose energy sources** — Select countries whose buses act as generation sources (all buses in those countries are marked as energized). Alternatively, switch to *Manual* mode and click individual buses on the map.\n2. **Create faults** — Click buses, AC lines, or HVDC links on the map to simulate failures. These elements are removed from the grid graph.\n3. **See the result** — The simulator runs a BFS connected-components algorithm (in a Web Worker) and colors the map: energized regions stay lit, disconnected regions go dark. Metrics show the number of components, blackout buses, and percentage affected.\n\n\u003e **Note:** This is a simplified topological model for educational purposes. It does not calculate real power flow, voltages, thermal limits, or protection system behavior. Sources are binary (on/off) with no generation capacity limits.\n\n## Other Features\n\n- **Internationalization** — EN, ES, FR, DE\n- **Keyboard shortcuts** — quick toggles for layers and panels\n- **Glassmorphic UI** — translucent overlay panels on a full-screen map\n\n## Data loading workflow\n\nBefore starting the application, download and prepare the data:\n\n```bash\npnpm exec node scripts/fetch-data.mjs\n```\n\nThis script downloads the required CSV files (buses, lines, links, transformers, converters) from Zenodo and saves them in `public/data/`. It also fixes the geometry format to ensure compatibility with the visualization.\n\n**Important:** Run this script whenever you want to update the data or after cloning the repository.\n\n## How is the data used?\n\nCSV files are loaded at startup and processed through a multi-stage pipeline:\n\n1. **Parse** — PapaParse streams each CSV into typed rows\n2. **Geometry** — WKT strings are parsed into coordinate arrays\n3. **GeoJSON** — Rows are converted to GeoJSON Feature collections\n4. **Store** — Zustand holds the full dataset and UI state\n5. **Graph index** — An adjacency map is built from buses and edges (lines, links, transformers, converters) for the simulation engine\n6. **Filter** — A memoized `useFilteredData` hook applies voltage, country, and construction filters\n7. **Render** — Individual deck.gl layers (PathLayer, ScatterplotLayer, HeatmapLayer) consume the filtered features\n\n## Stack\n\n* React 18 + TypeScript\n* Zustand (state management)\n* MapLibre GL 3\n* Deck.gl 9\n* Tailwind CSS v4 (CSS-first config)\n* Radix UI (accessible primitives)\n* cmdk (command palette)\n* i18next + react-i18next\n* Recharts\n* Lucide React (icons)\n* PapaParse (CSV parsing)\n\n## Development\n\n```bash\npnpm install\npnpm exec node scripts/fetch-data.mjs   # download and prepare data\npnpm dev\n```\n\n## Deploy to GitHub Pages\n\n```bash\npnpm deploy\n```\n\nThe deploy script builds the app and pushes `dist/` to the `gh-pages` branch.\nMake sure the repository name matches **pypsa-eur-map-viewer** or update `base` in `vite.config.ts`.\n\n## Notes\n\n* Zenodo allows CORS; if unavailable, you can proxy the CSV files.\n\n## Statistics\n\n![Stats](img/stats.png)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foalles%2Fpypsa-eur-map-viewer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foalles%2Fpypsa-eur-map-viewer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foalles%2Fpypsa-eur-map-viewer/lists"}