# thatipramod/codealpha_tasks architecture

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

- Interactive diagram: https://gitdiagram.com/thatipramod/codealpha_tasks
- Repository: https://github.com/thatipramod/codealpha_tasks

## Overview

The repository contains two independent Streamlit data-science products. Unemployment Analysis cleans regional time-series data and presents trend, COVID-19, seasonal, and regional views. Sales Prediction explores advertising data, compares regression models, and offers interactive predictions and model analytics. The sales dashboard retrains through model_utils.py; sales_prediction.py separately writes a model artifact. Unemployment source excerpts are partial, so only visible data flow and README-documented analysis capabilities are represented.

Main entry points: [`CodeAlpha_sales_prediction/app.py`](https://github.com/thatipramod/codealpha_tasks/blob/main/CodeAlpha_sales_prediction/app.py) (Dashboard entry), [`CodeAlpha_sales_prediction/model_utils.py`](https://github.com/thatipramod/codealpha_tasks/blob/main/CodeAlpha_sales_prediction/model_utils.py) (Load and train), [`CodeAlpha_UnemploymentAnalysis/analysis.py`](https://github.com/thatipramod/codealpha_tasks/blob/main/CodeAlpha_UnemploymentAnalysis/analysis.py) (Clean and analyze), [`CodeAlpha_sales_prediction/sales_prediction.py`](https://github.com/thatipramod/codealpha_tasks/blob/main/CodeAlpha_sales_prediction/sales_prediction.py) (Prepare and compare)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_unemployment["Unemployment Analysis"]
  node_raw_unemployment["Raw dataset"]
  node_unemployment_analysis["Clean and analyze<br/>[analysis.py]"]
  node_clean_unemployment["Cleaned dataset"]
  node_regional_summary["Regional summary"]
  node_unemployment_dashboard["Analytics dashboard<br/>[app.py]"]
end

subgraph group_sales["Sales Prediction"]
  node_advertising_data["Advertising dataset<br/>[Advertising.csv]"]
  node_sales_pipeline["Prepare and compare"]
  node_clean_sales["Cleaned sales data<br/>[cleaned_data.csv]"]
  node_sales_model_artifact["Saved model"]
  node_sales_app["Dashboard entry<br/>[app.py]"]
  node_sales_utils["Load and train<br/>[model_utils.py]"]
  node_sales_model["Selected regressor<br/>[model_utils.py]"]
end

subgraph group_sales_pages["Sales Dashboard Pages"]
  node_home["Home overview<br/>[app.py]"]
  node_predict["Sales prediction<br/>[predict_sales.py]"]
  node_insights["Data insights<br/>[Data_Insights.py]"]
  node_performance["Model performance"]
  node_importance["Feature importance"]
  node_about["Project information<br/>[About.py]"]
end

node_analyst(("Analyst"))
node_sales_user(("Sales user"))

node_analyst -->|"explores"| node_unemployment_dashboard
node_raw_unemployment -->|"loads and cleans"| node_unemployment_analysis
node_unemployment_analysis -->|"writes cleaned data"| node_clean_unemployment
node_unemployment_analysis -->|"writes summary"| node_regional_summary
node_clean_unemployment -->|"dashboard reads"| node_unemployment_dashboard
node_sales_user -->|"uses"| node_sales_app
node_advertising_data -->|"loads"| node_sales_pipeline
node_sales_pipeline -->|"writes cleaned data"| node_clean_sales
node_sales_pipeline -->|"saves model"| node_sales_model_artifact
node_sales_app -->|"dispatches page"| node_home
node_sales_app -->|"dispatches page"| node_predict
node_sales_app -->|"dispatches page"| node_insights
node_sales_app -->|"dispatches page"| node_performance
node_sales_app -->|"dispatches page"| node_importance
node_sales_app -->|"dispatches page"| node_about
node_sales_app -->|"loads data and trains"| node_sales_utils
node_predict -->|"loads data and trains"| node_sales_utils
node_insights -->|"loads data and trains"| node_sales_utils
node_performance -->|"loads data and trains"| node_sales_utils
node_importance -->|"loads data and trains"| node_sales_utils
node_sales_utils -->|"reads data"| node_clean_sales
node_sales_utils -->|"returns selected model"| node_sales_model
node_predict -->|"predicts sales"| node_sales_model

click node_raw_unemployment "https://github.com/thatipramod/codealpha_tasks/blob/main/CodeAlpha_UnemploymentAnalysis/data/raw/Unemployment%20in%20India.csv"
click node_unemployment_analysis "https://github.com/thatipramod/codealpha_tasks/blob/main/CodeAlpha_UnemploymentAnalysis/analysis.py"
click node_clean_unemployment "https://github.com/thatipramod/codealpha_tasks/blob/main/CodeAlpha_UnemploymentAnalysis/data/cleaned/unemployment_cleaned.csv"
click node_regional_summary "https://github.com/thatipramod/codealpha_tasks/blob/main/CodeAlpha_UnemploymentAnalysis/outputs/regional_summary.csv"
click node_unemployment_dashboard "https://github.com/thatipramod/codealpha_tasks/blob/main/CodeAlpha_UnemploymentAnalysis/app.py"
click node_advertising_data "https://github.com/thatipramod/codealpha_tasks/blob/main/CodeAlpha_sales_prediction/Advertising.csv"
click node_sales_pipeline "https://github.com/thatipramod/codealpha_tasks/blob/main/CodeAlpha_sales_prediction/sales_prediction.py"
click node_clean_sales "https://github.com/thatipramod/codealpha_tasks/blob/main/CodeAlpha_sales_prediction/cleaned_data.csv"
click node_sales_model_artifact "https://github.com/thatipramod/codealpha_tasks/blob/main/CodeAlpha_sales_prediction/models/sales_prediction_model.pkl"
click node_sales_app "https://github.com/thatipramod/codealpha_tasks/blob/main/CodeAlpha_sales_prediction/app.py"
click node_sales_utils "https://github.com/thatipramod/codealpha_tasks/blob/main/CodeAlpha_sales_prediction/model_utils.py"
click node_sales_model "https://github.com/thatipramod/codealpha_tasks/blob/main/CodeAlpha_sales_prediction/model_utils.py"
click node_home "https://github.com/thatipramod/codealpha_tasks/blob/main/CodeAlpha_sales_prediction/app.py"
click node_predict "https://github.com/thatipramod/codealpha_tasks/blob/main/CodeAlpha_sales_prediction/pages/predict_sales.py"
click node_insights "https://github.com/thatipramod/codealpha_tasks/blob/main/CodeAlpha_sales_prediction/pages/Data_Insights.py"
click node_performance "https://github.com/thatipramod/codealpha_tasks/blob/main/CodeAlpha_sales_prediction/pages/Model_Performance.py"
click node_importance "https://github.com/thatipramod/codealpha_tasks/blob/main/CodeAlpha_sales_prediction/pages/Feature_Importance.py"
click node_about "https://github.com/thatipramod/codealpha_tasks/blob/main/CodeAlpha_sales_prediction/pages/About.py"

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_raw_unemployment,node_unemployment_analysis,node_clean_unemployment,node_regional_summary,node_unemployment_dashboard,node_sales_user toneBlue
class node_advertising_data,node_sales_pipeline,node_clean_sales,node_sales_model_artifact,node_sales_app,node_sales_utils,node_sales_model toneAmber
class node_home,node_predict,node_insights,node_performance,node_importance,node_about toneMint
class node_analyst toneIndigo
```

## Components

### Unemployment Analysis

- [Raw dataset](https://github.com/thatipramod/codealpha_tasks/blob/main/CodeAlpha_UnemploymentAnalysis/data/raw/Unemployment%20in%20India.csv): `CodeAlpha_UnemploymentAnalysis/data/raw/Unemployment in India.csv`
- [Clean and analyze](https://github.com/thatipramod/codealpha_tasks/blob/main/CodeAlpha_UnemploymentAnalysis/analysis.py): `CodeAlpha_UnemploymentAnalysis/analysis.py`
- [Cleaned dataset](https://github.com/thatipramod/codealpha_tasks/blob/main/CodeAlpha_UnemploymentAnalysis/data/cleaned/unemployment_cleaned.csv): `CodeAlpha_UnemploymentAnalysis/data/cleaned/unemployment_cleaned.csv`
- [Regional summary](https://github.com/thatipramod/codealpha_tasks/blob/main/CodeAlpha_UnemploymentAnalysis/outputs/regional_summary.csv): `CodeAlpha_UnemploymentAnalysis/outputs/regional_summary.csv`
- [Analytics dashboard](https://github.com/thatipramod/codealpha_tasks/blob/main/CodeAlpha_UnemploymentAnalysis/app.py): `CodeAlpha_UnemploymentAnalysis/app.py`

### Sales Prediction

- [Advertising dataset](https://github.com/thatipramod/codealpha_tasks/blob/main/CodeAlpha_sales_prediction/Advertising.csv): `CodeAlpha_sales_prediction/Advertising.csv`
- [Prepare and compare](https://github.com/thatipramod/codealpha_tasks/blob/main/CodeAlpha_sales_prediction/sales_prediction.py): `CodeAlpha_sales_prediction/sales_prediction.py`
- [Cleaned sales data](https://github.com/thatipramod/codealpha_tasks/blob/main/CodeAlpha_sales_prediction/cleaned_data.csv): `CodeAlpha_sales_prediction/cleaned_data.csv`
- [Saved model](https://github.com/thatipramod/codealpha_tasks/blob/main/CodeAlpha_sales_prediction/models/sales_prediction_model.pkl): `CodeAlpha_sales_prediction/models/sales_prediction_model.pkl`
- [Dashboard entry](https://github.com/thatipramod/codealpha_tasks/blob/main/CodeAlpha_sales_prediction/app.py): `CodeAlpha_sales_prediction/app.py`
- [Load and train](https://github.com/thatipramod/codealpha_tasks/blob/main/CodeAlpha_sales_prediction/model_utils.py): `CodeAlpha_sales_prediction/model_utils.py`
- [Selected regressor](https://github.com/thatipramod/codealpha_tasks/blob/main/CodeAlpha_sales_prediction/model_utils.py): `CodeAlpha_sales_prediction/model_utils.py`

### Sales Dashboard Pages

- [Home overview](https://github.com/thatipramod/codealpha_tasks/blob/main/CodeAlpha_sales_prediction/app.py): `CodeAlpha_sales_prediction/app.py`
- [Sales prediction](https://github.com/thatipramod/codealpha_tasks/blob/main/CodeAlpha_sales_prediction/pages/predict_sales.py): `CodeAlpha_sales_prediction/pages/predict_sales.py`
- [Data insights](https://github.com/thatipramod/codealpha_tasks/blob/main/CodeAlpha_sales_prediction/pages/Data_Insights.py): `CodeAlpha_sales_prediction/pages/Data_Insights.py`
- [Model performance](https://github.com/thatipramod/codealpha_tasks/blob/main/CodeAlpha_sales_prediction/pages/Model_Performance.py): `CodeAlpha_sales_prediction/pages/Model_Performance.py`
- [Feature importance](https://github.com/thatipramod/codealpha_tasks/blob/main/CodeAlpha_sales_prediction/pages/Feature_Importance.py): `CodeAlpha_sales_prediction/pages/Feature_Importance.py`
- [Project information](https://github.com/thatipramod/codealpha_tasks/blob/main/CodeAlpha_sales_prediction/pages/About.py): `CodeAlpha_sales_prediction/pages/About.py`

### Other components

- **Analyst**
- **Sales user**

## Connections

- Analyst → Analytics dashboard: explores
- Raw dataset → Clean and analyze: loads and cleans
- Clean and analyze → Cleaned dataset: writes cleaned data
- Clean and analyze → Regional summary: writes summary
- Cleaned dataset → Analytics dashboard: dashboard reads
- Sales user → Dashboard entry: uses
- Advertising dataset → Prepare and compare: loads
- Prepare and compare → Cleaned sales data: writes cleaned data
- Prepare and compare → Saved model: saves model
- Dashboard entry → Home overview: dispatches page
- Dashboard entry → Sales prediction: dispatches page
- Dashboard entry → Data insights: dispatches page
- Dashboard entry → Model performance: dispatches page
- Dashboard entry → Feature importance: dispatches page
- Dashboard entry → Project information: dispatches page
- Dashboard entry → Load and train: loads data and trains
- Sales prediction → Load and train: loads data and trains
- Data insights → Load and train: loads data and trains
- Model performance → Load and train: loads data and trains
- Feature importance → Load and train: loads data and trains
- Load and train → Cleaned sales data: reads data
- Load and train → Selected regressor: returns selected model
- Sales prediction → Selected regressor: predicts sales
