# ramcharan469/casefile-missing-person architecture

> Architecture diagram of the GitHub repository ramcharan469/casefile-missing-person, 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/ramcharan469/casefile-missing-person
- Repository: https://github.com/ramcharan469/casefile-missing-person

## Overview

CASEFILE is an academic simulation for analyzing synthetic missing-person movement data and presenting probabilistic location and route leads. The principal workflow generates or accepts a trajectory, preprocesses and enriches it, analyzes movement patterns and anomalies, predicts locations and routes, ranks search areas, explains scores, and renders results in a dashboard and map. The README documents additional stages whose source was not sampled; their links are shown only where the documented pipeline order supports them. The dashboard excerpt confirms its data reads and map call.

Main entry points: [`run_pipeline.py`](https://github.com/ramcharan469/casefile-missing-person/blob/main/run_pipeline.py) (Pipeline Runner), [`app/app.py`](https://github.com/ramcharan469/casefile-missing-person/blob/main/app/app.py) (Streamlit Dashboard), [`data/processed/trajectory_anomalies.csv`](https://github.com/ramcharan469/casefile-missing-person/blob/main/data/processed/trajectory_anomalies.csv) (Anomaly-Tagged Trajectory), [`src/clustering.py`](https://github.com/ramcharan469/casefile-missing-person/blob/main/src/clustering.py) (Movement Clustering)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_inputs["Case Data"]
  node_synthetic["Synthetic Data Generator"]
  node_casefile["Fictional Case File"]
  node_gps["Synthetic GPS Trajectory"]
end

subgraph group_analysis["Movement Analysis"]
  node_preprocess["Trajectory Preprocessing<br/>[preprocessing.py]"]
  node_clean["Clean Trajectory"]
  node_features["Feature Engineering"]
  node_engineered["Movement Features"]
  node_cluster["Movement Clustering<br/>[clustering.py]"]
  node_clustered["Clustered Trajectory"]
  node_frequent["Frequent Locations"]
  node_anomaly["Anomaly Detection"]
  node_anomalies["Anomaly-Tagged Trajectory"]
end

subgraph group_inference["Location Inference"]
  node_location["Location Prediction<br/>[prediction.py]"]
  node_route["Route Prediction"]
  node_predicted_route["Predicted Route"]
  node_priority["Search Priority Ranking<br/>[search_priority.py]"]
  node_explain["Score Explanations<br/>[explainability.py]"]
end

subgraph group_presentation["Results Presentation"]
  node_map["Investigation Map<br/>[mapping.py]"]
  node_dashboard["Streamlit Dashboard<br/>[app.py]"]
  node_mapfile["Interactive Map Artifact"]
end

subgraph group_orchestration["Pipeline Control"]
  node_pipeline["Pipeline Runner<br/>[run_pipeline.py]"]
end

node_operator(("Analyst / Operator"))

node_operator -->|"runs pipeline"| node_pipeline
node_operator -->|"opens dashboard"| node_dashboard
node_pipeline -->|"runs stage"| node_synthetic
node_pipeline -->|"runs stage"| node_preprocess
node_pipeline -->|"runs stage"| node_features
node_pipeline -->|"runs stage"| node_cluster
node_pipeline -->|"runs stage"| node_anomaly
node_pipeline -->|"runs stage"| node_location
node_pipeline -->|"runs stage"| node_route
node_pipeline -->|"runs stage"| node_priority
node_pipeline -->|"runs stage"| node_explain
node_pipeline -->|"runs stage"| node_map
node_synthetic -->|"writes trajectory"| node_gps
node_synthetic -->|"writes case"| node_casefile
node_gps -->|"supplies trajectory"| node_preprocess
node_preprocess -->|"writes cleaned data"| node_clean
node_clean -->|"supplies trajectory"| node_features
node_features -->|"writes features"| node_engineered
node_engineered -->|"supplies features"| node_cluster
node_cluster -->|"writes labels"| node_clustered
node_cluster -->|"writes locations"| node_frequent
node_clustered -->|"supplies clusters"| node_anomaly
node_anomaly -->|"writes anomaly flags"| node_anomalies
node_anomalies -->|"supplies features"| node_location
node_anomalies -->|"supplies trajectory"| node_route
node_route -->|"writes route"| node_predicted_route
node_casefile -->|"reads case details"| node_dashboard
node_anomalies -->|"reads analysis"| node_dashboard
node_frequent -->|"reads locations"| node_dashboard
node_predicted_route -->|"reads route"| node_dashboard
node_dashboard -->|"builds map"| node_map
node_map -->|"saves map"| node_mapfile

click node_pipeline "https://github.com/ramcharan469/casefile-missing-person/blob/main/run_pipeline.py"
click node_synthetic "https://github.com/ramcharan469/casefile-missing-person/blob/main/src/generate_synthetic_data.py"
click node_casefile "https://github.com/ramcharan469/casefile-missing-person/blob/main/data/synthetic/synthetic_case_file.csv"
click node_gps "https://github.com/ramcharan469/casefile-missing-person/blob/main/data/synthetic/synthetic_gps_trajectory.csv"
click node_preprocess "https://github.com/ramcharan469/casefile-missing-person/blob/main/src/preprocessing.py"
click node_clean "https://github.com/ramcharan469/casefile-missing-person/blob/main/data/processed/trajectory_clean.csv"
click node_features "https://github.com/ramcharan469/casefile-missing-person/blob/main/src/feature_engineering.py"
click node_engineered "https://github.com/ramcharan469/casefile-missing-person/blob/main/data/processed/trajectory_features.csv"
click node_cluster "https://github.com/ramcharan469/casefile-missing-person/blob/main/src/clustering.py"
click node_clustered "https://github.com/ramcharan469/casefile-missing-person/blob/main/data/processed/trajectory_clustered.csv"
click node_frequent "https://github.com/ramcharan469/casefile-missing-person/blob/main/data/processed/frequently_visited_locations.csv"
click node_anomaly "https://github.com/ramcharan469/casefile-missing-person/blob/main/src/anomaly_detection.py"
click node_anomalies "https://github.com/ramcharan469/casefile-missing-person/blob/main/data/processed/trajectory_anomalies.csv"
click node_location "https://github.com/ramcharan469/casefile-missing-person/blob/main/src/prediction.py"
click node_route "https://github.com/ramcharan469/casefile-missing-person/blob/main/src/route_prediction.py"
click node_predicted_route "https://github.com/ramcharan469/casefile-missing-person/blob/main/data/processed/predicted_route.csv"
click node_priority "https://github.com/ramcharan469/casefile-missing-person/blob/main/src/search_priority.py"
click node_explain "https://github.com/ramcharan469/casefile-missing-person/blob/main/src/explainability.py"
click node_map "https://github.com/ramcharan469/casefile-missing-person/blob/main/src/mapping.py"
click node_dashboard "https://github.com/ramcharan469/casefile-missing-person/blob/main/app/app.py"
click node_mapfile "https://github.com/ramcharan469/casefile-missing-person/blob/main/reports/investigation_map.html"

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_synthetic,node_casefile,node_gps toneBlue
class node_preprocess,node_clean,node_features,node_engineered,node_cluster,node_clustered,node_frequent,node_anomaly,node_anomalies toneAmber
class node_location,node_route,node_predicted_route,node_priority,node_explain toneMint
class node_map,node_dashboard,node_mapfile toneRose
class node_pipeline,node_operator toneIndigo
```

## Components

### Case Data

- [Synthetic Data Generator](https://github.com/ramcharan469/casefile-missing-person/blob/main/src/generate_synthetic_data.py): `src/generate_synthetic_data.py`
- [Fictional Case File](https://github.com/ramcharan469/casefile-missing-person/blob/main/data/synthetic/synthetic_case_file.csv): `data/synthetic/synthetic_case_file.csv`
- [Synthetic GPS Trajectory](https://github.com/ramcharan469/casefile-missing-person/blob/main/data/synthetic/synthetic_gps_trajectory.csv): `data/synthetic/synthetic_gps_trajectory.csv`

### Movement Analysis

- [Trajectory Preprocessing](https://github.com/ramcharan469/casefile-missing-person/blob/main/src/preprocessing.py): `src/preprocessing.py`
- [Clean Trajectory](https://github.com/ramcharan469/casefile-missing-person/blob/main/data/processed/trajectory_clean.csv): `data/processed/trajectory_clean.csv`
- [Feature Engineering](https://github.com/ramcharan469/casefile-missing-person/blob/main/src/feature_engineering.py): `src/feature_engineering.py`
- [Movement Features](https://github.com/ramcharan469/casefile-missing-person/blob/main/data/processed/trajectory_features.csv): `data/processed/trajectory_features.csv`
- [Movement Clustering](https://github.com/ramcharan469/casefile-missing-person/blob/main/src/clustering.py): `src/clustering.py`
- [Clustered Trajectory](https://github.com/ramcharan469/casefile-missing-person/blob/main/data/processed/trajectory_clustered.csv): `data/processed/trajectory_clustered.csv`
- [Frequent Locations](https://github.com/ramcharan469/casefile-missing-person/blob/main/data/processed/frequently_visited_locations.csv): `data/processed/frequently_visited_locations.csv`
- [Anomaly Detection](https://github.com/ramcharan469/casefile-missing-person/blob/main/src/anomaly_detection.py): `src/anomaly_detection.py`
- [Anomaly-Tagged Trajectory](https://github.com/ramcharan469/casefile-missing-person/blob/main/data/processed/trajectory_anomalies.csv): `data/processed/trajectory_anomalies.csv`

### Location Inference

- [Location Prediction](https://github.com/ramcharan469/casefile-missing-person/blob/main/src/prediction.py): `src/prediction.py`
- [Route Prediction](https://github.com/ramcharan469/casefile-missing-person/blob/main/src/route_prediction.py): `src/route_prediction.py`
- [Predicted Route](https://github.com/ramcharan469/casefile-missing-person/blob/main/data/processed/predicted_route.csv): `data/processed/predicted_route.csv`
- [Search Priority Ranking](https://github.com/ramcharan469/casefile-missing-person/blob/main/src/search_priority.py): `src/search_priority.py`
- [Score Explanations](https://github.com/ramcharan469/casefile-missing-person/blob/main/src/explainability.py): `src/explainability.py`

### Results Presentation

- [Investigation Map](https://github.com/ramcharan469/casefile-missing-person/blob/main/src/mapping.py): `src/mapping.py`
- [Streamlit Dashboard](https://github.com/ramcharan469/casefile-missing-person/blob/main/app/app.py): `app/app.py`
- [Interactive Map Artifact](https://github.com/ramcharan469/casefile-missing-person/blob/main/reports/investigation_map.html): `reports/investigation_map.html`

### Pipeline Control

- [Pipeline Runner](https://github.com/ramcharan469/casefile-missing-person/blob/main/run_pipeline.py): `run_pipeline.py`

### Other components

- **Analyst / Operator**

## Connections

- Analyst / Operator → Pipeline Runner: runs pipeline
- Analyst / Operator → Streamlit Dashboard: opens dashboard
- Pipeline Runner → Synthetic Data Generator: runs stage
- Pipeline Runner → Trajectory Preprocessing: runs stage
- Pipeline Runner → Feature Engineering: runs stage
- Pipeline Runner → Movement Clustering: runs stage
- Pipeline Runner → Anomaly Detection: runs stage
- Pipeline Runner → Location Prediction: runs stage
- Pipeline Runner → Route Prediction: runs stage
- Pipeline Runner → Search Priority Ranking: runs stage
- Pipeline Runner → Score Explanations: runs stage
- Pipeline Runner → Investigation Map: runs stage
- Synthetic Data Generator → Synthetic GPS Trajectory: writes trajectory
- Synthetic Data Generator → Fictional Case File: writes case
- Synthetic GPS Trajectory → Trajectory Preprocessing: supplies trajectory
- Trajectory Preprocessing → Clean Trajectory: writes cleaned data
- Clean Trajectory → Feature Engineering: supplies trajectory
- Feature Engineering → Movement Features: writes features
- Movement Features → Movement Clustering: supplies features
- Movement Clustering → Clustered Trajectory: writes labels
- Movement Clustering → Frequent Locations: writes locations
- Clustered Trajectory → Anomaly Detection: supplies clusters
- Anomaly Detection → Anomaly-Tagged Trajectory: writes anomaly flags
- Anomaly-Tagged Trajectory → Location Prediction: supplies features
- Anomaly-Tagged Trajectory → Route Prediction: supplies trajectory
- Route Prediction → Predicted Route: writes route
- Fictional Case File → Streamlit Dashboard: reads case details
- Anomaly-Tagged Trajectory → Streamlit Dashboard: reads analysis
- Frequent Locations → Streamlit Dashboard: reads locations
- Predicted Route → Streamlit Dashboard: reads route
- Streamlit Dashboard → Investigation Map: builds map
- Investigation Map → Interactive Map Artifact: saves map
