# vivasvana1/funnelanalysis architecture

> Architecture diagram of the GitHub repository vivasvana1/funnelanalysis, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-07-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/vivasvana1/funnelanalysis
- Repository: https://github.com/vivasvana1/funnelanalysis

## Overview

##### Project type and purpose
- This is a data-analytics pipeline for Ecommerce Funnel Optimization & Revenue Leakage Analysis.
- It ingests cleaned session data, performs Exploratory Data Analysis (EDA) and statistical tests in Python notebooks, builds SQL views for campaign targeting, runs scenario simulations in Excel, and delivers dashboards in Power BI.

##### File structure
- Top-level artifacts:
- Jupyter Notebooks:
– FunnelAnalysis_1 (Cleaning & Sampling)
– FunnelAnalysis_2 (EDA & Statistical Analysis)
– FunnelAnalysis_3 (Final Analyses & Report)
- SQL scripts: Funnel.sql (defines materialized views and decision-engine outputs)
- Excel: Funnel Analysis Simulated Solutions.xlsx (revenue forecasting & scenario simulation)
- Power BI: Funnel Analysis.pbix (dashboards for executive visibility)
- Reference Datasets folder: raw CSV files used as input data
- Plotly visuals folder: static or interactive charts exported from notebooks
- No traditional “frontend/backend” code; instead this is a data workflow pipeline.

##### README for additional insights
- Phases:
A. Data cleaning & sampling → Python
B. EDA & statistical testing → Python (Chi-Square, ANOVA, etc.)
C. Decision-engine SQL views → targeted user-SKU datasets
D. Excel simulations → revenue & scenario modeling
E. Power BI dashboards → real-time monitoring & strategic reporting
- Data products flow between these phases.

##### Detailed separation
- Break out each notebook phase as its own component.
- SQL output views individually or group them logically by campaign type.
- Plotly visuals folder as a supporting artifact between notebooks and report.
- Refresh schedules or triggers (e.g., “Notebooks run daily”).

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Data Sources
    subgraph "Data Sources"
        direction TB
        KPI["KPI_Summary.csv"]:::datastore
        PS["ProductSegments.csv"]:::datastore
        UB["UserBehaviour1.csv"]:::datastore
        FSF["funnel_session_flags.csv"]:::datastore
        SRR["session_retention_rates.csv"]:::datastore
    end

    %% Data Processing Layer
    subgraph "Data Processing Layer"
        direction TB
        N1["FunnelAnalysis_1: Cleaning & Sampling"]:::process
        N2["FunnelAnalysis_2: EDA & Statistical Analysis"]:::process
        N3["FunnelAnalysis_3: Final Analyses & Report"]:::process
        PV["Plotly visuals"]:::visual
    end

    %% SQL Engine
    SQL[(Decision-engine SQL Views)]:::datastore

    %% Modeling & Simulation
    EXCEL[/Funnel Analysis Simulated Solutions.xlsx/]:::modeling

    %% Reporting & Visualization
    PBIX[/Funnel Analysis.pbix/]:::dashboard

    %% End Users
    subgraph "End Users"
        direction TB
        MU["Marketing & Product & CRM"]:::external
    end

    %% Data Flows
    KPI -->|ingest| N1
    PS -->|ingest| N1
    UB -->|ingest| N1
    FSF -->|ingest| N1
    SRR -->|ingest| N1

    N1 -->|cleaned data| N2
    N2 -->|analysis outputs| N3
    N2 -->|visual exports| PV
    N3 -->|export to SQL| SQL

    SQL -->|data extracts| EXCEL
    SQL -->|live views| PBIX
    EXCEL -->|scenario outputs| PBIX

    PBIX -->|reports delivered| MU

    %% Click Events
    click KPI "https://github.com/vivasvana1/funnelanalysis/blob/main/Reference Datasets/KPI_Summary.csv"
    click PS "https://github.com/vivasvana1/funnelanalysis/blob/main/Reference Datasets/ProductSegments.csv"
    click UB "https://github.com/vivasvana1/funnelanalysis/blob/main/Reference Datasets/UserBehaviour1.csv"
    click FSF "https://github.com/vivasvana1/funnelanalysis/blob/main/Reference Datasets/funnel_session_flags.csv"
    click SRR "https://github.com/vivasvana1/funnelanalysis/blob/main/Reference Datasets/session_retention_rates.csv"
    click N1 "https://github.com/vivasvana1/funnelanalysis/blob/main/FunnelAnalysis_1(Cleaning and Sampling).ipynb"
    click N2 "https://github.com/vivasvana1/funnelanalysis/blob/main/FunnelAnalysis_2(EDA and Statistical Analysis).ipynb"
    click N3 "https://github.com/vivasvana1/funnelanalysis/blob/main/FunnelAnalysis_3(Final_Analyses and Report).ipynb"
    click PV "https://github.com/vivasvana1/funnelanalysis/tree/main/Plotly visuals/"
    click SQL "https://github.com/vivasvana1/funnelanalysis/blob/main/Funnel.sql"
    click EXCEL "https://github.com/vivasvana1/funnelanalysis/blob/main/Funnel Analysis Simulated Solutions.xlsx"
    click PBIX "https://github.com/vivasvana1/funnelanalysis/blob/main/Funnel Analysis.pbix"

    %% Styles
    classDef datastore fill:#1f77b4,stroke:#333,stroke-width:1px,color:#fff;
    classDef process fill:#2ca02c,stroke:#333,stroke-width:1px,color:#fff;
    classDef visual fill:#17becf,stroke:#333,stroke-width:1px,color:#fff;
    classDef modeling fill:#ff7f0e,stroke:#333,stroke-width:1px,color:#fff;
    classDef dashboard fill:#9467bd,stroke:#333,stroke-width:1px,color:#fff;
    classDef external fill:#7f7f7f,stroke:#333,stroke-width:1px,color:#fff;
```
