This is a summer internship project supported and provided by SnooCODE. The project is under the joint leadership of Sesinam Dagadu (MEng, info@snoocode.com) from SnooCODE and Yves Plancherel(PhD, y.plancherel@imperial.ac.uk) from Imperial College London. Additionally, my colleague Wenxin Ran(wenxin.ran22@imperial.ac.uk) has been assigned to work on this topic as well. She has been a great co-operator and supporter of this project in the use of Geographic Information System (GIS) for specific geographic data processing and acquisition. For more details on this part, visit her github page and contact her by email.
This research emphasises the development of a machine learning-based methodology for predicting the probability of flood occurrences in the Ghanaian region. Intended to offer valuable insights for urban planners, emergency response teams, and residents, this approach seeks to alleviate and manage the recurrent severe flooding challenges in Ghana. By amalgamating rainfall data, geospatial information, machine learning models (ML), and Geographic Information Systems (GIS), the methodology produces flood probability maps tailored for specific target areas within Ghana. Comprehensive evaluations and analyses of the model were conducted, with experimental outcomes suggesting that the final model provides prescriptive recommendations, instrumental in curtailing the potential impact areas of floods. Additionally, throughout the modelling process, data from various platforms were collated, culminating in a flood dataset apt for machine learning modelling. This dataset offers convenience for future flood studies in Ghana. In essence, this foundational research in flood prediction furnishes the field with fresh avenues for further exploration.
The running and development of this project are carried out in google colab, so it is also recommended to use google colab to run, in order to avoid some unnecessary development environment compatibility issues.
But if you don't want to use google colab, then: To install pre-requisites, from the base directory run:
pip install -r requirements.txt
pip install -e .
In order to give the user a detailed guide to the project, this section describes in detail the contents of each folder, and how to use them.
-
Folder1 "data": This contains all the data used in all phases of the project, including all aspects of modelling, application and so on. All these data can be retrieved and generated by the code in the "source code" folder such as "prepare_modelling_data_part1.ipynb", "prepare_modeling_data_part2.ipynb" and "prepare_model_application_data.ipynb".
-
Folder2 "info": This contains all the basic information of the project.
-
Folder3 "reports": This contains all the docs of the project, including project plan, final project report and presentation slides. In order to make it easier for users to read, there is also an extra folder ("final-report figures") where all the figures are stored, so all the figures used in the final-report can be viewed in this "final-report figures" folder individually.
-
Folder4 "reslts": This contains all the results (predicted flood maps, evaluation of the model and interactive flood map) produced in all phases of the project, including all aspects of modelling, application and so on. All these results can be retrieved and generated by the code in the "source code" folder such as "modeling.ipynb", "application.ipynb" and "flood_geemap_visualisation_tool.ipynb".
-
Folder5 "saved_models": All models saved during the modelling phase are stored in this folder.
-
Folder6 "source code": All source code involved in the project is stored in this folder. Each jupyter notebook file corresponds to a specific stage in the project. It is recommended to read and view them in this order:
- "prepare_modelling_data_part1.ipynb" ->
- "prepare_modelling_data_part2.ipynb" ->
- "modelling. ipynb" ->
- "prepare_model_application_data.ipynb" ->
- "application.ipynb" ->
- "flood_geemap_visualisation_tool.ipynb" ->
- "Export_requirements _txt.ipynb".
In addition to this, some of the necessary functions are packaged in the "source code/tools" folder, and the jupyter notebook code above will call these tools when necessary. The corresponding "source code/tests" folder contains the necessary test code, which mainly tests the corresponding functions of "source code/tools".
Warning: This project uses Google Earth Engine (GEE), please make sure you have the appropriate permissions to access GEE so that you can run the project code properly. In addition, it is highly recommended to use google colab to run all corresponding jupyter notebook files, and make sure to change the file paths to fit your environment. Also, there is a map "interactive_gee_flood_map.html" stored in folder4 "reslts", this map may not be readable due to browser or system issues, so it is strongly recommended to run "source code/flood_geemap_visualisation_tool.ipynb" to regenerate the map and view it as necessary.
MIT License
Copyright (c) [2023] [Chaofan Wu]
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.