Open-source tool generates visualisations of national electrical grids
The GitHub-hosted utility allows users to create print-ready posters of transmission networks across countries, states, and continents using Python libraries.
The open-source project grid2poster, hosted on GitHub by the open-energy-transition organisation, enables users to generate print-ready posters of electrical grid infrastructure. The tool downloads transmission line data from OpenStreetMap and renders it using the Python libraries GeoPandas, OSMnx, and Matplotlib. It supports the creation of visualisations for countries, states, provinces, continents, and custom regions defined by local GeoJSON files.
The project is heavily inspired by and reuses styling from maptoposter. By default, every run writes both a PNG and an SVG file to a designated output directory. The tool utilises OpenStreetMap features tagged as transmission infrastructure, with the accuracy and completeness of the generated posters depending entirely on the existing coverage of OpenStreetMap in the selected country or region.
Continent-scale operations utilise the Natural Earth admin-0 dataset for boundaries, as Nominatim does not resolve continent names. Accepted values include Africa, Antarctica, Asia, Europe, North America, Oceania, and South America, with an aggregate Global option combining every inhabited continent. Continent boundaries are downloaded and cached on first use to streamline subsequent runs.
Intermediate OpenStreetMap responses and processed geometries are cached to avoid repeated downloads. For large countries, users can reduce the Overpass query tile size to manage per-query limits. Continent-scale runs hit the Overpass API hundreds of times and can take several hours to complete, depending on API load and query configurations.
The project encourages community contributions to OpenStreetMap via the MapYourGrid initiative to improve data coverage. MapYourGrid is a community initiative that coordinates mapping work for power lines, generators, and substations, providing tutorials and mapping tools. Users can supply their own GeoJSON files for ad-hoc areas, such as single states or metro regions, which are dissolved into a single boundary for the visualisation.


