Skip to content

Latest commit

Β 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ”Ž Missing Person Pattern Analyser

Last Commit Repo Size License

Python BeautifulSoup Playwright Reflex Matplotlib GeoPandas Scikit-Learn Pandas

An analytical software suite and dynamic dashboard built with Python and Reflex. This system parses regional case data, executes algorithmic risk evaluations, and generates dynamic visualizations mapping missing person case patterns across the UK.


πŸ“Έ Screenshots

  • Overview of missing persons reports from the scraper engine Map
  • Breakdown of the area where missing persons have been reported Bar Chart
  • Info on the dashboard after processing a CSV file Dashboard UI

πŸš€ Features

  • Dynamic Web UI: Built entirely in Python using the Reflex framework with zero manual JavaScript required.
  • Automated Risk Pipeline: Assesses ingestion data streams, mapping metrics across Low, Moderate, High, and Critical risk stratifications.
  • Geospatial Visualisations: Generates dynamic map overlays and data asset breakdowns securely bound to the layout engine.
  • Interactive Data Views: High-performance data grid preview matching live analytical variables.

πŸ“‚ Project Structure

missing_person_pattern_analyser/
β”‚ 
β”‚
β”œβ”€β”€ missing_person_pattern_analyser/ # Main Frontend & UI Package
β”‚   β”œβ”€β”€ __init__.py                  # Package initializer
β”‚   β”œβ”€β”€ chart_visualisation.py      # Analytics map & chart panel layout
β”‚   β”œβ”€β”€ data_table.py               # Case preview typed data grid component
β”‚   β”œβ”€β”€ handle_upload.py            # Non-blocking async file uploader pipeline
β”‚   β”œβ”€β”€ kpi_dashboard.py            # Main analytical metrics summary layout 
β”‚   β”œβ”€β”€ metric_card.py              # Visual KPI card sub-component
β”‚   β”œβ”€β”€ navbar.py                   # Responsive top navigation component
β”‚   β”œβ”€β”€ testing_legend.py           # Severity color code legend panel
β”‚   β”œβ”€β”€ upload_zone.py              # Interactivity drag-and-drop file interface 
β”‚   └── missing_person_pattern_analyzer.py # Main Reflex App routing configuration 
β”‚
β”œβ”€β”€ src/                            # Backend Analytical Core Package
β”‚   β”œβ”€β”€ __init__.py                 # Package initializer 
β”‚   β”œβ”€β”€ engine.py                   # Data processing and scoring metrics algorithms 
β”‚   β”œβ”€β”€ models.py                   # Pydantic data schemas and database representations
β”‚   β”œβ”€β”€ scraper.py                  # Missing person public portal scraping module
β”‚   └── visualiser.py               # Matplotlib spatial mapping rendering engine
β”‚
β”œβ”€β”€ tests/                          # Pytest Suite
β”‚   β”œβ”€β”€ test_engine.py  
|   β”œβ”€β”€ test_frontend_layout.py     
β”‚   β”œβ”€β”€ test_handle_upload.py  
|   β”œβ”€β”€ test_models.py  
|   β”œβ”€β”€ test_scraper.py  
|   β”œβ”€β”€ test_visualiser.py
|
β”œ                     
β”œβ”€β”€ pytest.ini                      
β”œβ”€β”€ README.md                       # Project Documentation
└── requirements.txt                # Project dependencies

πŸ“¦ Installation & Setup

Clone the Repository

git clone [https://github.com/reory/missing_person_pattern_analyser.git](https://github.com/reory/missing_person_pattern_analyser.git)
cd missing_person_pattern_analyser

Configure the Virtual Environment

# Create the environment
python -m venv venv

### Activate on Windows:
venv\Scripts\activate

### Activate on macOS/Linux:
source venv/bin/activate

Install Dependencies

pip install -r requirements.txt

πŸ’» Running the Application

For Users / Runtime Execution (Frontend Dashboard) To launch the core analytical dashboard layout to upload and parse tracking sheets:

Initialize and Launch Reflex

# Initialize the Reflex configuration
reflex init

Run the development environment server

reflex run

πŸ‘¨πŸ»β€πŸ’» For Developers (Backend Scraper Pipeline)

If you are a developer looking to modify the extraction rules, fetch updated live data, or generate a fresh registry dataset:

Run the scraper directly to refresh the raw dataset

python main.py

πŸ§ͺ Testing

The project utilizes pytest, pytest-cov, and hypothesis to execute property-based and behavioral validation passes over both the engine calculations and the compiled frontend components.

To execute the test suite and verify statement execution coverage metrics, run:

python -m pytest

πŸ›£οΈ Roadmap Features

  • High-Performance Ingestion Core (Rust Integration): Migrate the HTML web scraper to a parallelized, thread-safe Rust module via PyO3 bindings to minimize processing memory and latency.

  • Live GeoJSON Mapping: Replace static image mapping with dynamic Leaflet or Mapbox views inside Reflex for interactive user panning, zooming, and cluster selection.

  • Predictive Cluster Analysis: Embed scikit-learn models directly inside the engine package to automatically detect spatial anomalies and forecast emerging incident hot-spots.

  • Real-Time Alert Despatcher: Implement an async event trigger system to automatically push automated SMS, email, or webhook alerts when critical-risk patterns emerge.

  • Multi-Tenant Role Access: Deploy an explicit authentication framework in Reflex to separate public dashboard visualization charts from restricted, administrative investigator databases.

  • Temporal Trend Analytics: Introduce historical timeline tracking into src/engine.py to identify cyclical, seasonal, and sequential risk trajectory movements over time.

  • Environmental Weather Ingestion: Integrate external meteorological APIs into the ingestion pipeline to cross-reference weather severity with localized pattern variations.

  • Automated Threshold Triggers: Configure automated backend daemon alerts that flag high-risk coordinates the exact moment anomaly metrics breach critical safety baselines.


  • Built by Roy Peters 😊 LinkedIn

About

An analytical software suite and dynamic dashboard built with Python and `Reflex`. This system parses regional case data, executes algorithmic risk evaluations, and generates dynamic visualizations mapping missing person case patterns across the UK.

Topics

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages