Term project repository for CE 477 Data Science course at Izmir University of Economics.
Course: CE 477 – Data Science
Institution: Izmir University of Economics
Department: Department of Computer Engineering
This repository contains the end-to-end data science project developed for the CE 477 Data Science course at Izmir University of Economics. The project investigates seismic activity records across Turkey and adjacent regions provided by the Republic of Turkey Ministry of Interior Disaster and Emergency Management Authority (AFAD).
The primary objective is to build a reproducible, robust data pipeline that ingests raw seismic records, performs comprehensive exploratory data analysis (EDA), executes preprocessing and feature engineering workflows, and prepares balanced representations for downstream predictive modeling.
.
├── data/
│ ├── afad_earthquake_data_raw.csv # Raw seismic dataset retrieved from AFAD
│ └── afad_earthquake_data_preprocessed.csv # Cleaned, encoded, and preprocessed dataset
├── figures/ # Exported visualizations and analytical plots
│ ├── fig1_magnitude_type_distribution.png
│ ├── fig2_numeric_boxplots.png
│ ├── fig3_depth_mag_boxplot.png
│ ├── fig4_histograms.png
│ ├── fig5_spatial_scatter.png
│ ├── fig6_depth_vs_magnitude.png
│ ├── fig7_temporal_lineplot.png
│ ├── fig8_correlation_matrix.png
│ ├── fig9_outlier_filtered_boxplots.png
│ ├── fig10_discretized_magnitude_classes.png
│ ├── fig11_pca_2d_projection.png
│ ├── fig12_pca_3d_projection.png
│ ├── fig13_data_augmentation_smote.png
│ ├── fig14_decision_tree_visualization.png
│ ├── fig15_feature_importance_and_spatial_map.png
│ ├── fig16_confusion_matrices_comparison.png
│ └── fig17_classification_metrics_comparison.png
├── notebooks/
│ ├── 00_afad_earthquake_data_collection.ipynb # Data retrieval pipeline (API and cloud fallback)
│ ├── 01_dataset_analysis.ipynb # EDA, statistical analysis, and preprocessing
│ └── 02_classification_analysis.ipynb # Assignment #2: Multi-class seismic severity classification
├── run_classification.py # Standalone classification training & evaluation script
├── requirements.txt # Python package dependencies
├── .gitignore # System and environment exclusions
└── README.md # Project documentation
The collection stage (notebooks/00_afad_earthquake_data_collection.ipynb) connects to the AFAD Earthquake Department API with automated date-chunking to bypass query payload constraints. It incorporates fallback mechanisms to ensure complete retrieval of historical seismic observations.
The statistical and descriptive inspection (notebooks/01_dataset_analysis.ipynb) covers:
notebooks/02_classification_analysis.ipynb)Micro (<3.0), Minor (3.0-3.9), and Light+ (>=4.0)) with strict exclusion of target-leaking attributes.StandardScaler transformations strictly on the Training set.HistGradientBoostingClassifier).fig14), Gini feature importance and spatial tectonic prediction mapping (fig15), normalized confusion matrices (fig16), and comparative evaluation across Accuracy, Precision, Recall, and F1-Score (fig17).Clone the repository:
git clone https://github.com/Decuayer/ce477-data-science-term-project.git
cd ce477-data-science-term-project
Create and activate a virtual environment:
python3 -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
Install required dependencies:
pip install numpy pandas matplotlib seaborn scikit-learn imbalanced-learn requests
The analysis and preprocessing stages can be reproduced sequentially:
notebooks/00_afad_earthquake_data_collection.ipynb to regenerate or verify the raw dataset.notebooks/01_dataset_analysis.ipynb to reproduce the statistical figures in figures/ and export data/afad_earthquake_data_preprocessed.csv.notebooks/02_classification_analysis.ipynb to train and evaluate the classification models and export fig14–fig17 to figures/.