Geospatial Data Visualization with “matplotlib”

Generating maps from raster data in Python programming

Mahbub Alam
Geek Culture

--

Photo by Brett Zeck on Unsplash

If a picture is worth a thousand words, a map is probably worth many thousands words! A well-designed map is a great storyteller.

For data scientists without geospatial skills, it may seem like a daunting task to make maps. However, if you know Python and have little experience working with matplotlib, with some extra step you can learn to create amazing maps and showcase them in your data science projects.

In this article, I’ll try to get you started with mapping raster images including interactive visualization. Geospatial data comes in various forms — commonly classified into vector (such as polygons, lines and points) and raster (see the graphical representations below). Vector maps are relatively easy to make if you are already familiar with pandas (check out my other article: Geospatial Data Wrangling for Pandas Experts). Raster data visualization can be a bit tricky, but I’ll try to make it easy especially for beginners.

Figure on the left represents a polygon (lake), line segments (river) and points (well locations). The figure on the right represents a raster image (Image source: Wikipedia)

Libraries and Data

--

--

No responses yet