Skip to Content
Hands-On Data Visualization
book

Hands-On Data Visualization

by Jack Dougherty, Ilya Ilyankou
April 2021
Beginner to intermediate
471 pages
13h 16m
English
O'Reilly Media, Inc.
Book available
Content preview from Hands-On Data Visualization

Chapter 12. Leaflet Map Templates

In Chapter 7, we described several easy-to-learn drag-and-drop tools, such as Google My Maps and Datawrapper, to create several basic types of interactive maps. If you want to create more customized or advanced maps to stretch beyond the scope of those tool platforms, this chapter offers several code templates based on Leaflet, a powerful open source library for displaying interactive maps on desktop or mobile devices. We first introduced you to Leaflet when you learned how to edit and host code on GitHub in Chapter 10.

All of the Leaflet map templates in this chapter are summarized in Table 12-1. The first two templates are good for beginners, because they pull your map data from a linked Google Sheets table, and don’t require any coding skills, but you need to follow some detailed GitHub instructions. The first template, “Leaflet Maps with Google Sheets” is best for showing any combination of points, polylines, or polygons, with your choice of custom icons and colors, and the option to display a summary table of point data below your map. The second template, “Leaflet Storymaps with Google Sheets”, is best for guiding viewers through a point-by-point tour, with a scrolling narrative to display text, images, audio, video, or scanned map backgrounds. We specifically created both code templates for readers of this book, to fill a gap in maps offered on hosted platforms.

The remainder of the Leaflet templates are designed to improve your coding ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Fundamentals of Data Visualization

Fundamentals of Data Visualization

Claus O. Wilke
Hands-On Exploratory Data Analysis with Python

Hands-On Exploratory Data Analysis with Python

Suresh Kumar Mukhiya, Usman Ahmed

Publisher Resources

ISBN: 9781492085997Errata Page