Exercise 3: Identifying Affected Health Facilities and Schools – Aina Adds More Layers#

Characteristics of the exercise#

Type of trainings exercise:

  • This exercise can be used in online and presence training.

  • It can be done as a follow-along exercise or individually as a self-study.

Exercise Track:

This exercise is part of the Madagascar Anticipatory Action Cyclon Analysis Exercise Track

Estimated time demand for the exercise

Aim of the exercise: Aina, the GIS expert at the Malagasy Red Cross (CRM), is preparing for the upcoming cyclone season. She wants to improve her team’s ability to act quickly once a storm is forecasted by automating key analyses in QGIS. These include estimating exposed populations, identifying impacted services like health and education, and assessing whether health posts can be reached from key warehouses within a critical 10-hour window. The goal is to prepare an end-to-end analysis and visualization workflow that can support fast, data-driven anticipatory action before a cyclone makes landfall.

Instructions for the trainers#

Trainers Corner

Prepare the training

  • Take the time to familiarise yourself with the exercise and the provided material.

  • Prepare a white-board. It can be either a physical whiteboard, a flip-chart, or a digital whiteboard (e.g. Miro board) where the participants can add their findings and questions.

  • Before starting the exercise, make sure everybody has installed QGIS and has downloaded and unzipped the data folder.

  • Check out How to do trainings? for some general tips on training conduction

Conduct the training

Introduction:

  • Introduce the idea and aim of the exercise.

  • Provide the download link and make sure everybody has unzipped the folder before beginning the tasks.

Follow-along:

  • Show and explain each step yourself at least twice and slow enough so everybody can see what you are doing, and follow along in their own QGIS-project.

  • Make sure that everybody is following along and doing the steps themselves by periodically asking if anybody needs help or if everybody is still following.

  • Be open and patient to every question or problem that might come up. Your participants are essentially multitasking by paying attention to your instructions and orienting themselves in their own QGIS-project.

Wrap up:

  • Leave time for any issues or questions concerning the tasks at the end of the exercise.

  • Leave some time for open questions.

Available data#

Download all datasets here, save the folder on your computer and unzip the file.

Context#

After building her model to estimate exposed population, Aina wants to expand its usefulness. She decides to also identify critical services affected by cyclones — especially health facilities and schools.

Not only does she want to know which facilities are affected, but also how many in total exist per district. That way, she can calculate the percentage of services affected in each area.

To achieve this, she will use two point datasets from OpenStreetMap:

Tasks:#

  1. Load the health and education facilities datasets First, let’s have a look at the data we want to work with.

  • Navigate to your input data folder.

  • Drag and drop the following layers into your QGIS project:

    • hotosm_mdg_health_facilities

    • hotosm_mdg_education_facilities

  • Confirm that both layers are visible in the Layers Panel

  1. Save your model under a new name

    • Open your existing model Estimate_Exposed_Population.model3.

    • Immediately save it under a new name:

      • Click Model → Save As…

      • Save it to the project folder as:

Estimate_Exposed_Population_Health_Education
  1. Add new model inputs

    • In the Inputs section, add:

      • Vector Layer

        • Description:

        Health Facilities
        
        • Set Geometry Type to Point

      • Vector Layer

        • Description:

        Education Facilities
        
        • Set Geometry Type to Point

../../_images/fr_MDG_AA_model_input_health_facilities.PNG

Définir une nouvelle entrée de modèle : couche vectorielle de points représentant les établissements de santé#

../../_images/fr_MDG_AA_model_input_education_facilities.PNG

Définir une nouvelle entrée de modèle : couche vectorielle de points représentant les établissements d’éducation#

  1. Count All Health Facilities per Admin 2

    • From the Algorithms panel, search for Count Points in Polygon.

    • Configuration:

      • Add a description: Comptez le nombre d'Ă©tablissements de santĂ© dans chaque district.

      • Polygon layer: Admin Boundaries (Model Input)

      • Points layer: Health Facilities (Model Input)

      • Count field name:

      Count_health_total
      
      • Leave output as Model Output

../../_images/fr_MDG_AA_model_count_points_HF_admin2.PNG

Configuration de l’opération : compter le nombre d’établissements de santé dans chaque district.#

  1. Count All Education Facilities per Admin 2

    • Add another Count Points in Polygon step.

    • Configuration:

      • Add a description: Comptez le nombre d'Ă©tablissements de education dans chaque district

      • Polygon layer: Admin Boundaries (Model Input)

      • Points layer: Education Facilities (Model Input)

      • Count field name:

      count_education_total
      
      • Leave output as Model Output

../../_images/fr_MDG_AA_model_count_points_EF_admin2.PNG

Configuration de l’opération : compter le nombre d’établissements scolaires dans chaque district.#

  1. Intersect Health Facilities with Cyclone Buffer

    • From the Algorithms panel, search for Intersection.

    • In the configuration window:

    • Add a description:

      Établissements de santé dans la zone d'impact du cyclone
      
      • Input layer: Health Facilities (Model Input)

      • Overlay layer: buffered cyclone zone (use “Reprojected to EPSG:4326” from Algorithm Output)

      • Leave output as Model Output

    • Click OK

../../_images/fr_MDG_AA_model_clip_intersect_HF_cyclone_buffer.PNG

