# osamah-anmar-sami/retail-analysis architecture

> Architecture diagram of the GitHub repository osamah-anmar-sami/retail-analysis, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-06-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/osamah-anmar-sami/retail-analysis
- Repository: https://github.com/osamah-anmar-sami/retail-analysis

## Overview

1. **Repository type**
   - This is a **data analysis / BI portfolio project**, not an application service.
   - The architecture is centered on **raw retail data → curated dataset → exploratory analysis → dashboards/reporting**.

2. **Primary data source**
   - The project uses a **multi-country retail transactional dataset** from Kaggle.
   - The data includes customer, product, purchase, and transaction information across countries such as the USA, UK, Canada, Germany, and Australia.

3. **Data curation layer**
   - `DataCuration.ipynb` is the first processing stage.
   - It performs the main cleanup and shaping work: handling missing values, creating new features, converting data types, renaming columns, and removing duplicates.
   - This notebook is the boundary between the **raw external dataset** and the **analysis-ready dataset**.

4. **Exploratory analysis layer**
   - `EDA.ipynb` consumes the curated data and performs **univariate, bivariate, and multivariate analysis**.
   - Its role is to identify patterns, relationships, and insights rather than to transform the data further.
   - This is the analytical core of the repository.

5. **Visualization / dashboard outputs**
   - `Analysis Multiple Countries Retail Data.twbx` is a **Tableau packaged workbook** used to build the published dashboard.
   - The README links to a **Tableau Public** dashboard, so Tableau is the main external visualization surface for sharing results.
   - `Retail Analysis.pbix` is a **Power BI report artifact**, indicating a second BI visualization deliverable in the repo.

6. **Reporting layer**
   - `Final Report.pdf` is the static presentation layer that summarizes findings from the curation and EDA work.
   - This file is downstream of the notebooks and dashboards: it packages the insights into a consumable deliverable for review or portfolio presentation.

7. **Technology stack**
   - The analytical pipeline is built in **Python notebooks** with:
     - `pandas` for data manipulation
     - `numpy` for numeric operations
     - `matplotlib`, `seaborn`, and `colorcet` for plotting
   - The project also uses **Tableau** and **Power BI** for dashboarding.

8. **Execution model**
   - The repo is notebook-driven, with the main entry points being:
     - `DataCuration.ipynb`
     - `EDA.ipynb`
   - The README explicitly instructs running them via Jupyter Notebook, so there is no separate application server or API layer.

9. **Data flow**
   - External Kaggle dataset feeds into the curation notebook.
   - Curated output flows into EDA.
   - EDA findings feed into Tableau / Power BI dashboards and the final PDF report.
   - The flow is essentially **one-way and batch-oriented**, not interactive or transactional.

10. **Architectural boundaries**
   - The key boundary is between **raw data ingestion/cleanup** and **analytical consumption**.
   - Another boundary exists between **analysis artifacts** (notebooks) and **presentation artifacts** (dashboard workbooks and PDF report).
   - The repository does not expose a service boundary, database boundary, or deployment boundary.

11. **External dependencies and distribution**
   - Data acquisition depends on the Kaggle dataset URL in the README.
   - Dashboard distribution relies on Tableau Public hosting for the published visualization.
   - The remaining artifacts are local files intended for reproducible analysis and portfolio sharing.

12. **What to draw in an architecture diagram**
   - Show:
     - **Kaggle retail dataset** as the source
     - **DataCuration.ipynb** as the transformation stage
     - **EDA.ipynb** as the analysis stage
     - **Tableau workbook / Tableau Public** and **Power BI report** as visualization outputs
     - **Final Report.pdf** as the final narrative deliverable
   - The diagram should reflect a **single analytical pipeline with multiple presentation outputs**.

