Python command-line tool that generates minimalist, printable map posters of any city from OpenStreetMap data, with selectable color themes.
marceloprates/prettymaps
A minimal Python library that draws customized map artwork from OpenStreetMap data using osmnx, matplotlib and shapely.
- Stars
- 14,326
- Forks
- 735
- Open issues
- 24
- Last commit
- 3 months ago
What is it?
prettymaps fetches OpenStreetMap data for a place name and renders it as a stylized map with matplotlib. Each OpenStreetMap layer, such as water, buildings, roads or parks, can be selected by tags and given its own colors, fills and outlines.
The library is aimed at generating printable or decorative map images rather than navigation maps. It supports a circular or custom boundary via radius and dilate parameters, reusable JSON style presets, and multiplot layouts for combining several maps. A Streamlit front-end and a marimo tutorial notebook are included.
The package is installable from PyPI and runs on Python 3.11 or newer. Map images produced with it must keep the OpenStreetMap credit printed on the figure, as the OpenStreetMap license requires.
Key features
- 01Fetches OpenStreetMap layers by place name using osmnx.
- 02Styles each layer with matplotlib colors, fills and outlines.
- 03Supports circular or custom boundaries with radius and dilate parameters.
- 04Provides JSON style presets and multiplot layouts.
- 05Includes a Streamlit web front-end and a marimo tutorial notebook.
Use cases
- Creating decorative city or neighborhood map posters.
- Generating stylized map artwork for generative art projects.
- Exploring OpenStreetMap data visually while learning geospatial Python.
- Producing printable map images for gifts or home decor.
Quick start
- 1
Install prettymaps from PyPI
pip install prettymaps - 2
Import prettymaps and draw a map of a place
python -c "import prettymaps; plot = prettymaps.plot('Stad van de Zon, Heerhugowaard, Netherlands')"
Things to know
- Requires internet access to fetch OpenStreetMap data.
- Licensed under AGPL-3.0, so distributed or networked derivative works must disclose their source code.
In collections
Topics
FAQ
- What is prettymaps?
- A minimal Python library that draws customized map artwork from OpenStreetMap data using osmnx, matplotlib and shapely. prettymaps fetches OpenStreetMap data for a place name and renders it as a stylized map with matplotlib. Each OpenStreetMap layer, such as water, buildings, roads or parks, can be selected by tags and given its own colors, fills and outlines.
- Is prettymaps free to use? What license does it have?
- prettymaps is open source under the AGPL-3.0 license. Check the license terms before using it in commercial products.
- Is prettymaps still maintained?
- Updated within 6 months. The last commit to prettymaps was on Jul 30, 2026.
- What can I use prettymaps for?
- Creating decorative city or neighborhood map posters. Generating stylized map artwork for generative art projects. Exploring OpenStreetMap data visually while learning geospatial Python. Producing printable map images for gifts or home decor.
- How do I install prettymaps?
- Install prettymaps from PyPI: pip install prettymaps Import prettymaps and draw a map of a place: python -c "import prettymaps; plot = prettymaps.plot('Stad van de Zon, Heerhugowaard, Netherlands')"
- Where can I get prettymaps?
- The source code and installation instructions are on GitHub: https://github.com/marceloprates/prettymaps
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
Renders every road in a chosen city at once as a map-style visualization, using OpenStreetMap data in the browser.
A browser-based tool that turns OpenStreetMap data of any city into a downloadable, themed map poster, with no install needed.
Free Jupyter notebooks that make up the full text of the Python Data Science Handbook, covering NumPy, Pandas, Matplotlib and Scikit-Learn.
Free, privacy-first offline maps and GPS navigation app for Android and iOS, built on crowd-sourced OpenStreetMap data.
The Ruby on Rails application that runs the OpenStreetMap website, its editing API, Browse pages and GPX uploads.