Configuration de l’opération : intersecter les établissements de santé avec la zone d’impact du cyclone.#

  1. Intersect Education Facilities with Cyclone Buffer

    • Add another Intersection algorithm.

    • Configuration:

      • Add a description:

        Établissements de education dans la zone d'impact du cyclone.
        
      • Input layer: Education Facilities (Model Input)

      • Overlay layer: buffered cyclone zone (use “Reprojected to EPSG:4326” from Algorithm Output)

      • Leave output as Model Output

    • Click OK

../../_images/fr_MDG_AA_model_clip_intersect_EF_cyclone_buffer.PNG

Configuration de l’opération : intersecter les établissements de education avec la zone d’impact du cyclone.#

  1. Count Affected Health Facilities per Admin 2

    • Add Count Points in Polygon

    • Add a description: Compter les Ă©tablissements de santĂ© touchĂ©s par district

    • Configuration:

      • Add a description: Compter les Ă©tablissements de santĂ© touchĂ©s par district

        Compter les établissements de santé touchés par district
        
      • Polygon layer: Count total health facilities output

      • Points layer: intersected health facilities output

      • Count field name:

        sum_exposed_health
        
../../_images/fr_MDG_AA_model_count_points_HF_affected_admin2.PNG

Configuration de l’opération : compter les établissements de santé touchés par district.#

  1. Count Affected Education Facilities per Admin 2

    • Add Count Points in Polygon

    • Add a description: Compter les Ă©tablissements education touchĂ©s par district

    • Configuration:

      • Add a description:

        Compter les établissements education touchés par district
        
      • Polygon layer: Count total education facilities output

      • Points layer: intersected education facilities output

      • Count field name:

        sum_exposed_education
        
../../_images/fr_MDG_AA_model_count_points_EF_affected_admin2.PNG

Configuration de l’opération : compter les établissements de santé touchés par district.#

  1. Calculate percentage of affected Health Facilities To compute the percentage of affected health sites per administrative area, we will use the Field Calculator:

  • Add the Field Calculator:

    • Add a description: Calculer le pourcentage d’établissements de santĂ© touchĂ©s par district

    • Configuration:

      • Add a description:

        Calculer le pourcentage d’établissements de santé touchés par district
        
    • Input layer: the output of Count Affected Health Facilities per Admin 2

    • Output field name:

      pct_exposed_health
      
    • Field type: Decimal (real)

    • Expression:

     CASE WHEN "count_health_total" > 0
     THEN "sum_exposed_health" / "count_health_total" * 100
     ELSE 0
     END
    
    • Set the output as Model Output

    • Name it:

    admin2_health_affected
    
../../_images/fr_MDG_AA_model_field_calc_pct_health_exposed.PNG

Configuration de l’opération : calculer le pourcentage d’établissements de santé touchés par district.#

  1. Calculate percentage of affected Education Facilities To compute the percentage of affected education sites per administrative area, we will use the Field Calculator:

  • Add the Field Calculator:

    • Add a description: Calculer le pourcentage d’établissements d’éducation touchĂ©s par district

    • Configuration:

      • Add a description:

        Calculer le pourcentage d’établissements d’éducation touchés par district
        
      • Input layer: the output of Count Affected Education Facilities per Admin 2

      • Output field name:

        pct_exposed_education
        
      • Field type: Decimal (real)

      • Expression:

        CASE WHEN "count_education_total" > 0
        THEN "sum_exposed_education_POI" / "count_education_total" * 100
        ELSE 0
        END
        
    • Set the output as Model Output

    • Name it:

      admin2_education_affected
      
../../_images/fr_MDG_AA_model_field_calc_pct_education_exposed.PNG

Configuration de l’opération : calculer le pourcentage d’établissements d’éducation touchés par district.#

  1. Validate and Save Your Extended Model

  • Click the ✔️ Validate Model button to check for errors.

  • Save again to:
    Estimate_Exposed_Population_Health_Education.model3

  1. Run the model

  • Click the ▶️ Run button in the top-right corner of the Graphical Modeler window.

  • Input:

    • Click on the three dots for each input dataset and select the correct input:

      • Cyclone Track → select the GeoJSON of the storm path (e.g. Harald_2025_Track.geojson)

      • Population Raster → select the WorldPop raster file

      • Admin Boundaries → select the Admin 2 layer (e.g. MDG_adm2.gpkg)

      • Health Facilities → select the point dataset for health sites

      • Education Facilities → select the point dataset for schools

  • Output:

    • Save all output layers in the output folder and use the names below.

      • admin2_health_affacted ->

      admin2_health_affected
      
      • admin2_education_affected ->

      admin2_education_affected
      
      • cyclone_harald_buffer ->

      cyclone_harald_buffer
      
      • exposed_population_sum ->

      admin2_harald_Exposed_Population
      
  • Click Run to execute the full model.

../../_images/fr_MDG_AA_intermediate_result_model_algorythms_task3_exposed_HF_EF_model.PNG

Vue d’ensemble du Modèle Graphique de la tâche 3 montrant tous les algorithmes connectés et les sorties définies.#

../../_images/fr_MDG_AA_intermediate_result_model_algorythms_task3_exposed_HF_EF_run_configurations.PNG

Configuration des paramètres pour exécuter le modèle de la tâche 3 avec toutes les couches d’entrée requises.#

../../_images/fr_MDG_AA_intermediate_result_model_algorythms_task3_exposed_HF_EF_model_results_AT.PNG

Résultats du modèle de la tâche 3 affichés dans QGIS, y compris les pourcentages d’établissements de santé et d’éducation touchés par district.#