# trantanphat0811/globalsuperstore_analysis architecture

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

- Interactive diagram: https://gitdiagram.com/trantanphat0811/globalsuperstore_analysis
- Repository: https://github.com/trantanphat0811/globalsuperstore_analysis

## Overview

This repository is an end-to-end Global Superstore analytics portfolio: order data is prepared and queried with SQLite, explored through Python analysis, and presented in dashboards. The README documents EDA, discount, RFM, geographic, and forecasting analyses; the tree includes the notebooks and a Streamlit dashboard. The excerpts confirm SQLite ingestion and the Streamlit dashboard’s reads. Other analysis links and Power BI data flows are based on README descriptions, not inspected notebook or dashboard internals.

Main entry points: [`data/superstore.db`](https://github.com/trantanphat0811/globalsuperstore_analysis/blob/main/data/superstore.db) (Orders database), [`02_Python/charts`](https://github.com/trantanphat0811/globalsuperstore_analysis/tree/main/02_Python/charts) (Analysis charts), [`03_PowerBI`](https://github.com/trantanphat0811/globalsuperstore_analysis/tree/main/03_PowerBI) (Power BI dashboard), [`02_Python/03_RFM_Segmentation.ipynb`](https://github.com/trantanphat0811/globalsuperstore_analysis/blob/main/02_Python/03_RFM_Segmentation.ipynb) (RFM segmentation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_foundation["Data foundation"]
  node_dataset["Order dataset"]
  node_ingestion["SQLite ingestion"]
  node_database[("Orders database<br/>[superstore.db]")]
  node_rfm_output["RFM results<br/>[rfm_segments.csv]"]
  node_geo_output["Geography results<br/>[geo_summary.csv]"]
  node_forecast_output["Forecast results"]
end

subgraph group_sql["SQL analysis"]
  node_cleaning["SQL cleaning<br/>[01_cleaning.sql]"]
  node_business_queries["Business queries"]
  node_powerbi_views["Power BI views"]
end

subgraph group_python["Python analysis"]
  node_eda["EDA<br/>[01_EDA.ipynb]"]
  node_discount["Discount analysis"]
  node_rfm["RFM segmentation"]
  node_geo["Geographic analysis"]
  node_forecast["Sales forecast<br/>[05_Forecast.ipynb]"]
  node_charts["Analysis charts"]
end

subgraph group_presentation["Dashboards"]
  node_streamlit["Streamlit dashboard<br/>[app.py]"]
  node_powerbi["Power BI dashboard"]
end

node_analyst(("Analyst"))

node_dataset -.->|"provides input"| node_ingestion
node_ingestion -->|"writes orders"| node_database
node_database -.->|"cleans data"| node_cleaning
node_database -.->|"queries orders"| node_business_queries
node_database -.->|"analyzes data"| node_eda
node_database -.->|"analyzes discounts"| node_discount
node_database -.->|"segments customers"| node_rfm
node_database -.->|"analyzes regions"| node_geo
node_database -.->|"forecasts sales"| node_forecast
node_rfm -.->|"exports segments"| node_rfm_output
node_geo -.->|"exports summary"| node_geo_output
node_forecast -.->|"exports forecast"| node_forecast_output
node_eda -.->|"produces charts"| node_charts
node_discount -.->|"produces charts"| node_charts
node_rfm -.->|"produces charts"| node_charts
node_geo -.->|"produces charts"| node_charts
node_forecast -.->|"produces charts"| node_charts
node_analyst -->|"views metrics"| node_streamlit
node_streamlit -->|"reads orders"| node_database
node_streamlit -->|"reads segments"| node_rfm_output
node_business_queries -.->|"feeds views"| node_powerbi_views
node_powerbi_views -.->|"provides SQL views"| node_powerbi
node_rfm_output -.->|"imports segments"| node_powerbi
node_forecast_output -.->|"imports forecast"| node_powerbi
node_analyst -.->|"explores dashboards"| node_powerbi

click node_dataset "https://github.com/trantanphat0811/globalsuperstore_analysis/blob/main/data/Global_Superstore2.csv"
click node_ingestion "https://github.com/trantanphat0811/globalsuperstore_analysis/blob/main/01_SQL/python/01_import_to_sqlite.py"
click node_database "https://github.com/trantanphat0811/globalsuperstore_analysis/blob/main/data/superstore.db"
click node_cleaning "https://github.com/trantanphat0811/globalsuperstore_analysis/blob/main/01_SQL/01_cleaning.sql"
click node_business_queries "https://github.com/trantanphat0811/globalsuperstore_analysis/blob/main/01_SQL/02_business_queries.sql"
click node_powerbi_views "https://github.com/trantanphat0811/globalsuperstore_analysis/blob/main/01_SQL/03_views_for_powerbi.sql"
click node_eda "https://github.com/trantanphat0811/globalsuperstore_analysis/blob/main/02_Python/01_EDA.ipynb"
click node_discount "https://github.com/trantanphat0811/globalsuperstore_analysis/blob/main/02_Python/02_Discount_Analysis.ipynb"
click node_rfm "https://github.com/trantanphat0811/globalsuperstore_analysis/blob/main/02_Python/03_RFM_Segmentation.ipynb"
click node_geo "https://github.com/trantanphat0811/globalsuperstore_analysis/blob/main/02_Python/04_Geo_Analysis.ipynb"
click node_forecast "https://github.com/trantanphat0811/globalsuperstore_analysis/blob/main/02_Python/05_Forecast.ipynb"
click node_rfm_output "https://github.com/trantanphat0811/globalsuperstore_analysis/blob/main/data/rfm_segments.csv"
click node_geo_output "https://github.com/trantanphat0811/globalsuperstore_analysis/blob/main/data/geo_summary.csv"
click node_forecast_output "https://github.com/trantanphat0811/globalsuperstore_analysis/blob/main/data/forecast_result.csv"
click node_charts "https://github.com/trantanphat0811/globalsuperstore_analysis/tree/main/02_Python/charts"
click node_streamlit "https://github.com/trantanphat0811/globalsuperstore_analysis/blob/main/01_SQL/python/app.py"
click node_powerbi "https://github.com/trantanphat0811/globalsuperstore_analysis/tree/main/03_PowerBI"

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_ingestion,node_database,node_rfm_output,node_geo_output,node_forecast_output toneBlue
class node_cleaning,node_business_queries,node_powerbi_views toneAmber
class node_eda,node_discount,node_rfm,node_geo,node_forecast,node_charts toneMint
class node_streamlit,node_powerbi toneRose
class node_analyst toneIndigo
```

## Components

### Data foundation

- [Order dataset](https://github.com/trantanphat0811/globalsuperstore_analysis/blob/main/data/Global_Superstore2.csv): `data/Global_Superstore2.csv`
- [SQLite ingestion](https://github.com/trantanphat0811/globalsuperstore_analysis/blob/main/01_SQL/python/01_import_to_sqlite.py): `01_SQL/python/01_import_to_sqlite.py`
- [Orders database](https://github.com/trantanphat0811/globalsuperstore_analysis/blob/main/data/superstore.db): `data/superstore.db`
- [RFM results](https://github.com/trantanphat0811/globalsuperstore_analysis/blob/main/data/rfm_segments.csv): `data/rfm_segments.csv`
- [Geography results](https://github.com/trantanphat0811/globalsuperstore_analysis/blob/main/data/geo_summary.csv): `data/geo_summary.csv`
- [Forecast results](https://github.com/trantanphat0811/globalsuperstore_analysis/blob/main/data/forecast_result.csv): `data/forecast_result.csv`

### SQL analysis

- [SQL cleaning](https://github.com/trantanphat0811/globalsuperstore_analysis/blob/main/01_SQL/01_cleaning.sql): `01_SQL/01_cleaning.sql`
- [Business queries](https://github.com/trantanphat0811/globalsuperstore_analysis/blob/main/01_SQL/02_business_queries.sql): `01_SQL/02_business_queries.sql`
- [Power BI views](https://github.com/trantanphat0811/globalsuperstore_analysis/blob/main/01_SQL/03_views_for_powerbi.sql): `01_SQL/03_views_for_powerbi.sql`

### Python analysis

- [EDA](https://github.com/trantanphat0811/globalsuperstore_analysis/blob/main/02_Python/01_EDA.ipynb): `02_Python/01_EDA.ipynb`
- [Discount analysis](https://github.com/trantanphat0811/globalsuperstore_analysis/blob/main/02_Python/02_Discount_Analysis.ipynb): `02_Python/02_Discount_Analysis.ipynb`
- [RFM segmentation](https://github.com/trantanphat0811/globalsuperstore_analysis/blob/main/02_Python/03_RFM_Segmentation.ipynb): `02_Python/03_RFM_Segmentation.ipynb`
- [Geographic analysis](https://github.com/trantanphat0811/globalsuperstore_analysis/blob/main/02_Python/04_Geo_Analysis.ipynb): `02_Python/04_Geo_Analysis.ipynb`
- [Sales forecast](https://github.com/trantanphat0811/globalsuperstore_analysis/blob/main/02_Python/05_Forecast.ipynb): `02_Python/05_Forecast.ipynb`
- [Analysis charts](https://github.com/trantanphat0811/globalsuperstore_analysis/tree/main/02_Python/charts): `02_Python/charts`

### Dashboards

- [Streamlit dashboard](https://github.com/trantanphat0811/globalsuperstore_analysis/blob/main/01_SQL/python/app.py): `01_SQL/python/app.py`
- [Power BI dashboard](https://github.com/trantanphat0811/globalsuperstore_analysis/tree/main/03_PowerBI): `03_PowerBI`

### Other components

- **Analyst**

## Connections

- Order dataset → SQLite ingestion: provides input
- SQLite ingestion → Orders database: writes orders (evidence: `01_SQL/python/01_import_to_sqlite.py`)
- Orders database → SQL cleaning: cleans data (evidence: `README.md`)
- Orders database → Business queries: queries orders (evidence: `README.md`)
- Orders database → EDA: analyzes data (evidence: `README.md`)
- Orders database → Discount analysis: analyzes discounts (evidence: `README.md`)
- Orders database → RFM segmentation: segments customers (evidence: `README.md`)
- Orders database → Geographic analysis: analyzes regions (evidence: `README.md`)
- Orders database → Sales forecast: forecasts sales (evidence: `README.md`)
- RFM segmentation → RFM results: exports segments (evidence: `README.md`)
- Geographic analysis → Geography results: exports summary (evidence: `README.md`)
- Sales forecast → Forecast results: exports forecast (evidence: `README.md`)
- EDA → Analysis charts: produces charts (evidence: `README.md`)
- Discount analysis → Analysis charts: produces charts (evidence: `README.md`)
- RFM segmentation → Analysis charts: produces charts (evidence: `README.md`)
- Geographic analysis → Analysis charts: produces charts (evidence: `README.md`)
- Sales forecast → Analysis charts: produces charts (evidence: `README.md`)
- Analyst → Streamlit dashboard: views metrics (evidence: `01_SQL/python/app.py`)
- Streamlit dashboard → Orders database: reads orders (evidence: `01_SQL/python/app.py`)
- Streamlit dashboard → RFM results: reads segments (evidence: `01_SQL/python/app.py`)
- Business queries → Power BI views: feeds views (evidence: `README.md`)
- Power BI views → Power BI dashboard: provides SQL views (evidence: `README.md`)
- RFM results → Power BI dashboard: imports segments (evidence: `README.md`)
- Forecast results → Power BI dashboard: imports forecast (evidence: `README.md`)
- Analyst → Power BI dashboard: explores dashboards (evidence: `README.md`)
