Skip to Content
Mastering Geospatial Analysis with Python
book

Mastering Geospatial Analysis with Python

by Silas Toms, Paul Crickard, Eric van Rees
April 2018
Beginner to intermediate content levelBeginner to intermediate
440 pages
11h 36m
English
Packt Publishing
Content preview from Mastering Geospatial Analysis with Python

Automatically setting colors, sizes, and breaks

Instead of manually setting the colors, radius sizes, and breaks, MapboxGL—Jupyter includes utilites (such as create_color_stops) that create a match between colors (or sizes) and break values. The color schema is set by passing the YlOrRd keyword ( which means Yellow Orange Red). Also, we can adjust the basemap using another pre-set style or our own custom styles by setting the visualization style to the style URL:

measure_color = 'Percent Male'color_breaks = [round(tract_points[measure_color].quantile(q=x*0.1),3) for x in range(1, 11,3)]color_stops = create_color_stops(color_breaks, colors='YlOrRd')measure_radius = 'Total Population'radius_breaks = [round(tract_points[measure_radius].quantile(q=x*0.1),1) ...
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

Learning Geospatial Analysis with Python

Learning Geospatial Analysis with Python

Joel Lawhead

Publisher Resources

ISBN: 9781788293334Supplemental Content