# madhusudandesai1/royal-enfield---analytics architecture

> Architecture diagram of the GitHub repository madhusudandesai1/royal-enfield---analytics, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/madhusudandesai1/royal-enfield---analytics
- Repository: https://github.com/madhusudandesai1/royal-enfield---analytics

## Overview

This is a Royal Enfield sales and bike-analysis project: it collects bike prices and specifications, combines those with monthly sales data, preprocesses the inputs in Excel, and presents analysis in a three-page Power BI report. The main user workflow is to explore sales performance, model specifications, and price/performance comparisons in the dashboard. The README documents workbook and report behavior, but the workbook internals and PBIX were not sampled; their relationships below reflect the documented workflow.

Main entry points: [`4-power-bi-dashboard/dashboard.pbix`](https://github.com/madhusudandesai1/royal-enfield---analytics/blob/main/4-power-bi-dashboard/dashboard.pbix) (Power BI report), [`1-raw-data-collection/scraper/royal_enfield_scraper.py`](https://github.com/madhusudandesai1/royal-enfield---analytics/blob/main/1-raw-data-collection/scraper/royal_enfield_scraper.py) (Specification scraper), [`1-raw-data-collection/scraper/royal_enfield_prices_scraper.py`](https://github.com/madhusudandesai1/royal-enfield---analytics/blob/main/1-raw-data-collection/scraper/royal_enfield_prices_scraper.py) (Price scraper), [`2-raw-data/monthly_model_sales_raw.xlsx`](https://github.com/madhusudandesai1/royal-enfield---analytics/blob/main/2-raw-data/monthly_model_sales_raw.xlsx) (Monthly sales input)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_collection["Data collection"]
  node_sales_scraper["Specification scraper"]
  node_price_scraper["Price scraper"]
  node_scraped_exports["Scraped exports"]
end

subgraph group_preparation["Excel preparation"]
  node_sales_raw["Monthly sales input"]
  node_bike_raw["Price and spec inputs"]
  node_sales_clean["Sales preparation<br/>[sales_cleaned.xlsm]"]
  node_bike_master["Bike master preparation"]
end

subgraph group_analytics["Power BI analysis"]
  node_report["Power BI report<br/>[dashboard.pbix]"]
  node_sales_page["Sales page<br/>[dashboard.pbix]"]
  node_explorer_page["Explorer page<br/>[dashboard.pbix]"]
  node_pricing_page["Pricing page<br/>[dashboard.pbix]"]
end

node_analyst(("Analyst"))
node_rushlane["RushLane sales"]
node_wheels["91Wheels"]

node_rushlane -->|"provides sales"| node_sales_raw
node_wheels -->|"supplies specs"| node_sales_scraper
node_wheels -->|"supplies prices"| node_price_scraper
node_sales_scraper -->|"exports specs"| node_scraped_exports
node_price_scraper -->|"exports prices"| node_scraped_exports
node_sales_raw -->|"preprocesses"| node_sales_clean
node_bike_raw -->|"combines inputs"| node_bike_master
node_sales_clean -->|"loads sales"| node_report
node_bike_master -->|"loads bike data"| node_report
node_report -->|"shows sales"| node_sales_page
node_report -->|"shows model details"| node_explorer_page
node_report -->|"compares pricing"| node_pricing_page
node_analyst -->|"explores"| node_report

click node_sales_scraper "https://github.com/madhusudandesai1/royal-enfield---analytics/blob/main/1-raw-data-collection/scraper/royal_enfield_scraper.py"
click node_price_scraper "https://github.com/madhusudandesai1/royal-enfield---analytics/blob/main/1-raw-data-collection/scraper/royal_enfield_prices_scraper.py"
click node_scraped_exports "https://github.com/madhusudandesai1/royal-enfield---analytics/tree/main/1-raw-data-collection/scraper/output"
click node_sales_raw "https://github.com/madhusudandesai1/royal-enfield---analytics/blob/main/2-raw-data/monthly_model_sales_raw.xlsx"
click node_bike_raw "https://github.com/madhusudandesai1/royal-enfield---analytics/tree/main/2-raw-data"
click node_sales_clean "https://github.com/madhusudandesai1/royal-enfield---analytics/blob/main/3-cleaned-data/sales_cleaned.xlsm"
click node_bike_master "https://github.com/madhusudandesai1/royal-enfield---analytics/blob/main/3-cleaned-data/bike_master_cleaned.xlsm"
click node_report "https://github.com/madhusudandesai1/royal-enfield---analytics/blob/main/4-power-bi-dashboard/dashboard.pbix"
click node_sales_page "https://github.com/madhusudandesai1/royal-enfield---analytics/blob/main/4-power-bi-dashboard/dashboard.pbix"
click node_explorer_page "https://github.com/madhusudandesai1/royal-enfield---analytics/blob/main/4-power-bi-dashboard/dashboard.pbix"
click node_pricing_page "https://github.com/madhusudandesai1/royal-enfield---analytics/blob/main/4-power-bi-dashboard/dashboard.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_sales_scraper,node_price_scraper,node_scraped_exports toneBlue
class node_sales_raw,node_bike_raw,node_sales_clean,node_bike_master toneAmber
class node_report,node_sales_page,node_explorer_page,node_pricing_page toneMint
class node_analyst,node_rushlane,node_wheels toneIndigo
```

## Components

### Data collection

- [Specification scraper](https://github.com/madhusudandesai1/royal-enfield---analytics/blob/main/1-raw-data-collection/scraper/royal_enfield_scraper.py): `1-raw-data-collection/scraper/royal_enfield_scraper.py`
- [Price scraper](https://github.com/madhusudandesai1/royal-enfield---analytics/blob/main/1-raw-data-collection/scraper/royal_enfield_prices_scraper.py): `1-raw-data-collection/scraper/royal_enfield_prices_scraper.py`
- [Scraped exports](https://github.com/madhusudandesai1/royal-enfield---analytics/tree/main/1-raw-data-collection/scraper/output): `1-raw-data-collection/scraper/output`

### Excel preparation

- [Monthly sales input](https://github.com/madhusudandesai1/royal-enfield---analytics/blob/main/2-raw-data/monthly_model_sales_raw.xlsx): `2-raw-data/monthly_model_sales_raw.xlsx`
- [Price and spec inputs](https://github.com/madhusudandesai1/royal-enfield---analytics/tree/main/2-raw-data): `2-raw-data`
- [Sales preparation](https://github.com/madhusudandesai1/royal-enfield---analytics/blob/main/3-cleaned-data/sales_cleaned.xlsm): `3-cleaned-data/sales_cleaned.xlsm`
- [Bike master preparation](https://github.com/madhusudandesai1/royal-enfield---analytics/blob/main/3-cleaned-data/bike_master_cleaned.xlsm): `3-cleaned-data/bike_master_cleaned.xlsm`

### Power BI analysis

- [Power BI report](https://github.com/madhusudandesai1/royal-enfield---analytics/blob/main/4-power-bi-dashboard/dashboard.pbix): `4-power-bi-dashboard/dashboard.pbix`
- [Sales page](https://github.com/madhusudandesai1/royal-enfield---analytics/blob/main/4-power-bi-dashboard/dashboard.pbix): `4-power-bi-dashboard/dashboard.pbix`
- [Explorer page](https://github.com/madhusudandesai1/royal-enfield---analytics/blob/main/4-power-bi-dashboard/dashboard.pbix): `4-power-bi-dashboard/dashboard.pbix`
- [Pricing page](https://github.com/madhusudandesai1/royal-enfield---analytics/blob/main/4-power-bi-dashboard/dashboard.pbix): `4-power-bi-dashboard/dashboard.pbix`

### Other components

- **Analyst**
- **RushLane sales**
- **91Wheels**

## Connections

- RushLane sales → Monthly sales input: provides sales (evidence: `README.md`)
- 91Wheels → Specification scraper: supplies specs (evidence: `README.md`)
- 91Wheels → Price scraper: supplies prices (evidence: `README.md`)
- Specification scraper → Scraped exports: exports specs (evidence: `README.md`)
- Price scraper → Scraped exports: exports prices (evidence: `README.md`)
- Monthly sales input → Sales preparation: preprocesses (evidence: `README.md`)
- Price and spec inputs → Bike master preparation: combines inputs (evidence: `README.md`)
- Sales preparation → Power BI report: loads sales (evidence: `README.md`)
- Bike master preparation → Power BI report: loads bike data (evidence: `README.md`)
- Power BI report → Sales page: shows sales (evidence: `README.md`)
- Power BI report → Explorer page: shows model details (evidence: `README.md`)
- Power BI report → Pricing page: compares pricing (evidence: `README.md`)
- Analyst → Power BI report: explores (evidence: `README.md`)
