Maps With Pandas and Folium

Web maps are a well established component of websites and the barrier to serving web maps has been lowered with the introduction of many open datasets and freely available tools. Static web maps are often easily obtained but it is also possible to cutomise your maps to create something more astheticly appealing for your website while displaying your data at the same time.

Python and Folium make it easy to customise and visualise data on an interactive map. Folium utilises the Leaflet.js library to bind data to the map tiles of your choice, including mapbox, openstreetmap and stamen. In as little as three lines of python code you can generate a fully functional html page which can be used on its own or in a iframe as I have below.

I've used the python pandas package to read some mountaian height data for Alaska straight from Wikipedia. After some minor data cleansing, I have created some custom markers colored by height. The result is an interactive map of Alaskan mountain heights. The next step is some field checking.