# roshika1235/customer_behaviour_analysis architecture

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

- Interactive diagram: https://gitdiagram.com/roshika1235/customer_behaviour_analysis
- Repository: https://github.com/roshika1235/customer_behaviour_analysis

## Overview

This project turns customer transaction data into cleaned, engineered data, PostgreSQL business analyses, and an interactive Power BI dashboard. The README documents the cleaning, feature engineering, database load, ten SQL questions, and dashboard KPIs and analysis views. The notebook and dashboard internals were not sampled, so their nodes represent documented responsibilities; the documented database-to-dashboard connection is shown without detailing its implementation.

Main entry points: [`customer_behaviour_analysis.pbix`](https://github.com/roshika1235/customer_behaviour_analysis/blob/main/customer_behaviour_analysis.pbix) (Power BI dashboard), [`customer_behaviour.ipynb`](https://github.com/roshika1235/customer_behaviour_analysis/blob/main/customer_behaviour.ipynb) (Clean and engineer), [`customer_behaviour_analysis_sql.sql`](https://github.com/roshika1235/customer_behaviour_analysis/blob/main/customer_behaviour_analysis_sql.sql) (Business queries)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_prep["Data preparation"]
  node_notebook["Clean and engineer"]
end

subgraph group_analysis["SQL analysis"]
  node_postgres[("PostgreSQL")]
  node_sql["Business queries"]
end

subgraph group_bi["Business intelligence"]
  node_dashboard["Power BI dashboard"]
  node_kpis["KPIs and revenue"]
  node_customer_views["Customer analysis"]
  node_product_views["Product analysis"]
end

node_source_data["Transaction data"]
node_decision_maker(("Business decision-maker"))

node_source_data -->|"provides records"| node_notebook
node_notebook -->|"loads cleaned data"| node_postgres
node_sql -->|"queries"| node_postgres
node_postgres -->|"supplies data"| node_dashboard
node_dashboard -->|"presents"| node_kpis
node_dashboard -->|"presents"| node_customer_views
node_dashboard -->|"presents"| node_product_views
node_decision_maker -->|"explores"| node_dashboard

click node_notebook "https://github.com/roshika1235/customer_behaviour_analysis/blob/main/customer_behaviour.ipynb"
click node_sql "https://github.com/roshika1235/customer_behaviour_analysis/blob/main/customer_behaviour_analysis_sql.sql"
click node_dashboard "https://github.com/roshika1235/customer_behaviour_analysis/blob/main/customer_behaviour_analysis.pbix"
click node_kpis "https://github.com/roshika1235/customer_behaviour_analysis/blob/main/customer_behaviour_analysis.pbix"
click node_customer_views "https://github.com/roshika1235/customer_behaviour_analysis/blob/main/customer_behaviour_analysis.pbix"
click node_product_views "https://github.com/roshika1235/customer_behaviour_analysis/blob/main/customer_behaviour_analysis.pbix"

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_notebook toneBlue
class node_postgres,node_sql toneAmber
class node_dashboard,node_kpis,node_customer_views,node_product_views toneMint
class node_source_data,node_decision_maker toneIndigo
```

## Components

### Data preparation

- [Clean and engineer](https://github.com/roshika1235/customer_behaviour_analysis/blob/main/customer_behaviour.ipynb): `customer_behaviour.ipynb`

### SQL analysis

- **PostgreSQL**
- [Business queries](https://github.com/roshika1235/customer_behaviour_analysis/blob/main/customer_behaviour_analysis_sql.sql): `customer_behaviour_analysis_sql.sql`

### Business intelligence

- [Power BI dashboard](https://github.com/roshika1235/customer_behaviour_analysis/blob/main/customer_behaviour_analysis.pbix): `customer_behaviour_analysis.pbix`
- [KPIs and revenue](https://github.com/roshika1235/customer_behaviour_analysis/blob/main/customer_behaviour_analysis.pbix): `customer_behaviour_analysis.pbix`
- [Customer analysis](https://github.com/roshika1235/customer_behaviour_analysis/blob/main/customer_behaviour_analysis.pbix): `customer_behaviour_analysis.pbix`
- [Product analysis](https://github.com/roshika1235/customer_behaviour_analysis/blob/main/customer_behaviour_analysis.pbix): `customer_behaviour_analysis.pbix`

### Other components

- **Transaction data**
- **Business decision-maker**

## Connections

- Transaction data → Clean and engineer: provides records
- Clean and engineer → PostgreSQL: loads cleaned data
- Business queries → PostgreSQL: queries
- PostgreSQL → Power BI dashboard: supplies data
- Power BI dashboard → KPIs and revenue: presents
- Power BI dashboard → Customer analysis: presents
- Power BI dashboard → Product analysis: presents
- Business decision-maker → Power BI dashboard: explores
