How chaitanyaphatak/data-analytics-customer-behavior-project works
1. Repository purpose
- This is a customer behavior analytics project, not a production application.
- The architecture is a simple analytics pipeline: raw CSV data → Python cleaning/EDA → SQL analysis in PostgreSQL → Power BI dashboard → report/presentation outputs.
2. Data layer
- data/raw_data/customer_shopping_behavior.csv is the source dataset.
- data/processed_data/cleaned_data.csv is the curated downstream dataset after preprocessing.
- The raw/processed split is the main boundary between source data and analysis-ready data.
3. Python analysis workspace
- notebooks/Customer_Shopping_Behaviour_Analysis.ipynb is the main computational environment.
- It likely performs ingestion, cleaning, feature engineering, and exploratory analysis.
- This notebook is the core transformation layer that turns the raw dataset into insights and a cleaned export.
4. Preprocessing and feature engineering boundary
- The README indicates the notebook handles missing values, standardizes column names, and adds derived fields such as age_group and purchase_frequency_days.
- This is the point where transactional data is normalized into a more analytics-friendly schema.
- The cleaned output becomes the handoff artifact for both SQL and dashboarding.
5. SQL / warehouse-style analysis layer
- sql/customer_behavior_sql_queries.sql contains the analytical queries.
- The README says cleaned data is loaded into PostgreSQL, so SQL is the structured query layer over the prepared dataset.
- This subsystem supports aggregation, segmentation, and KPI calculations separate from Python notebook exploration.
6. Dashboarding / BI layer
- visualizations/Customer_Behavior_Dashboard.pbix is the presentation and interaction layer.
- Power BI consumes the cleaned/queried data to provide interactive filtering by gender, category, and subscription status.
- This is the main end-user interface for business consumers of the analysis.
7. Business intelligence outputs
- The dashboard emphasizes KPIs such as total customers, average purchase value, and average rating.
- It also surfaces revenue breakdowns, category trends, and segment comparisons.
- These outputs are derived, not raw, and represent the final analytical product.
8. Reporting / communication layer
- report/Customer Shopping Behavior Analysis.pdf and the .pptx presentation are communication artifacts.
- They translate the analytical findings into a format suitable for stakeholders.
- In architecture terms, these are terminal deliverables produced from the analytical pipeline rather than operational components.
9. Supporting assets
- img/ contains preview imagery used for documentation or presentation of the dashboard.
- These assets do not affect computation, but they support the documentation and portfolio layer of the project.
10. Environment and dependencies
- requirements.txt defines the Python analytics stack, centered on pandas/numpy and plotting libraries.
- The README also references PostgreSQL and Power BI as major external tools, so the repo spans local Python analysis plus external data storage and BI visualization.
11. End-to-end data flow
- The dominant flow is: raw CSV ingestion in the notebook → cleaning/feature engineering → export to cleaned_data.csv → load into PostgreSQL / query via SQL → visualize in Power BI → summarize in PDF/PPTX.
- This is a classic offline analytics pipeline with clear stage separation.
12. Key architectural boundary
- The most important boundary is between data preparation and consumption.
- Python owns preparation and enrichment; SQL/PostgreSQL owns structured analytical access; Power BI owns interactive consumption; reports own static communication.
- That separation is what should be reflected in any architecture diagram.
Main entry points: Customer_Behavior_Dashboard.pbix Dashboard · Customer_Shopping_Behaviour_Analysis.ipynb Analysis Notebook · cleaned_data.csv Cleaned CSV · customer_behavior_sql_queries.sql SQL Queries
Components 16
Data Layer
Raw and processed datasets forming the source-to-curated boundary.
- Raw CSV · Original customer shopping behavior dataset.
data/raw_data/customer_shopping_behavior.csv - Cleaned CSV · Processed analysis-ready dataset exported from Python.
data/processed_data/cleaned_data.csv
Preparation
Python notebook workspace that cleans and enriches the data.
- Analysis Notebook · Main Python workspace for ingestion, cleaning, feature engineering, and EDA.
notebooks/Customer_Shopping_Behaviour_Analysis.ipynb - Cleaning · Handles missing values and standardizes column names.
notebooks/Customer_Shopping_Behaviour_Analysis.ipynb - Features · Derives fields such as age groups and purchase frequency.
notebooks/Customer_Shopping_Behaviour_Analysis.ipynb - EDA · Exploratory analysis used to surface patterns and insights.
notebooks/Customer_Shopping_Behaviour_Analysis.ipynb
SQL Analytics
Structured query layer over prepared data in PostgreSQL.
- SQL Queries · Analytical queries for segmentation, aggregation, and KPI calculations.
sql/customer_behavior_sql_queries.sql - PostgreSQL · Structured data store and query engine for analytical access.
BI Layer
Interactive dashboarding and business consumption layer.
- Dashboard · Interactive BI layer with filtering and KPI visualization.
visualizations/Customer_Behavior_Dashboard.pbix - KPIs · Core measures such as customer count, average purchase value, and rating.
visualizations/Customer_Behavior_Dashboard.pbix - Segments · Breakdowns by gender, category, and subscription status.
visualizations/Customer_Behavior_Dashboard.pbix
Outputs
Static deliverables and supporting presentation assets.
- PDF Report · Formal written summary of findings for stakeholders.
report/Customer Shopping Behavior Analysis.pdf - Slides · Presentation deck for communicating the analysis.
report/Customer-Shopping-Behavior-Analysis (1).pptx - Images · Preview and documentation imagery used alongside the project.
img
Project Docs
Repository documentation and dependency definition.
- README · High-level description of the workflow, tools, and deliverables.
README.md - Requirements · Python package dependencies for the analytics environment.
requirements.txt
Connections 16
- Raw CSV → Analysis Notebook: ingest · Notebook reads the raw dataset for preparation and exploration.
- Analysis Notebook → Cleaning: normalize · Notebook performs missing-value handling and column standardization.
- Cleaning → Features: enrich · Prepared data is expanded with derived analytical fields.
- Features → EDA: analyze · Derived data is explored to identify trends and patterns.
- Features → Cleaned CSV: export · Notebook writes the curated dataset for downstream use.
- Cleaned CSV → PostgreSQL: load · Cleaned data is loaded into PostgreSQL for structured analysis.
- PostgreSQL → SQL Queries: query · SQL script expresses aggregations, segmentation, and KPI logic.
- PostgreSQL → Dashboard: serve · Prepared data feeds the dashboard model and visuals.
- SQL Queries → Dashboard: metrics · SQL-derived results support BI calculations and views.
- Dashboard → KPIs: display · Dashboard presents business summary measures.
- Dashboard → Segments: filter · Dashboard enables interactive breakdowns and comparisons.
- KPIs → PDF Report: summarize · Key findings are distilled into the written report.
- Segments → Slides: present · Segment insights are packaged into the presentation deck.
- Images → Slides: support · Preview assets support documentation and presentation materials.
- README → Analysis Notebook: describe · README documents the analysis workflow and notebook role.
- Requirements → Analysis Notebook: enable · Dependencies define the Python analytics environment.