Lagos State Flood Forecast: Insights from year 2020 to 2024)

UWAH SALOMEUWAH SALOME
3 min read

Introduction

This report documents the development of a flood prediction model for Lagos State, Nigeria, using Python. The model uses historical weather data to predict the future occurrence of floods. The prediction system identifies dates when the likelihood of flooding is high, assisting in proactive disaster management and response. The Nigerian Meteorological Agency (NiMet) predicted high flood risk for Lagos between April and November 2024 and the first of its kind for the year 2024 happens have occurred within this window being July 4, 2024. According to the World Meteorological Organization (WMO), floods are without doubt the most devastating natural disasters striking numerous regions in the world each year. Since the last decade, the trend in flood damages in Lagos state has been growing exponentially.

Lagos Vulnerability

Lagos is susceptible to flooding due to:

Low Elevation: The city averages only 1.5 meters above the sea level.

Heavy Rainfall: Increased precipitation due to climate change can overwhelm drainage systems.

Coastal Location: Rising sea levels and lagoon levels can lead to coastal flooding.

Data Overview

Two datasets were used in this project:

    1. Weather Data: Contains weather parameters such as temperature, humidity, precipitation, wind speed, and others from the year 2020 to 2024. Source: https://www.visualcrossing.com/weather/weather-data-services.

      1. Flood Occurrence Data: Provides information on dates when floods will occur as forecasted by Nigerian Meteorological Agency (NiMet). Source: https://nimet.gov.ng/.https://docs.google.com/spreadsheets/d/1qNzalFUV8NazsNjzkP_UL16Vv7j 1ZGKc/edit?usp=sharing&ouid=105103674238840197464&rtpof=true&sd= true

https://docs.google.com/spreadsheets/d/1cxNoFdtrnpw7jAQd4SwBcSHusc2yQ88-

Data Preprocessing

The preprocessing steps included:

a. Handling missing values and dropping unnecessary columns

b. Converting date-time columns to datetime datatype, extracting the year, month, and day Merging the weather data with flood occurrence data based on the datetime column.

c. Creating a binary target variable for the flood prediction.

First, all the necessary libraries are imported, Pandas, numpy, matplotlib, seaborn, label encoder etc. Then load the datasets, drop columns and filter the dataset to check for missing values.

Feature Selection and Model Selection

After merging the two datasets by datetime column, columns with relevant features for the flood prediction were selected;

A Random Forest Classifier was used to develop the flood prediction model. The dataset was split into training and testing sets to evaluate the model's performance. The model was trained on the training set and evaluated on the testing set. using the flood_likelihood_occurence field as the target variable. The model's performance was evaluated using confusion matrix, and classification report. The results indicated that the model performed well in predicting flood occurrences.

Predictions

The model predicted that the next flood occurrence would be on the 9th, 10th, or 11th of July 2024.

Visualization

Conclusion and Recommendations

This flood prediction model for Lagos State was successfully developed using historical weather data and flood occurrence records. The model provides valuable predictions for future flood occurrences, aiding in disaster preparedness and response. The prediction for the next flood occurrence is on the 9th, 10th, or 11th of July 2024. This is as a result of the following: the humidity of these days fall within the range of the average humidity of days in which flooding occurred in the past. The Sea Level Pressure of the predicted days are forecasted to be higher than the average sea level of days in the past where flooding occurred. Recommendation for further analysis, other factors that contribute to flooding events in Lagos state could be considered such as dam opening, Living in swamp areas, anthropogenic activities, poor environmental planning, deforestation etc. Future improvements to this model would be to incorporate more detailed weather data, use additional machine learning techniques for better accuracy and extend the model to predict flood severity.

0
Subscribe to my newsletter

Read articles from UWAH SALOME directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

UWAH SALOME
UWAH SALOME

I'm a skilled data analyst with expertise in Excel, Python, SPSS, and PowerBi. With over 4 year of experience, I’ve worked on projects that transformed raw data into actionable insights, driving business improvements. I excel at presenting complex data in clear, compelling ways to support decision-making. My ability to align data analysis with business goals, combined with my commitment to continuous learning, makes me a valuable asset to any team. https://t.ly/6EuYJ https://www.linkedin.com/in/uwah-salome