From the course: Geospatial Raster Data Analytics in Python

Unlock this course with a free trial

Join today to access over 24,700 courses taught by industry experts.

Zonal statistics on raster data

Zonal statistics on raster data

- [Instructor] Zonal statistics on raster data means computing various statistics, such as mean and sum of pixel values over a specific geometry. This is a very helpful methodology to aggregate and compare various parts of larger raster files. Here, maybe we'll illustrate this widely used methodology by first reading a country level map of Europe, and then adopting the previously learned clipping methodology to carve out corresponding raster sections for each European country and then compute their overall population levels. As for the country-level boundaries, we will rely on the previously introduced natural earth data source which we have described in the data acquisition video earlier. First, let's import the libraries we values to DV director data, country boundaries, geopandas, and matplotlib. Now, also read the raster processing libraries we will use. Now, let's load the data file containing the global country boundaries into a geo data frame. We will call this geodata frame…

Contents