DOI: 10.5281/zenodo.15648812
title: Data and Code Repository - Flood Exposure Assessment in Sub-Saharan African cities

description: This data repository contains the input datasets and derived outputs produced for “Exposed yet unmapped? Evidence of differential flood exposure in deprived urban areas using citizen science.” Metadata files are also included, describing each file. 

Here you can find a Data Repository and a Code Repository, named DataAvailability.zip, with data and scripts used and generated in the article "Exposed yet unmapped? Evidence of differential flood exposure in deprived urban areas using citizen science".  All input and output data are provided and properly described in the medatata files (.txt) in their corresponding folders. 

Input Data:

In the Input folder you can find:



"GADM_Extent": the folder with extent of each city (.shp)

"HydroBASINS_Extent": the folder containing the extent of the hydrological basin of each city (.shp)

"districts": the folder containing the administrative districts of each city (.shp)

"Metadata_DUA_Boundaries": metadata on the sources of delineated deprived urban areas (.txt)

"MyMapsSurvey_Points": tabular information of the flood community survey (.csv)

"Precipitation_Data": tabular precipitation data from TAHMO (.csv)

"readme": metadata file of input datasets (.txt)


Output Data:

In the Output folder you can find:



"grid_CityName": the folder with the 50x50m grid used in the analysis and the GHSL and Flood model processed gridded outputs (.shp and tiff)

"GOB_grid": the folder containing the processed Google Open Building with the built-up ratio metric (gpkg)

"grid_exposure": the folder with all intermediate outputs of the spatial overlay between flood hazard and built-up layers (.shp)

"FloodExposure_Absolute_Relative": tabular data containing the flood exposure outputs of the spatial overlay above and then overlaid with the extent of the deprived urban areas (.csv)

"FloodExposure_Dataset_DUA": tabular data of total relative and total absolute flood exposure counts (.csv)

"MyMaps_Output_v1": tabular data of all flood observation points mapped via community survey using Google my Maps (.csv)

"MyMaps_Impacts_Counts": tabular data with count of standardized impacts reported in the community survey (.csv)

"MyMaps_Impacts_LookUpTable": tabular data with the intermediate step of the thematic analysis (.csv)

"MyMaps_Impacts_Processed": tabular data with the coding of reported impacts (.csv)

"Summary_WorkshopInsights": documentation of workshop insights (.pdf)

"readme": metadata file of output datasets (.txt)


Python Scripts:

In the CodeAvailability folder, we provide a code pipeline with the following purposes:

1_Grid_Creation.ipynb to create of 50x50m (changeable) grid for spatial analysis

- Output Name: 'grid_cityName.shp'- Output Description: 50x50m empty grid for each city

2_GIS_GridProcessing.ipynb to integrate the flood exposure elements (modelled flood hazard output + built-up layers) to the grid

- Intermediate Output Name: 'resampled_raster_proj.tif' + 'GHSL_proj.tif' + 'GOB_grid.gpkg'- Output Name: 'CityInitial_grid_final.shp' and 'merged_data.csv' (all cities combined)- Output Description: 50x50m grid for each area filled with values from modelled flood hazard output and two built-up layers (GOB and GHSL) for each city

3_ProcessingExposure.ipynb to process the resulting flood exposure dataset above, including clean up, analyse the outputs, define built-up density thresholds, and calculate relative and absolute flood exposure

- Output Name: 'FloodExposure_Dataset.csv' and 'FloodExposure_Absolute_Relative.xlsx'- Output Description: clean up data with all cities and relative and absolute flood exposure table for each built-up layer

4_DUA_Analysis.ipynbto analyse the differences between DUAs and non-DUAs in each built-up dataset at city scale 

- Output Name: visulization of flood exposure by city and built-up category- Output Description: analysis of the differences between DUAs and non-DUAs in each built-up dataset at city scale

5_ThematicAnalysis_CommunityData.ipynb to run the thematic analysis of reported flood impacts (from community survey) and to compute a hit-and-miss evaluation comparing the modelled and observed (surveyed) flood points at community level

- Intermediate Output Name: 'MyMaps_Output_v1.csv' + 'MyMaps_Impacts_Processed.csv' + 'MyMaps_Impacts_LookUpTable.csv' + 'MyMaps_Impacts_Counts.csv' - Output Name: 'MyMaps_Impacts_Processed' + visualization of the thematic analysis and the hit-and-miss evaluation plot- Output Description: Coding process with intermediate output tables, visualization of thematic analysis of reported flood impacts and hit-and-miss evaluation comparing the modelled and observed (surveyed) flood points at community level

Requirements



Python

Jupyter Notebook

Required libraries are described in each script - make sure they are properly installed locally 


Usage

The scripts are not fully automated but the replicability and transferability to other areas is possible. For replicability, after unzipping the folder and allocating in your desired path, update the paths in the code. For transferability, all input layers are openly available for any other city of the globe*. After downloading the input and running the FastFlood model in the platform Fast Flood App , the file paths should be updated and the code should run smoothly: data layers are projected, data columns are consistently named and have consistent data types. 

*Precipitation data might take some time to acquire. It is dependant of the TAHMO data portal personnel.