Lesson 7: Green Cover and Built-up Areas¶
Planning question: Where is green space lacking?
Bengaluru, the Garden City, has lost much of its tree cover. You will calculate NDVI and NDBI from Sentinel-2, mask out clouds and summarise green cover for every BBMP ward.
What you will learn¶
- Mask clouds with the scene classification layer
- Calculate NDVI and NDBI
- Rasterize wards and calculate zonal statistics
- Rank the wards by green cover
Key concepts¶
- NDVI: a vegetation index from -1 to 1
- NDBI: a built-up index
- Zonal statistics: summarising pixels within each area
What you will make¶
A ward map of dense green cover, and a list of the least green wards.
| Packages | odc-stac, rioxarray, rasterio, pandas |
| Data | Sentinel-2 L2A, DataMeet BBMP wards |
| Time | 30 to 45 minutes |
Try it yourself¶
The end of the notebook includes these exercises:
- Compare 2019 with 2024.
- Test a different NDVI threshold.
- Look up your own ward.
Enjoying the course? Support it with a star on GitHub.