prettymaps: Create Stunning Custom Maps from OpenStreetMap
April 08, 2026
Category:
Practical Open Source Projects
prettymaps: Transform OpenStreetMap Data into Beautiful Custom Maps
One-Line Map Magic
Creating stunning maps has never been easier. With prettymaps, you can generate publication-ready maps with a single line of code:
import prettymaps
prettymaps.plot('Stad van de Zon, Heerhugowaard, Netherlands')
That's it! The library automatically fetches OpenStreetMap data and renders beautiful maps featuring streets, buildings, water bodies, forests, and more.
Key Features
- 10+ Built-in Presets: From minimalist to detailed artistic styles
- Full Customization: Control layers, colors, widths, and styling
- Multiple Input Types: Addresses, coordinates, or custom GeoDataFrames
- Plotter Mode: Export SVG files for pen plotters
- Multiplot Support: Combine multiple regions on one canvas
- Hillshade & Keypoints: Advanced terrain and landmark visualization
Quick Installation
pip install prettymaps
Or use Google Colab:
!pip install -e "git+https://github.com/marceloprates/prettymaps#egg=prettymaps"
Popular Presets
# List all available presets
prettymaps.presets()
# Use a specific preset
prettymaps.plot('Porto Alegre', preset='minimal')
Available presets: default, minimal, macao, tijuca, barcelona, heerhugowaard, and more.
Advanced Customization
prettymaps.plot(
'PraΓ§a Ferreira do Amaral, Macau',
circle=True,
radius=1100,
layers={
'building': {'tags': {'building': True}},
'water': {'tags': {'natural': ['water', 'bay']}},
'green': {'tags': {'landuse': 'grass', 'leisure': 'park'}},
},
style={
'background': {'fc': '#F2F4CB'},
'building': {'palette': ['#FFC857', '#E9724C', '#C5283D']}
}
)
Real-World Applications
- Urban Planning: Visualize neighborhood layouts and infrastructure
- Generative Art: Create unique map-based artwork
- Data Analysis: Overlay custom data on geospatial context
- Presentations: Professional maps for reports and publications
- Plotter Art: Export for CNC pen plotters
Access Raw GeoDataFrames
plot = prettymaps.plot('Porto Alegre', show=False)
buildings = plot.geodataframes['building']
# Analyze 2,400+ building footprints with full OSM attributes
Why prettymaps Stands Out
- 12.2K GitHub Stars - Proven community adoption
- Hacker News Featured - Industry recognition
- AGPL-3.0 License - Commercial use allowed with source disclosure
- Streamlit Frontend - Interactive web interface
- Active Development - Regular updates and new features
Get Started Today
Install prettymaps and start creating beautiful maps in minutes. Whether you're a data scientist, cartographer, or generative artist, prettymaps delivers professional results with minimal code.
Live Demo: Google Colab
Note: Always credit OpenStreetMap and the prettymaps repository per license requirements.
Original Article:
View Original