Project Overview
TremorTrack 2.0 is a machine learning-based application for predicting and visualizing earthquake magnitudes. This project is designed to assist professionals, researchers, and the public in objectively and interactively analyzing and predicting earthquake strength.
Problem Statement
Manual assessment of earthquake magnitude is often subjective and time-consuming. There is a need for an automated, accurate, and scalable solution to predict earthquake magnitude from seismic data, supporting better decision-making in disaster mitigation.
Target Users / Use Cases
- Seismologists & Researchers: Analyze earthquake data and evaluate prediction models.
- Disaster Management Agencies: Obtain rapid predictions for early response.
- General Public: Education and earthquake risk monitoring.
- Developers/Data Scientists: Reference for developing data-driven prediction applications.
Tech Stack
- Programming Language: Python
- Framework: Streamlit
- Libraries: pandas, scikit-learn, plotly, numpy, joblib, gdown
- Visualization: Plotly
- Dependency Management: requirements.txt
- Version Control: Git
Methodology / Workflow
- Data Collection: Gather earthquake data from USGS and ShakeMap.
- Data Preprocessing: Impute missing values, encoding, normalization.
- Feature Engineering: Select and engineer important features.
- Model Training: Train a Random Forest Regressor.
- Model Evaluation: Evaluate using MAE, MSE, R².
- Deployment: Implement an interactive app with Streamlit.
- User Interaction: Prediction & visualization based on user input.
Project Structure
track-tremor/
├── app.py # Main application script
├── extracted_datafinal.csv # Preprocessed dataset
├── categorical_imputer.pkl # Categorical imputer
├── numerical_imputer.pkl # Numerical imputer
├── actual_vs_predicted.png # Model performance visualization
├── after dropping unimportant features.png # Feature selection visualization
├── requirements.txt # Dependencies list
├── readme.md # Project documentation
Key Features
- Automated earthquake magnitude prediction
- Data preprocessing (imputation, encoding)
- Feature selection & engineering
- Interactive visualizations (correlation, intensity, ground motion)
- Modular & extensible codebase
Data Source & Preprocessing
- Data Sources: USGS Global Earthquake Database, ShakeMap, historical seismic data
- Preprocessing:
- Impute missing values (pre-trained imputers)
- Select important features
- Normalize & encode categorical features
Challenges & Solutions
- Incomplete/Noisy Data: Imputation & outlier detection
- Feature Redundancy: Feature analysis & selection
- Model Overfitting: Cross-validation & regularization
- Dynamic Visualization: Plotly integration for interactivity
Model Performance / Evaluation Metrics
- MAE: 0.3067
- MSE: 0.1730
- R² Score: 0.8735
- Visualizations:
Results & Impact
- High prediction accuracy with low error
- More objective & repeatable magnitude assessment
- Supports better disaster mitigation decision-making
Demo / Screenshots
Future Improvements
- Real-time data integration
- Multi-class classification for earthquake types
- Web/mobile deployment
- Enhanced UI/UX & reporting features
Lessons Learned
- Importance of thorough data preprocessing
- Feature selection greatly impacts performance
- Challenges of real-world seismic data
- Documentation & code modularity ease development
Installation & Setup Guide
- Clone the repository:
git clone <repository-url> cd track-tremor
- Install dependencies:
pip install -r requirements.txt
- Run the application:
python app.py
Credits / Acknowledgments
- Developer: Rizky Eka Haryadi
- Data: USGS, ShakeMap
- Thanks to the open-source community
- Contact: r28eka@gmail.com