prettymaps fetches OpenStreetMap data and renders styled map images using osmnx, matplotlib, shapely, and vsketch.
Overview
prettymaps is a minimal Python library for drawing customized maps built from OpenStreetMap data. It combines osmnx for geodata, matplotlib for styling, shapely for geometry, and vsketch for sketch-like effects.
The plot function accepts layer definitions for which OSM features to pull and style dictionaries for how each layer should look. JSON presets such as default, minimal, macao, and tijuca load predefined combinations. Boundaries can be circles with radius and dilation options; results return geodataframes plus matplotlib figure and axes handles.
After installation you can use it in notebooks, run a Streamlit front end from the project repository, or follow the markdown and marimo tutorials. Google Colaboratory installation is documented with a runtime restart step.
The author discourages using the project for NFT sales and licenses the work under AGPLv3, requiring source disclosure when you distribute modified versions.
Key features
- OpenStreetMap layer fetching
- Matplotlib style per layer
- JSON map presets
- Circular plot boundaries
- Streamlit front end
- Marimo and Colab tutorials
- Hillshade and multiplot examples
Use cases
- Generative cartography art
- Custom city map posters
- Notebook map experiments
- Exploring OSM layers visually