Chapter 13. Visualizing data
This chapter covers
- Making quick plots of vector data using matplotlib
- Plotting raster data with matplotlib
- Creating maps with Mapnik
As you no doubt have noticed, the ability to view your data is essential. While you can use desktop GIS software, such as QGIS, sometimes it’s nice to see your data as you work, without needing to open it up in other software. This is the idea behind the VectorPlotter class in the ospybook module. Other times you might need to create a picture of your data, such as a quick-and-dirty plot to show a colleague, or perhaps a much nicer map to post online or give to a client. This isn’t a book on cartography (which is good, because I’m cartographically challenged), so this chapter will show you the basics of displaying data in a few different ways, but won’t focus on techniques for making the data look pretty. You’ll see how to use both the matplotlib and Mapnik modules to plot your data. If you want something pretty, you’ll want to go with Mapnik, but matplotlib is great for quick visualizations.