Main entry points: [`EDA.ipynb`](https://github.com/osamah-anmar-sami/retail-analysis/blob/main/EDA.ipynb) (EDA), [`README.md`](https://github.com/osamah-anmar-sami/retail-analysis/blob/main/README.md) (README), [`DataCuration.ipynb`](https://github.com/osamah-anmar-sami/retail-analysis/blob/main/DataCuration.ipynb) (Data curation), [`Analysis Multiple Countries Retail Data.twbx`](https://github.com/osamah-anmar-sami/retail-analysis/blob/HEAD/Analysis%20Multiple%20Countries%20Retail%20Data.twbx) (Tableau workbook)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_source["Source data"]
  node_kaggle_dataset[("Kaggle data<br/>external dataset")]
end

subgraph group_analysis["Analysis layer"]
  node_data_curation["Data curation<br/>notebook pipeline<br/>[DataCuration.ipynb]"]
  node_eda["EDA<br/>notebook analysis<br/>[EDA.ipynb]"]
  node_readme["README<br/>project guide<br/>[README.md]"]
end

subgraph group_presentation["Presentation layer"]
  node_tableau_workbook["Tableau workbook<br/>dashboard artifact"]
  node_tableau_public(("Tableau Public<br/>hosting surface"))
  node_powerbi_report["Power BI report<br/>bi artifact"]
  node_final_report["Final report<br/>pdf report<br/>[Final Report.pdf]"]
end

node_kaggle_dataset -->|"raw data"| node_data_curation
node_data_curation -->|"curated data"| node_eda
node_eda -->|"insights"| node_tableau_workbook
node_tableau_workbook -.->|"publish"| node_tableau_public
node_eda -->|"reporting input"| node_powerbi_report
node_eda -->|"summary"| node_final_report
node_readme -.->|"run"| node_data_curation
node_readme -.->|"run"| node_eda
node_readme -.->|"view"| node_tableau_public

click node_data_curation "https://github.com/osamah-anmar-sami/retail-analysis/blob/main/DataCuration.ipynb"
click node_eda "https://github.com/osamah-anmar-sami/retail-analysis/blob/main/EDA.ipynb"
click node_tableau_workbook "https://github.com/osamah-anmar-sami/retail-analysis/blob/main/Analysis Multiple Countries Retail Data.twbx"
click node_powerbi_report "https://github.com/osamah-anmar-sami/retail-analysis/blob/main/Retail Analysis.pbix"
click node_final_report "https://github.com/osamah-anmar-sami/retail-analysis/blob/main/Final Report.pdf"
click node_readme "https://github.com/osamah-anmar-sami/retail-analysis/blob/main/README.md"

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_kaggle_dataset toneBlue
class node_data_curation,node_eda,node_readme toneAmber
class node_tableau_workbook,node_tableau_public,node_powerbi_report,node_final_report toneMint
```

## Components

### Source data

External retail dataset feeding the analysis pipeline.

- **Kaggle data**: external dataset · Multi-country retail transactional source data from Kaggle.

### Analysis layer

Notebook-driven curation and exploratory analysis.

- [Data curation](https://github.com/osamah-anmar-sami/retail-analysis/blob/main/DataCuration.ipynb): notebook pipeline · Cleans, renames, deduplicates, and feature-engineers the raw dataset. · `DataCuration.ipynb`
- [EDA](https://github.com/osamah-anmar-sami/retail-analysis/blob/main/EDA.ipynb): notebook analysis · Performs univariate, bivariate, and multivariate exploration on curated data. · `EDA.ipynb`
- [README](https://github.com/osamah-anmar-sami/retail-analysis/blob/main/README.md): project guide · Explains how to run the notebooks and access the published dashboard. · `README.md`

### Presentation layer

Packaged dashboards and report outputs for sharing findings.

- [Tableau workbook](https://github.com/osamah-anmar-sami/retail-analysis/blob/HEAD/Analysis%20Multiple%20Countries%20Retail%20Data.twbx): dashboard artifact · Packaged Tableau workbook for interactive retail visualization. · `Analysis Multiple Countries Retail Data.twbx`
- **Tableau Public**: hosting surface · External publishing surface for the dashboard experience.
- [Power BI report](https://github.com/osamah-anmar-sami/retail-analysis/blob/HEAD/Retail%20Analysis.pbix): bi artifact · Secondary BI report deliverable for retail analysis. · `Retail Analysis.pbix`
- [Final report](https://github.com/osamah-anmar-sami/retail-analysis/blob/HEAD/Final%20Report.pdf): pdf report · Static narrative summary of findings and insights. · `Final Report.pdf`

## Connections

- Kaggle data → Data curation: raw data · External retail data is ingested and cleaned.
- Data curation → EDA: curated data · Analysis uses the cleaned, analysis-ready dataset.
- EDA → Tableau workbook: insights · Exploratory findings inform dashboard design and content.
- Tableau workbook → Tableau Public: publish · Workbook is distributed through Tableau Public.
- EDA → Power BI report: reporting input · EDA findings also feed the Power BI deliverable.
- EDA → Final report: summary · Notebook outputs are distilled into the final PDF report.
- README → Data curation: run · README identifies the curation notebook as a main entry point.
- README → EDA: run · README identifies the EDA notebook as a main entry point.
- README → Tableau Public: view · README points to the published Tableau dashboard.
