# panimalar1913/international_debt_analysis_system architecture

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

- Interactive diagram: https://gitdiagram.com/panimalar1913/international_debt_analysis_system
- Repository: https://github.com/panimalar1913/international_debt_analysis_system

## Overview

International Debt Analysis System combines a Streamlit dashboard for exploring debt indicators with scripts for cleaning World Bank datasets, running statistical analyses, and loading cleaned CSVs into MySQL. The dashboard loads lookup lists, applies country/indicator/year selections, queries debt records, and presents summaries, charts, and a data preview. Separately, the analysis script reads cleaned data and emits statistical results and plots. The README gives no further capability details; relationships are included only where visible in the excerpts.

Main entry points: [`app.py`](https://github.com/panimalar1913/international_debt_analysis_system/blob/main/app.py) (Debt dashboard), [`clean.py`](https://github.com/panimalar1913/international_debt_analysis_system/blob/main/clean.py) (Dataset cleaning), [`Output`](https://github.com/panimalar1913/international_debt_analysis_system/tree/main/Output) (Cleaned datasets), [`Analysis.py`](https://github.com/panimalar1913/international_debt_analysis_system/blob/main/Analysis.py) (Debt analysis)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Interactive dashboard"]
  node_dashboard["Debt dashboard<br/>[app.py]"]
  node_dashboard_views["Charts and preview<br/>[app.py]"]
end

subgraph group_preparation["Data preparation"]
  node_raw_data["Source datasets"]
  node_cleaning["Dataset cleaning<br/>[clean.py]"]
  node_cleaned_outputs["Cleaned datasets"]
end

subgraph group_analysis["Debt analysis"]
  node_analysis_job["Debt analysis<br/>[Analysis.py]"]
  node_analysis_results["Analysis outputs"]
end

subgraph group_persistence["MySQL persistence"]
  node_loader["CSV table loader<br/>[load_debt.py]"]
  node_load_csv["Loader CSV inputs"]
  node_mysql[("MySQL debt database")]
end

node_user(("Analyst"))

node_user -->|"uses"| node_dashboard
node_dashboard -->|"queries"| node_mysql
node_dashboard -->|"renders"| node_dashboard_views
node_raw_data -.->|"supplies data"| node_cleaning
node_cleaning -->|"writes"| node_cleaned_outputs
node_cleaned_outputs -.->|"supplies data"| node_analysis_job
node_analysis_job -->|"writes"| node_analysis_results
node_load_csv -->|"supplies CSVs"| node_loader
node_loader -->|"creates and loads"| node_mysql

click node_dashboard "https://github.com/panimalar1913/international_debt_analysis_system/blob/main/app.py"
click node_dashboard_views "https://github.com/panimalar1913/international_debt_analysis_system/blob/main/app.py"
click node_raw_data "https://github.com/panimalar1913/international_debt_analysis_system/tree/main/data"
click node_cleaning "https://github.com/panimalar1913/international_debt_analysis_system/blob/main/clean.py"
click node_cleaned_outputs "https://github.com/panimalar1913/international_debt_analysis_system/tree/main/Output"
click node_analysis_job "https://github.com/panimalar1913/international_debt_analysis_system/blob/main/Analysis.py"
click node_analysis_results "https://github.com/panimalar1913/international_debt_analysis_system/tree/main/Output/analysis"
click node_loader "https://github.com/panimalar1913/international_debt_analysis_system/blob/main/sql/load_debt.py"
click node_load_csv "https://github.com/panimalar1913/international_debt_analysis_system/tree/main/sql"

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_dashboard,node_dashboard_views toneBlue
class node_raw_data,node_cleaning,node_cleaned_outputs toneAmber
class node_analysis_job,node_analysis_results toneMint
class node_loader,node_load_csv,node_mysql toneRose
class node_user toneIndigo
```

## Components

### Interactive dashboard

- [Debt dashboard](https://github.com/panimalar1913/international_debt_analysis_system/blob/main/app.py): `app.py`
- [Charts and preview](https://github.com/panimalar1913/international_debt_analysis_system/blob/main/app.py): `app.py`

### Data preparation

- [Source datasets](https://github.com/panimalar1913/international_debt_analysis_system/tree/main/data): `data`
- [Dataset cleaning](https://github.com/panimalar1913/international_debt_analysis_system/blob/main/clean.py): `clean.py`
- [Cleaned datasets](https://github.com/panimalar1913/international_debt_analysis_system/tree/main/Output): `Output`

### Debt analysis

- [Debt analysis](https://github.com/panimalar1913/international_debt_analysis_system/blob/main/Analysis.py): `Analysis.py`
- [Analysis outputs](https://github.com/panimalar1913/international_debt_analysis_system/tree/main/Output/analysis): `Output/analysis`

### MySQL persistence

- [CSV table loader](https://github.com/panimalar1913/international_debt_analysis_system/blob/main/sql/load_debt.py): `sql/load_debt.py`
- [Loader CSV inputs](https://github.com/panimalar1913/international_debt_analysis_system/tree/main/sql): `sql`
- **MySQL debt database**

### Other components

- **Analyst**

## Connections

- Analyst → Debt dashboard: uses (evidence: `app.py`)
- Debt dashboard → MySQL debt database: queries (evidence: `app.py`)
- Debt dashboard → Charts and preview: renders (evidence: `app.py`)
- Source datasets → Dataset cleaning: supplies data
- Dataset cleaning → Cleaned datasets: writes (evidence: `clean.py`)
- Cleaned datasets → Debt analysis: supplies data
- Debt analysis → Analysis outputs: writes (evidence: `Analysis.py`)
- Loader CSV inputs → CSV table loader: supplies CSVs (evidence: `sql/load_debt.py`)
- CSV table loader → MySQL debt database: creates and loads (evidence: `sql/load_debt.py`)
