# granzoy/retentionanalysis architecture

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

- Interactive diagram: https://gitdiagram.com/granzoy/retentionanalysis
- Repository: https://github.com/granzoy/retentionanalysis

## Overview

##### Project type and purpose
- This is a data-analysis project (not a service or full-stack app). Its goal is to analyze Yandex.Rent revenue and retention via metric trees, unit-economics/cohort analysis, and an A/B test.

##### File structure
- Top level:
- AB testing.ipynb – Jupyter notebook for A/B-test analysis
- Unit economics.pdf/.xlsx – cohort and unit-economics data and analysis
- README.md – project description and usage instructions
- .gitattributes – Git config
- There is no “frontend/backend” split or microservice folder; this is a single‐pipeline data project.

##### README for additional insights
- Sections: Metric Tree, Unit Economics & Cohort Analysis, A/B Testing (Z-test for proportions, n=275 per group, 3-month duration).
- Tools: Excel, Python, statistical knowledge.

a. Main components
1. Data Sources
– Source files (.xlsx, raw CSV if any).
2. Data Preparation & Exploration
– Jupyter environment + Python libraries (pandas, numpy, scipy).
3. Metric Tree definition
– PDF artifact representing metric decomposition logic.
4. Unit Economics & Cohort Analysis
– Excel workbook + Python scripts/notebooks.
5. A/B Testing Module
– Jupyter notebook performing Z-tests, generating statistics.
6. Reporting / Visualization
– PDF exports (Metric Tree.pdf, Unit economics.pdf), in-notebook charts.
7. Version Control & Documentation
– Git/GitHub (README.md, .gitattributes).

b. Relationships and interactions
- Data Sources feed into Data Preparation.
- Prepared data flows into two parallel branches: Metric Tree & Unit Economics/Cohort Analysis.
- A/B Testing branch also uses prepared data and outputs statistical results.
- All branches converge into Reporting, producing final PDF artifacts.
- Version Control underlies the entire pipeline.

c. Architectural patterns/design principles
- Linear data-pipeline/workflow pattern.
- Modular analysis stages: each stage is a separate notebook or document.
- Artifacts (PDF, XLSX) as outputs of discrete steps.

d. Key technologies/frameworks
– Python, Jupyter Notebook
– pandas, numpy, scipy (Z-test)
– Excel
– PDF export (built-in notebook or external)
– Git (version control)

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Data Sources"
        DS1[(Unit economics.xlsx)]:::dataSource
    end

    Prep["Data Preparation & Exploration\n(AB testing.ipynb)"]:::processing

    subgraph "Analysis Stages"
        MetricTree[(Metric Tree.pdf)]:::output
        UEProc["Unit Economics & Cohort Analysis\n(Uses Unit economics.xlsx)"]:::processing
        ABProc["A/B Testing Module\n(AB testing.ipynb)"]:::processing
    end

    subgraph "Reporting"
        MetricTree
        UEPDF[(Unit economics.pdf)]:::output
    end

    Version["Version Control & Documentation\n(README.md, .gitattributes)"]:::infra

    DS1 -->|"raw .xlsx"| Prep
    Prep -->|"cleaned DataFrame"| MetricTree
    Prep -->|"filtered Cohort Data"| UEProc
    Prep -->|"prepared Test Groups"| ABProc
    UEProc -->|"cohort metrics"| UEPDF
    ABProc -->|"z-test results"| Reporting

    %% Click Events
    click DS1 "https://github.com/granzoy/retentionanalysis/blob/main/Unit economics.xlsx"
    click Prep "https://github.com/granzoy/retentionanalysis/blob/main/AB testing.ipynb"
    click MetricTree "https://github.com/granzoy/retentionanalysis/blob/main/Metric Tree.pdf"
    click UEProc "https://github.com/granzoy/retentionanalysis/blob/main/Unit economics.xlsx"
    click UEPDF "https://github.com/granzoy/retentionanalysis/blob/main/Unit economics.pdf"
    click ABProc "https://github.com/granzoy/retentionanalysis/blob/main/AB testing.ipynb"
    click MetricTree "https://github.com/granzoy/retentionanalysis/blob/main/Metric Tree.pdf"
    click UEPDF "https://github.com/granzoy/retentionanalysis/blob/main/Unit economics.pdf"
    click Version "https://github.com/granzoy/retentionanalysis/blob/main/README.md"
    click Version "https://github.com/granzoy/retentionanalysis/blob/main/.gitattributes"

    %% Styles
    classDef dataSource fill:#E0F7FA,stroke:#0087A6,color:#005B70;
    classDef processing fill:#E8F5E9,stroke:#2E7D32,color:#1B5E20;
    classDef output fill:#FFF3E0,stroke:#EF6C00,color:#E65100;
    classDef infra fill:#EEEEEE,stroke:#757575,color:#424242;
```
