Calculating regional statistics

Another classic spatial analysis task is calculating the areas of a certain type within regions, for example, the area within a county that is covered by certain land use types, or the share of different crops that is farmed in given municipalities.

In this recipe, we will calculate statistics of geological data for zip code areas. In particular, we will calculate the total area of each type of rock per zip code area.

Getting ready

To follow this recipe, load zipcodes_wake.shp and geology.shp from our sample data. Additionally, install and activate the Group Stats plugin using Plugin Manager.

How to do it…

Using the following steps, we can calculate the areas of certain rock types per zip code area:

  1. Calculate the intersections ...

Get QGIS: Becoming a GIS Power User now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.