# deepakns021/housing-price-analysis architecture

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

- Interactive diagram: https://gitdiagram.com/deepakns021/housing-price-analysis
- Repository: https://github.com/deepakns021/housing-price-analysis

## Overview

This repository analyzes North Andover home sales to estimate the relationship between housing features, incinerator proximity, and price, then exposes predictions through a Streamlit app. The documented workflow runs from source data through exploratory analysis and OLS modeling to an interactive prediction or near/far comparison. App and README evidence supports the runtime model-loading and prediction links; notebook internals were not sampled, so analysis details are limited to documented capabilities.

Main entry points: [`app.py`](https://github.com/deepakns021/housing-price-analysis/blob/main/app.py) (Streamlit Interface), [`model.pkl`](https://github.com/deepakns021/housing-price-analysis/blob/main/model.pkl) (Trained Model), [`data/incinerator.xlsx`](https://github.com/deepakns021/housing-price-analysis/blob/main/data/incinerator.xlsx) (Home Sales), [`notebook.ipynb`](https://github.com/deepakns021/housing-price-analysis/blob/main/notebook.ipynb) (Exploratory Analysis)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_analysis["Data Analysis"]
  node_sales[("Home Sales<br/>[incinerator.xlsx]")]
  node_eda["Exploratory Analysis<br/>[notebook.ipynb]"]
  node_effects["Proximity Analysis<br/>[notebook.ipynb]"]
end

subgraph group_modeling["Price Modeling"]
  node_regression["OLS Regression<br/>[notebook.ipynb]"]
  node_model["Trained Model<br/>[model.pkl]"]
end

subgraph group_app["Prediction App"]
  node_interface["Streamlit Interface<br/>[app.py]"]
  node_features["Feature Encoding<br/>[app.py]"]
  node_prediction["Price Prediction<br/>[app.py]"]
  node_comparison["Near-Far Comparison<br/>[app.py]"]
  node_insights["Business Insights<br/>[app.py]"]
end

node_user(("Stakeholder"))

node_sales -->|"analyzed in"| node_eda
node_eda -->|"examines"| node_effects
node_sales -->|"modeled from"| node_regression
node_regression -->|"produces"| node_model
node_user -->|"provides inputs"| node_interface
node_interface -->|"loads"| node_model
node_interface -->|"encodes inputs"| node_features
node_interface -->|"requests prediction"| node_prediction
node_features -->|"supplies features"| node_prediction
node_model -->|"predicts"| node_prediction
node_interface -->|"requests scenarios"| node_comparison
node_features -->|"supplies scenarios"| node_comparison
node_model -->|"predicts scenarios"| node_comparison
node_prediction -->|"returns estimate"| node_interface
node_comparison -->|"returns price impact"| node_interface
node_interface -->|"displays"| node_insights
node_insights -->|"shows findings"| node_user
node_prediction -->|"shows estimate"| node_user
node_comparison -->|"shows comparison"| node_user

click node_sales "https://github.com/deepakns021/housing-price-analysis/blob/main/data/incinerator.xlsx"
click node_eda "https://github.com/deepakns021/housing-price-analysis/blob/main/notebook.ipynb"
click node_effects "https://github.com/deepakns021/housing-price-analysis/blob/main/notebook.ipynb"
click node_regression "https://github.com/deepakns021/housing-price-analysis/blob/main/notebook.ipynb"
click node_model "https://github.com/deepakns021/housing-price-analysis/blob/main/model.pkl"
click node_interface "https://github.com/deepakns021/housing-price-analysis/blob/main/app.py"
click node_features "https://github.com/deepakns021/housing-price-analysis/blob/main/app.py"
click node_prediction "https://github.com/deepakns021/housing-price-analysis/blob/main/app.py"
click node_comparison "https://github.com/deepakns021/housing-price-analysis/blob/main/app.py"
click node_insights "https://github.com/deepakns021/housing-price-analysis/blob/main/app.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_sales,node_eda,node_effects toneBlue
class node_regression,node_model toneAmber
class node_interface,node_features,node_prediction,node_comparison,node_insights toneMint
class node_user toneIndigo
```

## Components

### Data Analysis

- [Home Sales](https://github.com/deepakns021/housing-price-analysis/blob/main/data/incinerator.xlsx): `data/incinerator.xlsx`
- [Exploratory Analysis](https://github.com/deepakns021/housing-price-analysis/blob/main/notebook.ipynb): `notebook.ipynb`
- [Proximity Analysis](https://github.com/deepakns021/housing-price-analysis/blob/main/notebook.ipynb): `notebook.ipynb`

### Price Modeling

- [OLS Regression](https://github.com/deepakns021/housing-price-analysis/blob/main/notebook.ipynb): `notebook.ipynb`
- [Trained Model](https://github.com/deepakns021/housing-price-analysis/blob/main/model.pkl): `model.pkl`

### Prediction App

- [Streamlit Interface](https://github.com/deepakns021/housing-price-analysis/blob/main/app.py): `app.py`
- [Feature Encoding](https://github.com/deepakns021/housing-price-analysis/blob/main/app.py): `app.py`
- [Price Prediction](https://github.com/deepakns021/housing-price-analysis/blob/main/app.py): `app.py`
- [Near-Far Comparison](https://github.com/deepakns021/housing-price-analysis/blob/main/app.py): `app.py`
- [Business Insights](https://github.com/deepakns021/housing-price-analysis/blob/main/app.py): `app.py`

### Other components

- **Stakeholder**

## Connections

- Home Sales → Exploratory Analysis: analyzed in
- Exploratory Analysis → Proximity Analysis: examines
- Home Sales → OLS Regression: modeled from
- OLS Regression → Trained Model: produces
- Stakeholder → Streamlit Interface: provides inputs
- Streamlit Interface → Trained Model: loads
- Streamlit Interface → Feature Encoding: encodes inputs
- Streamlit Interface → Price Prediction: requests prediction
- Feature Encoding → Price Prediction: supplies features
- Trained Model → Price Prediction: predicts
- Streamlit Interface → Near-Far Comparison: requests scenarios
- Feature Encoding → Near-Far Comparison: supplies scenarios
- Trained Model → Near-Far Comparison: predicts scenarios
- Price Prediction → Streamlit Interface: returns estimate
- Near-Far Comparison → Streamlit Interface: returns price impact
- Streamlit Interface → Business Insights: displays
- Business Insights → Stakeholder: shows findings
- Price Prediction → Stakeholder: shows estimate
- Near-Far Comparison → Stakeholder: shows comparison
