Skip to content

realgoodresearch/Gaza_spatial_vulnerability

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gaza_spatial_vulnerability

Quantifying and mapping population exposure to risks in Gaza

This repository contains the R workflows used to build the Gaza spatial geodatabase and related analytical outputs. The current focus is Output 1: a GeoPackage-based geodatabase that combines gridded population estimates, UNOSAT layers, and OCHA reference layers. All required inputs are first copied into the local wd/in tree so the analysis scripts do not depend on mutable source paths.

Repository layout

  • src/00_stage_inputs.R: stages only the required input files into wd/in and refreshes that curated manifest
  • src/10_geodatabase.R: builds the geodatabase GeoPackage
  • src/10_helpers.R: shared helper functions for the geodatabase workflow
  • src/20_flood_affected.R: example (draft) downstream analysis for flood-affected population summaries
  • required.R: R package installation helper
  • required.sh: Linux system dependency helper
  • example_env: template for the local .env file
  • LICENSE: GPL-3 license text

Current geodatabase contents

The main geodatabase build script assembles a single GeoPackage containing:

  • NowPop rasters for multiple dates
  • UNOSAT tent mapping point layers
  • UNOSAT damage, flood risk, and storm surge layers
  • OCHA governorate, municipality, neighbourhood, and exclusion zone layers
  • A data_catalogue layer with metadata for each delivered layer

Setup

  1. Create a local .env file based on example_env and set wd to a working directory on your machine.
  2. Run src/00_stage_inputs.R to copy the required source data into file.path(wd, "in"). The script only stages the files needed by the geodatabase build.
  3. Install R packages from required.R and the system libraries listed in required.sh.

A typical workflow is:

source("required.R")

and, on Linux, install the system packages listed in required.sh before running the scripts.

Running the geodatabase build

Run src/10_geodatabase.R to build the deliverable GeoPackage. The script writes the output to:

  • out/geodatabase/gaza_geodatabase.gpkg

The script starts from a clean output file each time it runs and reads only from the staged wd/in tree.

Naming and metadata conventions

  • Layer names are source-first, for example unocha_..., unosat_..., and realgood_....
  • The local input tree is organized by source under wd/in (for example NowPop, Gazatents, OCHA, and UNOSAT) and is refreshed from a manifest of required files.
  • Catalogue rows record layer_name, reference_date, data_type, source, sensitivity_classification, classification_scheme, and source_url.
  • Raster layers are written as GeoPackage raster subdatasets with a float32 data type and a fixed no-data value.

Downstream analysis

src/20_flood_affected.R shows the next-stage workflow for extracting totals and ratios from gridded population and shelter surfaces over administrative boundaries. It is not part of the geodatabase build itself, but it uses the same local data conventions.

License

Copyright (c) 2026 Real Good Research Ltd.

This project is licensed under the GNU General Public License v3.0. See LICENSE.

About

Quantifying and mapping population exposure to risks in Gaza

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors