RiskCommand is a specialized analytical framework designed for maritime defense and logistics optimization. It functions as a Spatiotemporal Anomaly Detection System, processing Automatic Identification System (AIS) telemetry to identify high-risk vessel behaviors and correlate them with historical incident clusters.
Unlike traditional vessel tracking, this system integrates Unsupervised Machine Learning (Isolation Forest) to flag kinematic anomalies (unusual speed/heading patterns) and utilizes Spatial Joins to map traffic density against "Black Spot" incident zones.
The system processes high-frequency AIS data streams collected over a specific observation window.
- Observation Period: June 1, 2025 – June 10, 2025
- AIS Data Source: NOAA Office for Coastal Management (2025)
- Incident Data Source: NOAA Incident News Raw Data
Below is the data quality audit performed during the ingestion phase.
Data Quality Audit
| Metric | Count | Percentage | Status |
|---|---|---|---|
| Total Records | 8,898,171 | 100% | ✅ Raw Ingestion |
| Impossible Speed (>40kn) | 1,191 | 0.013% | |
| Missing Coordinates | 0 | 0.00% | ✅ Clean |
The pipeline follows a rigorous Data Science workflow from ingestion to deployment.
graph LR
A[Raw AIS Stream] --> B(Spatial Filtering & Cleaning)
B --> C{Feature Engineering}
C -->|SOG & Heading| D[Isolation Forest Model]
C -->|Lat/Lon| E[Spatial Density Scan]
D --> F[Anomaly Score Generation]
E --> G[Risk Heatmap]
F & G --> H[RiskCommand Dashboard]
- Ingestion: Parsing massive AIS CSV logs.
- Preprocessing: Removing physics-defying artifacts (Speed > 40kn) and null coordinates.
- Modeling: Training an Isolation Forest on kinematic features (Speed Over Ground & Heading).
- Deployment: Serializing the model (
.joblib) for real-time inference via a Dash Web App.
The core of the analysis involves distinguishing "Normal" traffic from "Anomalous" behavior based on movement physics. The table below summarizes the statistical separation achieved by the model.
Model Statistical Separation (Speed & Heading)
| Group | SOG Mean (kn) | SOG Std | SOG Max | Heading Mean (°) | Heading Std | Heading Max |
|---|---|---|---|---|---|---|
| Anomaly (High Risk) | 24.84 | 5.99 | 99.8 | 152.88 | 116.94 | 359 |
| Normal (Standard) | 2.21 | 4.39 | 98.5 | 183.63 | 106.16 | 359 |
Insight: Anomalies are characterized by significantly higher average speeds (approx. 10x normal traffic) and high variance, indicating erratic maneuvers or aggressive transit.
| Decision Boundary Analysis | Model Evaluation Metrics |
|---|---|
|
|
| Visualizing the separation plane between normal and anomalous vectors. | Distribution of anomaly scores across the fleet. |
An analysis of the vessel types present in the Area of Responsibility (AOR). Codes are mapped to standard AIS vessel categories.
| AIS Code | Vessel Category | Count | Distribution |
|---|---|---|---|
| 37 | Pleasure Craft / Sailing | 2,235,763 | ██████████ |
| 31 | Towing / Tug | 1,372,241 | ██████ |
| 52 | Tug | 1,274,679 | █████ |
| 36 | Sailing Vessel | 709,678 | ███ |
| 30 | Fishing | 688,245 | ███ |
| 60 | Passenger | 557,584 | ██ |
| 70 | Cargo | 523,236 | ██ |
| 80 | Tanker | 240,574 | █ |
| 90 | Other / Special | 168,880 | ▏ |
| 57 | Local / Non-Standard | 152,962 | ▏ |
The RiskCommand Interface is a real-time web application built with Plotly Dash, designed for operators to monitor live traffic and receive AI-driven alerts.
| Live Geospatial Intelligence | Kinematic Anomaly Detection |
|---|---|
For executive reporting and historical trend analysis, a comprehensive Power BI Dashboard connects to the processed data pipeline.
To deploy the RiskCommand system locally:
1. Clone the repository
git clone [https://github.com/RazerArdi/maritime-logistics-risk-optimization-ais](https://github.com/RazerArdi/maritime-logistics-risk-optimization-ais)
cd maritime-logistics-risk-optimization-ais
2. Install Dependencies
pip install pandas numpy scikit-learn plotly dash dash-bootstrap-components joblib
3. Run the Dashboard
python Interface/app.py
*Access the dashboard at http://127.0.0.1:8050/*
Project_Root/
+---Data/
| +---Images/
| | DashboardPage1.png
| | DashboardPage2.png
| | decision_boundary.png
| | fleet_analytics.png
| | model_eval_boxplot.png
| | NOAA_logo.png
| | PowerBIPage1.png
| | PowerBIPage2.png
| | PowerBIPage3.png
| |
| +---Models/
| | vessel_anomaly_model.joblib <-- Pre-trained AI Brain
| |
| +---Table/
| ais_aggregated.csv
| ais_enriched_ml.csv <-- Main Dataset for Dashboard
| fleet_table.csv
| incident_risk_processed.csv <-- Incident Data
|
+---Dataset/
| ais-2025-06-XX.csv <-- Raw Source Files
| incidents.csv
|
+---Interface/
| app.py <-- Main Dash Application
|
+---Notebook/
| main.ipynb <-- Data Processing & Training
|
+---Reports/
reports.pbix <-- Power BI Source File
Developed by Bayu Ardiyansyah
Informatics Engineering Student | University of Muhammadiyah Malang
Focus: Defense Technology & Data Science








