A Simple Python Leaflet Map
Here’s a simple example of the kind of map that is possible in Leaflet (taken from a post of mine). This example has a base layer of an OpenStreetMap map centred on Colchester in the UK. Overlaid on the map are some markers, which when you click on them reveal a label indicating the location of the marker (in this case public toilets).
Find out more about this map, and download the python code here.
How to Install Folium
For a full install guide visit the Folium docs, but to get you going you can just run
$ pip install folium
Creating a map is then simple:
import folium map_osm = folium.Map(location=[45.5236, -122.6750]) map_osm.save('london.html')
which saves a map that looks a bit like this:
Visit the Folium Getting Started guide for more tips to get you going.
Folium is still very much under development, so also check out the project’s github page for more updates and information.