# rpradyrao/stock_market_analysis architecture

> Architecture diagram of the GitHub repository rpradyrao/stock_market_analysis, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rpradyrao/stock_market_analysis
- Repository: https://github.com/rpradyrao/stock_market_analysis

## Overview

This repository documents a Hive-based stock-analysis project rather than providing executable source. Its documented workflow imports seven years of stock prices and company metadata from MySQL via Sqoop, joins and aggregates them in Hive by company and month, then answers investment, state/industry-growth, and sector-year questions. The data archive and CSV are present, but the README does not establish how those files relate to the MySQL pipeline. Relationships below reflect the README only.

Main entry points: [`README.md`](https://github.com/rpradyrao/stock_market_analysis/blob/master/README.md) (Monthly company aggregate)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_sources["Data sources"]
  node_mysql[("MySQL tables<br/>[README.md]")]
  node_archive[("Stock data archive<br/>[StockPrices.zip]")]
  node_companies_csv["Company CSV<br/>[Stockcompanies.csv]"]
end

subgraph group_pipeline["Hive data pipeline"]
  node_sqoop["Sqoop import<br/>[README.md]"]
  node_hive_raw[("Hive source tables<br/>[README.md]")]
  node_monthly_join[("Monthly company aggregate<br/>[README.md]")]
end

subgraph group_analysis["Exploratory analysis"]
  node_investment["Investment ranking<br/>[README.md]"]
  node_state_growth["State industry growth<br/>[README.md]"]
  node_sector_years["Sector year comparison<br/>[README.md]"]
end

node_analyst(("Analyst"))

node_mysql -->|"supplies tables"| node_sqoop
node_sqoop -->|"imports tables"| node_hive_raw
node_hive_raw -->|"joins and aggregates"| node_monthly_join
node_analyst -->|"requests analysis"| node_investment
node_analyst -->|"requests analysis"| node_state_growth
node_analyst -->|"requests analysis"| node_sector_years
node_monthly_join -->|"supports ranking"| node_investment
node_monthly_join -->|"supports comparison"| node_state_growth
node_monthly_join -->|"supports comparison"| node_sector_years

click node_mysql "https://github.com/rpradyrao/stock_market_analysis/blob/master/README.md"
click node_archive "https://github.com/rpradyrao/stock_market_analysis/blob/master/StockPrices.zip"
click node_companies_csv "https://github.com/rpradyrao/stock_market_analysis/blob/master/Stockcompanies.csv"
click node_sqoop "https://github.com/rpradyrao/stock_market_analysis/blob/master/README.md"
click node_hive_raw "https://github.com/rpradyrao/stock_market_analysis/blob/master/README.md"
click node_monthly_join "https://github.com/rpradyrao/stock_market_analysis/blob/master/README.md"
click node_investment "https://github.com/rpradyrao/stock_market_analysis/blob/master/README.md"
click node_state_growth "https://github.com/rpradyrao/stock_market_analysis/blob/master/README.md"
click node_sector_years "https://github.com/rpradyrao/stock_market_analysis/blob/master/README.md"

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_mysql,node_archive,node_companies_csv toneBlue
class node_sqoop,node_hive_raw,node_monthly_join toneAmber
class node_investment,node_state_growth,node_sector_years toneMint
class node_analyst toneIndigo
```

## Components

### Data sources

- [MySQL tables](https://github.com/rpradyrao/stock_market_analysis/blob/master/README.md): `README.md`
- [Stock data archive](https://github.com/rpradyrao/stock_market_analysis/blob/master/StockPrices.zip): `StockPrices.zip`
- [Company CSV](https://github.com/rpradyrao/stock_market_analysis/blob/master/Stockcompanies.csv): `Stockcompanies.csv`

### Hive data pipeline

- [Sqoop import](https://github.com/rpradyrao/stock_market_analysis/blob/master/README.md): `README.md`
- [Hive source tables](https://github.com/rpradyrao/stock_market_analysis/blob/master/README.md): `README.md`
- [Monthly company aggregate](https://github.com/rpradyrao/stock_market_analysis/blob/master/README.md): `README.md`

### Exploratory analysis

- [Investment ranking](https://github.com/rpradyrao/stock_market_analysis/blob/master/README.md): `README.md`
- [State industry growth](https://github.com/rpradyrao/stock_market_analysis/blob/master/README.md): `README.md`
- [Sector year comparison](https://github.com/rpradyrao/stock_market_analysis/blob/master/README.md): `README.md`

### Other components

- **Analyst**

## Connections

- MySQL tables → Sqoop import: supplies tables (evidence: `README.md`)
- Sqoop import → Hive source tables: imports tables (evidence: `README.md`)
- Hive source tables → Monthly company aggregate: joins and aggregates (evidence: `README.md`)
- Analyst → Investment ranking: requests analysis (evidence: `README.md`)
- Analyst → State industry growth: requests analysis (evidence: `README.md`)
- Analyst → Sector year comparison: requests analysis (evidence: `README.md`)
- Monthly company aggregate → Investment ranking: supports ranking (evidence: `README.md`)
- Monthly company aggregate → State industry growth: supports comparison (evidence: `README.md`)
- Monthly company aggregate → Sector year comparison: supports comparison (evidence: `README.md`)
