# nooranalytics/customer-analysis architecture

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

- Interactive diagram: https://gitdiagram.com/nooranalytics/customer-analysis
- Repository: https://github.com/nooranalytics/customer-analysis

## Overview

##### Project type and purpose
- This is a data-analysis/EDA project (not a full-stack app). It uses Jupyter (analysis.ipynb) to explore user and purchase CSV data for a Meditation App, with the goal of understanding customer demographics, conversion rates, and revenue patterns.

##### File structure
- Top-level:
- analysis.ipynb – main analysis notebook
- data/ – all raw CSV inputs
- data/ contains:
- user_demographics_v1.csv
- user_demographics_paywall.csv
- purchase_data_v1.csv
- AB_testing_exercise.csv
- daily_revenue.csv
- No backend/server code, no deployment scripts—purely data ingestion→analysis→visualization.

##### Extract additional insights from README
- Reads two primary CSVs (demographics + purchase), but extra files suggest A/B testing and revenue‐over‐time analyses additions.
- Dependencies: pandas, numpy, scipy, statsmodels, seaborn, matplotlib, scikit-learn, pingouin.
- Workflow is: clone→install libs→open notebook→run.

a. Main components
1) Data Sources
- Five CSV files in data/
2) Data Ingestion Layer
- pandas I/O reading CSVs
3) Data Processing & Transformation
- pandas/numpy operations, merging, cleaning
4) Statistical & ML Modules
- scipy/statsmodels for significance tests
- pingouin for A/B testing
- scikit-learn for any modeling
5) Visualization Layer
- matplotlib/seaborn charts
6) Presentation Layer
- Jupyter notebook interface
b. Relationships & interactions
- Ingestion → Processing/Transformation
- Processing → Statistical modules (branch)
- Processing → Visualization
- Statistical modules → Visualization
- All outputs loop back into analysis.ipynb
c. Architectural patterns / design principles
- Linear data pipeline: Data → ETL → Analysis → Visualization
- Single orchestrator (Jupyter notebook) drives workflow
- Modular use of libraries for separable concerns (I/O vs. stats vs. viz)
d. Key technologies / libraries
- pandas for DataFrame operations
- numpy for numerical arrays
- scipy/statsmodels/pingouin for inferential stats
- scikit-learn for predictive modeling
- seaborn/matplotlib for plots
- Jupyter Notebook as the interactive shell

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph "Data Sources"
        AB["AB_testing_exercise.csv"]:::data
        DR["daily_revenue.csv"]:::data
        PD["purchase_data_v1.csv"]:::data
        UD_pay["user_demographics_paywall.csv"]:::data
        UD1["user_demographics_v1.csv"]:::data
    end

    Ingest["pandas.read_csv()"]:::ingest
    Process["Data Cleaning & Merging"]:::process

    subgraph "Statistical & ML Modules"
        Stats["scipy / statsmodels / pingouin"]:::stats
        ML["scikit-learn"]:::stats
    end

    Viz["matplotlib & seaborn"]:::viz
    Notebook["analysis.ipynb (Jupyter Notebook)"]:::notebook
    ReadMe["readMe.md"]:::doc

    AB -->|reads| Ingest
    DR -->|reads| Ingest
    PD -->|reads| Ingest
    UD_pay -->|reads| Ingest
    UD1 -->|reads| Ingest

    Ingest -->|produces DataFrame| Process
    Process -->|input to| Stats
    Process -->|input to| ML
    Process -->|input to| Viz

    Stats -->|test results| Viz
    ML -->|model output| Viz

    Ingest -->|raw DataFrames| Notebook
    Process -->|cleaned data| Notebook
    Stats -->|stats outputs| Notebook
    ML -->|model metrics| Notebook
    Viz -->|plots| Notebook
    ReadMe -.->|documentation| Notebook

    click AB "https://github.com/nooranalytics/customer-analysis/blob/main/data/AB_testing_exercise.csv"
    click DR "https://github.com/nooranalytics/customer-analysis/blob/main/data/daily_revenue.csv"
    click PD "https://github.com/nooranalytics/customer-analysis/blob/main/data/purchase_data_v1.csv"
    click UD_pay "https://github.com/nooranalytics/customer-analysis/blob/main/data/user_demographics_paywall.csv"
    click UD1 "https://github.com/nooranalytics/customer-analysis/blob/main/data/user_demographics_v1.csv"
    click Ingest "https://github.com/nooranalytics/customer-analysis/blob/main/analysis.ipynb"
    click Process "https://github.com/nooranalytics/customer-analysis/blob/main/analysis.ipynb"
    click Stats "https://github.com/nooranalytics/customer-analysis/blob/main/analysis.ipynb"
    click ML "https://github.com/nooranalytics/customer-analysis/blob/main/analysis.ipynb"
    click Viz "https://github.com/nooranalytics/customer-analysis/blob/main/analysis.ipynb"
    click Notebook "https://github.com/nooranalytics/customer-analysis/blob/main/analysis.ipynb"
    click ReadMe "https://github.com/nooranalytics/customer-analysis/blob/main/readMe.md"

    classDef data fill:#CCCCCC,stroke:#333,stroke-width:1px
    classDef ingest fill:#ADD8E6,stroke:#333,stroke-width:1px
    classDef process fill:#ADD8E6,stroke:#333,stroke-width:1px
    classDef stats fill:#90EE90,stroke:#333,stroke-width:1px
    classDef viz fill:#FFA500,stroke:#333,stroke-width:1px
    classDef notebook fill:#FFD700,stroke:#333,stroke-width:1px
    classDef doc fill:#DDDDDD,stroke:#333,stroke-width:1px
```
