Skip to content

Predict the level of damage to buildings caused by earthquakes.

License

Notifications You must be signed in to change notification settings

carecodeconnect/richters-predictor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Richter's Predictor: Modeling Earthquake Damage

Predict the level of damage to buildings caused by earthquakes.

Damage from 2015 Gorkha earthquake in Nepal

Based on aspects of building location and construction, this project predicts the level of damage to buildings caused by the 2015 Gorkha earthquake in Nepal.

Demo

TODO

Dataset

This project uses data provided by DrivenData. The data was collected through surveys by Kathmandu Living Labs and the Central Bureau of Statistics, which works under the National Planning Commission Secretariat of Nepal. This survey is one of the largest post-disaster datasets ever collected, containing valuable information on earthquake impacts, household conditions, and socio-economic-demographic statistics.

Exploratory Data Analysis

Here we some insights from our exploratory data analysis.

Class imbalance of the target

class_imbalance

Damage grade and structure type

structure_tye_damage_grade

You can find more plots and visualizations in the folder graphics

Methods

Our team of data scientists from Data Science Retreat in Berlin developed a model to predict the level of damage to the buildings. We used a variety of machine learning models, including Logistic Regression, Gradient Boosting, XGBoost, and Neural Networks. We also used a variety of feature engineering techniques, including one-hot encoding, target encoding, frequency encoding, and feature scaling.

Tools

  • Python
  • Pandas
  • Numpy
  • Scikit-learn
  • XGBoost
  • Matplotlib
  • Seaborn

Results

We achieve a micro-averaged F1 score of 0.7406

Project Setup

Register with DrivenData and download the data

  • Sign up to DrivenData and join the Richter's Predictor competition: DrivenData
  • Download the data files and save them to the data folder: Download data

Setup the project

  • Navigate to your projects folder, e.g. cd ~/projects
  • Clone the repository: git clone https://github.com/carecodeconnect/richters-predictor
  • Navigate to the project folder: cd richters-predictor
  • Create a virtual environment: conda create -n richters-predictor python=3.10
  • Activate the virtual environment: conda activate richters-predictor
  • Install the required packages: pip install -r requirements.txt

Run the project

  • Open the Jupyter Notebook: jupyter notebook
  • Open and run the notebook: baseline.ipynb
  • Open and run the best model: best.py
  • Deploy the app: streamlit run app.py

About

Predict the level of damage to buildings caused by earthquakes.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •