# fahadpashaa/comp2040-assignment3 architecture

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

- Interactive diagram: https://gitdiagram.com/fahadpashaa/comp2040-assignment3
- Repository: https://github.com/fahadpashaa/comp2040-assignment3

## Overview

This repository is a notebook-based Los Angeles crime analysis project. Its documented workflow reads the crime CSV, cleans and engineers features, explores patterns, trains a baseline Logistic Regression model, and interprets the results. The README and helper source were inspected; notebook source was not sampled, so the stage sequence reflects the documented workflow rather than verified cell-level calls.

Main entry points: [`notebooks/analysis.ipynb`](https://github.com/fahadpashaa/comp2040-assignment3/blob/main/notebooks/analysis.ipynb) (Clean Data), [`data/Crime_Data_from_2020_to_2024.csv`](https://github.com/fahadpashaa/comp2040-assignment3/blob/main/data/Crime_Data_from_2020_to_2024.csv) (Crime CSV), [`src/helpers.py`](https://github.com/fahadpashaa/comp2040-assignment3/blob/main/src/helpers.py) (Analysis Helpers)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_inputs["Data Input"]
  node_crime_data["Crime CSV"]
end

subgraph group_workflow["Analysis Workflow"]
  node_cleaning["Clean Data<br/>[analysis.ipynb]"]
  node_features["Engineer Features<br/>[analysis.ipynb]"]
  node_eda["Explore Patterns<br/>[analysis.ipynb]"]
  node_model["Logistic Regression<br/>[analysis.ipynb]"]
  node_interpretation["Interpret Results<br/>[analysis.ipynb]"]
  node_storytelling["Crime Storytelling"]
end

subgraph group_support["Reusable Helpers"]
  node_helpers["Analysis Helpers<br/>[helpers.py]"]
end

node_analyst(("Analyst"))

node_analyst -->|"runs notebook"| node_cleaning
node_crime_data -->|"provides records"| node_cleaning
node_cleaning -->|"prepares data"| node_features
node_features -->|"supports exploration"| node_eda
node_features -->|"supplies features"| node_model
node_model -->|"produces scores"| node_interpretation
node_cleaning -->|"calls helpers"| node_helpers

click node_crime_data "https://github.com/fahadpashaa/comp2040-assignment3/blob/main/data/Crime_Data_from_2020_to_2024.csv"
click node_cleaning "https://github.com/fahadpashaa/comp2040-assignment3/blob/main/notebooks/analysis.ipynb"
click node_features "https://github.com/fahadpashaa/comp2040-assignment3/blob/main/notebooks/analysis.ipynb"
click node_eda "https://github.com/fahadpashaa/comp2040-assignment3/blob/main/notebooks/analysis.ipynb"
click node_model "https://github.com/fahadpashaa/comp2040-assignment3/blob/main/notebooks/analysis.ipynb"
click node_interpretation "https://github.com/fahadpashaa/comp2040-assignment3/blob/main/notebooks/analysis.ipynb"
click node_helpers "https://github.com/fahadpashaa/comp2040-assignment3/blob/main/src/helpers.py"
click node_storytelling "https://github.com/fahadpashaa/comp2040-assignment3/blob/main/notebooks/LA_Crime_Storytelling.ipynb"

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_crime_data toneBlue
class node_cleaning,node_features,node_eda,node_model,node_interpretation,node_storytelling toneAmber
class node_helpers toneMint
class node_analyst toneIndigo
```

## Components

### Data Input

- [Crime CSV](https://github.com/fahadpashaa/comp2040-assignment3/blob/main/data/Crime_Data_from_2020_to_2024.csv): `data/Crime_Data_from_2020_to_2024.csv`

### Analysis Workflow

- [Clean Data](https://github.com/fahadpashaa/comp2040-assignment3/blob/main/notebooks/analysis.ipynb): `notebooks/analysis.ipynb`
- [Engineer Features](https://github.com/fahadpashaa/comp2040-assignment3/blob/main/notebooks/analysis.ipynb): `notebooks/analysis.ipynb`
- [Explore Patterns](https://github.com/fahadpashaa/comp2040-assignment3/blob/main/notebooks/analysis.ipynb): `notebooks/analysis.ipynb`
- [Logistic Regression](https://github.com/fahadpashaa/comp2040-assignment3/blob/main/notebooks/analysis.ipynb): `notebooks/analysis.ipynb`
- [Interpret Results](https://github.com/fahadpashaa/comp2040-assignment3/blob/main/notebooks/analysis.ipynb): `notebooks/analysis.ipynb`
- [Crime Storytelling](https://github.com/fahadpashaa/comp2040-assignment3/blob/main/notebooks/LA_Crime_Storytelling.ipynb): `notebooks/LA_Crime_Storytelling.ipynb`

### Reusable Helpers

- [Analysis Helpers](https://github.com/fahadpashaa/comp2040-assignment3/blob/main/src/helpers.py): `src/helpers.py`

### Other components

- **Analyst**

## Connections

- Analyst → Clean Data: runs notebook
- Crime CSV → Clean Data: provides records
- Clean Data → Engineer Features: prepares data
- Engineer Features → Explore Patterns: supports exploration
- Engineer Features → Logistic Regression: supplies features
- Logistic Regression → Interpret Results: produces scores
- Clean Data → Analysis Helpers: calls helpers
