Reader small image

You're reading from  Mastering Geospatial Analysis with Python

Product typeBook
Published inApr 2018
Reading LevelBeginner
PublisherPackt
ISBN-139781788293334
Edition1st Edition
Languages
Right arrow
Authors (3):
Silas Toms
Silas Toms
author image
Silas Toms

Silas Toms is a long-time geospatial professional and author who has previously published ArcPy and ArcGIS and Mastering Geospatial Analysis with Python. His career highlights include developing the real-time common operational picture used at Super Bowl 50, building geospatial software for autonomous cars, designing computer vision for next-gen insurance, and developing mapping systems for Zillow. He now works at Volta Charging, predicting the future of electric vehicle adoption and electric charging infrastructure.
Read more about Silas Toms

Paul Crickard
Paul Crickard
author image
Paul Crickard

Paul Crickard authored a book on the Leaflet JavaScript module. He has been programming for over 15 years and has focused on GIS and geospatial programming for 7 years. He spent 3 years working as a planner at an architecture firm, where he combined GIS with Building Information Modeling (BIM) and CAD. Currently, he is the CIO at the 2nd Judicial District Attorney's Office in New Mexico.
Read more about Paul Crickard

Eric van Rees
Eric van Rees
author image
Eric van Rees

Eric van Rees was first introduced to Geographical Information Systems (GIS) when studying Human Geography in the Netherlands. For 9 years, he was the editor-in-chief of GeoInformatics, an international GIS, surveying, and mapping publication and a contributing editor of GIS Magazine. During that tenure, he visited many geospatial user conferences, trade fairs, and industry meetings. He focuses on producing technical content, such as software tutorials, tech blogs, and innovative new use cases in the mapping industry.
Read more about Eric van Rees

View More author details
Right arrow

Chapter 15. Automating Cloud Cartography

Mapbox has become synonymous with mobile mapping and data visualizations. In addition to their basemap styling toolset, which has been adopted by app developers and cartographers, they are also producing interesting mapping tools written in Python and JavaScript. 

Combining those two useful languages into one package, Mapbox recently released the new MapboxGL—Jupyter Python module. This new module allows for instant data visualization creation within a Jupyter Notebook environment. Along with the Mapbox Python SDK, a module that allows API access to account services, Python make it easy to add Mapbox tools and services to enterprise geospatial applications. 

In this chapter, we'll learn:

  • How to create a Mapbox account to  generate access tokens
  • How to style a custom basemap
  • Read/write access to cloud data and basemaps
  • How to create a choropleth map 
  • How to create a graduated circle visualization

All things cartographic


Founded in 2010 by Eric Gunderson, Mapbox has expanded rapidly and grown beyond its startup roots to become a leader in the cartographic renaissance. Their MapboxGL JavaScript API is a useful library for creating interactive web maps and data visualizations. They have contributed multiple open mapping specifications, including vector tiles, to the geospatial community.  

With a core focus on providing custom basemap tiles to map and app developers, Mapbox has positioned themselves as the leading software company for web mapping and mobile applications. The two Python modules used in this chapter allow GIS managers and developers to integrate their services and tools into an enterprise geographic information ecosystem.

How to integrate Mapbox into your GIS 

With their JavaScript libraries and the new MapboxGL—Jupyter Python module, Mapbox tools are easier than ever to use. Geospatial developers and programmers can integrate their tools into existing GIS workflows or can...

Mapbox Studio


Creating a custom basemap can be a time-consuming process for even experienced cartographers. To help ease this process, Mapbox engineers have used Open Street Map (OSM) data to generate pre-built custom basemaps that can be used in commercial and non-commercial applications. Using Mapbox Studio, these styles can also be adjusted to add more custom touches. Also, basemaps can be built from the ground up to create a specific look for your application:

To access Mapbox Studio, log into the Account Dashboard and click the Mapbox Studio link. In this Studio environment, you can manage basemaps, tilesets, and datasets.

Customizing a basemap

Click the New Style button and select the Satellite Streets theme:

A quick tutorial explains the customization options. A variety of available layers have been added, and both their labeling and styling can be adjusted by clicking on the layers in the table of contents. New layers can be added as well, including account tilesets:

Map zoom levels,...

Summary


In this chapter, we learned how to use the MapboxGL—Jupyter and Mapbox Python SDK to create data visualizations and to upload data into the Mapbox account. We created point data visualizations, choropleth maps, heat maps, and graduated circle visualizations. We learned how to style a custom basemap, how to add it to an HTML map, and how to add custom tilesets to the basemap. We learned how to use GeoPandas to convert Polygon data into point data, and how to visualize the result. 

In the next chapter, we will explore the use of Python modules and Hadoop to perform geospatial analysis.

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Mastering Geospatial Analysis with Python
Published in: Apr 2018Publisher: PacktISBN-13: 9781788293334
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Authors (3)

author image
Silas Toms

Silas Toms is a long-time geospatial professional and author who has previously published ArcPy and ArcGIS and Mastering Geospatial Analysis with Python. His career highlights include developing the real-time common operational picture used at Super Bowl 50, building geospatial software for autonomous cars, designing computer vision for next-gen insurance, and developing mapping systems for Zillow. He now works at Volta Charging, predicting the future of electric vehicle adoption and electric charging infrastructure.
Read more about Silas Toms

author image
Paul Crickard

Paul Crickard authored a book on the Leaflet JavaScript module. He has been programming for over 15 years and has focused on GIS and geospatial programming for 7 years. He spent 3 years working as a planner at an architecture firm, where he combined GIS with Building Information Modeling (BIM) and CAD. Currently, he is the CIO at the 2nd Judicial District Attorney's Office in New Mexico.
Read more about Paul Crickard

author image
Eric van Rees

Eric van Rees was first introduced to Geographical Information Systems (GIS) when studying Human Geography in the Netherlands. For 9 years, he was the editor-in-chief of GeoInformatics, an international GIS, surveying, and mapping publication and a contributing editor of GIS Magazine. During that tenure, he visited many geospatial user conferences, trade fairs, and industry meetings. He focuses on producing technical content, such as software tutorials, tech blogs, and innovative new use cases in the mapping industry.
Read more about Eric van Rees