GeoQuakePredict aims to predict the depth and magnitude of earthquakes based on geological coordinates and temporal attributes using a trained deep learning model. This can assist researchers and disaster response planners in identifying potential impacts of seismic events.
This project involves building a regression-based deep learning model that takes in user-defined inputs like latitude, longitude, and timestamp to forecast two key earthquake parameters: Depth (in km) and Magnitude (Richter scale).
The model is deployed using Streamlit, allowing for a responsive and user-friendly prediction interface.
- Loaded the earthquake dataset containing features such as
latitude,longitude,date, andtime. - Extracted relevant time-based features:
year,month,day,hour,minute,second. - Handled missing/null values.
- Standardized the input features using
StandardScalerto normalize the data for efficient training. - Split the data into training and testing sets (80:20 split).
- Built a Deep Learning model using TensorFlow and Keras.
- Model architecture:
- Input layer: 8 features
- Hidden layers: Multiple Dense layers with ReLU activation
- Output layer: 2 neurons (for Depth and Magnitude)
- Used Mean Squared Error (MSE) as the loss function and Adam optimizer.
- Trained the model over several epochs to minimize prediction errors.
- Evaluated the model using:
- Mean Absolute Error (MAE)
- Root Mean Squared Error (RMSE)
- Achieved:
- MAE (Depth): ~11.28
- MAE (Magnitude): ~0.15
- The low MAE values indicate strong prediction performance for both outputs.
- Built an interactive web interface using Streamlit.
- Accepts user inputs for:
- Latitude
- Longitude
- Date
- Time
- Performs scaling using the saved
StandardScaler(scaler.pkl) and loads the trained model (earthquake_prediction_model.keras). - Displays:
- Predicted Depth
- Predicted Magnitude
- Python 3.x
- TensorFlow / Keras
- scikit-learn
- pandas
- numpy
- matplotlib
- seaborn
- Streamlit
- joblib (for scaler serialization)
GeoQuakePredict/
├── dataset/
│ └── database.csv # Raw dataset used for training
├── .gitignore # Files/directories to exclude from Git tracking
├── Earthquake_Prediction.ipynb # Jupyter notebook for data processing and model training
├── LICENSE # Allows reuse, with attribution, no warranty
├── README.md # Project documentation
├── app.py # Streamlit web app for live predictions
├── earthquake_prediction_model.keras # Trained deep learning model saved in Keras format
├── requirements.txt # Python dependencies
└── scaler.pkl # Pre-fitted StandardScaler object for input normalization
- 🌐 Web App Interface – Built with Streamlit for fast and interactive predictions.
- 📍 Geographical Input – Takes in latitude and longitude.
- 🕒 Temporal Input – Accepts date and time values.
- 📈 Dual Output Prediction – Simultaneously predicts depth and magnitude.
- 🧠 Deep Learning Model – Powered by TensorFlow, trained on real-world seismic data.
- ⚙️ Preprocessing Included – Scales and formats inputs behind the scenes.
- 🌍 Add map visualizations for predicted earthquake locations.
- 🧮 Integrate uncertainty estimation with confidence ranges.
- 🛎️ Enable risk alert system based on thresholds.
- 🔍 Improve generalization using larger or global datasets.
- 📡 Add real-time data ingestion from earthquake monitoring APIs.
git clone https://github.com/yourusername/GeoQuakePredict.git
cd GeoQuakePredict
pip install -r requirements.txt
streamlit run app.py
This project is licensed under the MIT License.
Thanks for visiting ! Feel free to explore my other repositories and connect with me. 🚀