From the course: Geospatial Raster Data Analytics in Python
Unlock this course with a free trial
Join today to access over 25,300 courses taught by industry experts.
Visualize real-world raster data - Python Tutorial
From the course: Geospatial Raster Data Analytics in Python
Visualize real-world raster data
- [Instructor] One of the most essential features of spatial data is its clear and straightforward visuality maps. Hence, in this lecture, we will learn how to visualize the previously introduced, population raster data using Python. First, we start by importing a few libraries, rasterio for starters and for visualization, the show function of rasterio as well as matplotlib. We are going to work with the previously cleaved raster file, which contains population data within the bounding box of Europe. So first, let's define the name of the file and then read the file using the usual method and store its values in the out image variable. Remember, this is a single band raster file. Now let's create our first visualization using matplotlib. For that, we'll use a canvas size of 10 times six inches and the built-in imshow command of matplotlib designed to visualize grid data. Additionally, we'll label the axis and the plot and use a color map, containing the different shades of purple…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.