# harshh351998/earthquake-prediction architecture

> Architecture diagram of the GitHub repository harshh351998/earthquake-prediction, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/harshh351998/earthquake-prediction
- Repository: https://github.com/harshh351998/earthquake-prediction

## Overview

This is a notebook-based earthquake analysis and prediction project. Its documented goal is to use regional earthquake data to predict magnitude and location. The sampled Python script reads earthquake data, prepares features, trains and validates a TensorFlow model, saves a checkpoint, then accepts a date and location/depth inputs for prediction. The tree also shows separate analysis, prediction, and visualization notebooks, but their contents were not provided, so their internal behavior and connections are uncertain. The sampled script’s data path and some training parameters appear inconsistent or undefined.

Main entry points: [`dataset/final_data.csv`](https://github.com/harshh351998/earthquake-prediction/blob/master/dataset/final_data.csv) (Earthquake CSV data), [`Model/train model.py`](https://github.com/harshh351998/earthquake-prediction/blob/master/Model/train%20model.py) (Interactive prediction), [`Earthquake Prediction.ipynb`](https://github.com/harshh351998/earthquake-prediction/blob/master/Earthquake%20Prediction.ipynb) (Prediction notebook), [`Earthquake Analysis .ipynb`](https://github.com/harshh351998/earthquake-prediction/blob/master/Earthquake%20Analysis%20.ipynb) (Earthquake analysis)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Earthquake data"]
  node_dataset[("Earthquake CSV data<br/>[final_data.csv]")]
end

subgraph group_model["Model workflow"]
  node_preparation["Feature preparation<br/>[train model.py]"]
  node_training["Model training<br/>[train model.py]"]
  node_checkpoint[("Saved checkpoint")]
  node_prediction["Interactive prediction<br/>[train model.py]"]
end

subgraph group_notebooks["Notebook workflows"]
  node_analysis["Earthquake analysis"]
  node_notebook_prediction["Prediction notebook"]
  node_visualization["Result visualization"]
end

node_user(("User"))

node_dataset -->|"provides records"| node_preparation
node_preparation -->|"prepares features"| node_training
node_training -->|"saves model"| node_checkpoint
node_user -->|"enters inputs"| node_prediction
node_prediction -->|"restores model"| node_checkpoint
node_prediction -->|"prints magnitude"| node_user
node_dataset -.-> node_analysis
node_dataset -.-> node_notebook_prediction
node_notebook_prediction -.-> node_visualization

click node_dataset "https://github.com/harshh351998/earthquake-prediction/blob/master/dataset/final_data.csv"
click node_preparation "https://github.com/harshh351998/earthquake-prediction/blob/master/Model/train%20model.py"
click node_training "https://github.com/harshh351998/earthquake-prediction/blob/master/Model/train%20model.py"
click node_prediction "https://github.com/harshh351998/earthquake-prediction/blob/master/Model/train%20model.py"
click node_analysis "https://github.com/harshh351998/earthquake-prediction/blob/master/Earthquake%20Analysis%20.ipynb"
click node_notebook_prediction "https://github.com/harshh351998/earthquake-prediction/blob/master/Earthquake%20Prediction.ipynb"
click node_visualization "https://github.com/harshh351998/earthquake-prediction/blob/master/Earthquake%20Result%20Visualization.ipynb"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_dataset,node_user toneBlue
class node_preparation,node_training,node_checkpoint,node_prediction toneAmber
class node_analysis,node_notebook_prediction,node_visualization toneMint
```

## Components

### Earthquake data

- [Earthquake CSV data](https://github.com/harshh351998/earthquake-prediction/blob/master/dataset/final_data.csv): `dataset/final_data.csv`

### Model workflow

- [Feature preparation](https://github.com/harshh351998/earthquake-prediction/blob/master/Model/train%20model.py): `Model/train model.py`
- [Model training](https://github.com/harshh351998/earthquake-prediction/blob/master/Model/train%20model.py): `Model/train model.py`
- **Saved checkpoint**
- [Interactive prediction](https://github.com/harshh351998/earthquake-prediction/blob/master/Model/train%20model.py): `Model/train model.py`

### Notebook workflows

- [Earthquake analysis](https://github.com/harshh351998/earthquake-prediction/blob/master/Earthquake%20Analysis%20.ipynb): `Earthquake Analysis .ipynb`
- [Prediction notebook](https://github.com/harshh351998/earthquake-prediction/blob/master/Earthquake%20Prediction.ipynb): `Earthquake Prediction.ipynb`
- [Result visualization](https://github.com/harshh351998/earthquake-prediction/blob/master/Earthquake%20Result%20Visualization.ipynb): `Earthquake Result Visualization.ipynb`

### Other components

- **User**

## Connections

- Earthquake CSV data → Feature preparation: provides records (evidence: `Model/train model.py`)
- Feature preparation → Model training: prepares features (evidence: `Model/train model.py`)
- Model training → Saved checkpoint: saves model (evidence: `Model/train model.py`)
- User → Interactive prediction: enters inputs (evidence: `Model/train model.py`)
- Interactive prediction → Saved checkpoint: restores model (evidence: `Model/train model.py`)
- Interactive prediction → User: prints magnitude (evidence: `Model/train model.py`)
- Earthquake CSV data → Earthquake analysis
- Earthquake CSV data → Prediction notebook
- Prediction notebook → Result visualization
