Published on 6.6.2024

Planning for rainy days: optimizing school calendars with precipitation data and QGIS

Every now and then, we get to collaborate with IIEP,  UNESCO’s International Institute for Educational Planning. This time we were introduced to the effects of rainfall on learning outcomes and school attendance in Sub-Saharan Africa. 

Overview of the project

The heavy rains affect school goers in many ways. One might not be able to get to the school, or the school building might suffer from flooding, or the rain might cause so much noise it is impossible to teach and learn inside. The background research is available here.

The school calendars are largely shared within and across countries, and might have very little variations since colonial times. So no wonder the school calendars don’t take local conditions into account. However, considering local conditions like the weather or agricultural cycle in planning the school calendars could help increase the attendance rate during the school year and thus result in better learning outcomes. 

Our friends at IIEP-UNESCO are running a project that aims to provide policy advice to governments in educational planning and to support the implementation of locally adjusted school calendars.  We were happy to join in as we were tasked to find ways to analyze precipitation data in order to find time periods uninterrupted by heavy rain, and thus more suitable for the school calendar.

The school calendar plugin 

We created algorithms in the QGIS Processing framework for processing the precipitation data and visualizing the results. As an end result a total of four processing algorithms were packaged together to create a QGIS plugin to accomplish the following:

  1. to download precipitation data from Google Earth Engine
  2. to calculate the daily means for precipitation
  3. to find time periods uninterrupted by heavy rainfalls
  4. to visualize the precipitation data and time periods as a calendar heatmap
school calendar
The algorithms show in the Processing Toolbox in QGIS

Precipitation data download

The obvious first step is downloading the data. The plugin uses precipitation data gathered by the Global Precipitation Measurement (GPM) international satellite mission and distributed by Google Earth Engine (GEE). The download needs to be done only once, as long as the data is downloaded from a larger area you are interested in (the whole of Africa in our case). Then the analysis can be run as many times as needed for subsections of the larger area and with different parameters. The data is reduced from half-hourly or hourly data to a daily sum in GEE and one raster is downloaded for each day in the given time period. 

Daily mean analysis

After the data is downloaded the next step is to select what area you want to use. The algorithm allows you to use any polygon layer to select the area you want to analyze, and thus makes it possible to analyze e.g. any administrative borders. The algorithm calculates the daily mean of precipitation in the given area. If the data is from several years, one might be interested in looking into each year separately or looking into an average year in order to avoid making long term decisions based on fluctuations of a single year.  As a result this second algorithm creates two output layers – one for daily means and one for average year daily means. 

Uninterrupted period analysis

Now that the data is downloaded and prepared it is time for the actual task in hand: to look for the optimal uninterrupted time frame for the school calendar. As an input layer for this third algorithm either output layer from the previous algorithm can be used. There are several parameters to set as per your preferences (what the threshold is for too much rain and whether  you want to allow a certain number of days to exceed this threshold without breaking the time period). As an output, a new layer is created where the start and end date of each uninterrupted period are saved as attributes.

school calendar
Example of the output file of uninterrupted period analysis

Create calendar heatmap

Finally, we can visualize the results. The fourth algorithm takes in output layers from the previous two algorithms (you can also visualize just the mean precipitation without the uninterrupted period) and creates a calendar heatmap. The calendar view shows clearly the patterns of rainy days in the chosen area, and visualizes the uninterrupted period suitable for a school year on top of that. 

school calendar
The calendar heatmap visualizes the longest uninterrupted time periods and precipitation data

Flexible and efficient tool!

The tool is rather flexible as it is possible to choose whatever area you want or need for the analysis, and set parameters to your liking as well. It is also efficient in handling data. It also supports running a batch process allowing for efficient inspection of several areas or parameters at the same time. 

We hope this tool will help create school calendars that are more accommodating to local climatic factors.

Do you want to hear more about this project? We will be presenting at FOSS4G Europe in Tartu in July!

Profiilikuva

Meri Malmari

Meri is M.Sc. (economics and business administration) having majored in economic geography her interests lie in urban development, consumers and retail, all of which have spatial aspect that can be shown on a map. Relevant and precise (spatial) information is something Meri finds intriguing.