In [3]:
# Instructions for Google Colab:
# 1. Uncomment the following line
# 2. Run it
# 3. Restart runtime (Runtime -> Restart runtime)
# 4. Comment it again
#!pip install -e "git+https://github.com/marceloprates/prettymaps#egg=prettymaps"

prettymaps

A minimal Python library to draw customized maps from OpenStreetMap created using the osmnx, matplotlib, shapely and vsketch packages.

This work is licensed under a GNU Affero General Public License v3.0 (you can make commercial use, distribute and modify this project, but must disclose the source code with the license and copyright notice)

Note about crediting and NFTs:

  • Please keep the printed message on the figures crediting my repository and OpenStreetMap (mandatory by their license).
  • I am personally against NFTs for their environmental impact, the fact that they're a giant money-laundering pyramid scheme and the structural incentives they create for theft in the open source and generative art communities.
  • I do not authorize in any way this project to be used for selling NFTs, although I cannot legally enforce it. Respect the creator.
  • The AeternaCivitas and geoartnft projects have used this work to sell NFTs and refused to credit it. See how they reacted after being exposed: AeternaCivitas, geoartnft.
  • I have closed my other generative art projects on Github and won't be sharing new ones as open source to protect me from the NFT community.

Buy Me a Coffee at ko-fi.com

As seen on Hacker News:

prettymaps subreddit

Google Colaboratory Demo

Installation

OBS. I'm trying to solve a dependency issue with vsketch before publishing prettymaps v0.1.3, so, for now, please install directly from GitHub.

Install locally:

Install prettymaps with:

pip install git+https://github.com/marceloprates/prettymaps

Install on Google Colaboratory:

Install prettymaps with:

!pip install -e "git+https://github.com/marceloprates/prettymaps#egg=prettymaps"

Then restart the runtime (Runtime -> Restart Runtime) before importing prettymaps

Tutorial

Plotting with prettymaps is very simple. Run:

prettymaps.plot(your_query)

your_query can be:

  1. An address (Example: "Porto Alegre"),
  2. Latitude / Longitude coordinates (Example: (-30.0324999, -51.2303767))
  3. A custom boundary in GeoDataFrame format
In [1]:
import prettymaps

plot = prettymaps.plot('Stad van de Zon, Heerhugowaard, Netherlands')