Automated Arctic maritime intelligence system tracking Russian/Chinese vessels with three-tier historical analysis.
- Automated Collection: 30-minute AIS data updates via GitHub Actions
- Three-Tier Tracking: Real-time (0-2hr), Tactical (2-48hr), Strategic (2-7d)
- Focus Mode Dashboard: Interactive map with click-to-focus vessel tracking
- Risk-Based Visualization: Color-coded by vessel country and behavior
- Auto-Deployment: GitHub Pages hosting with automatic updates
Add GitHub Secret (Settings → Secrets and variables → Actions):
- Name:
BARENTSWATCH_CLIENT_SECRET - Value: Your BarentsWatch API client secret
Get credentials at: https://www.barentswatch.no/
Settings → Pages:
- Source: Deploy from branch
- Branch:
gh-pages - Path:
/(root)
Actions tab → "Arctic AIS Monitor" → Run workflow
Dashboard will be available at:
https://<username>.github.io/ArcticShadowTracker/
Create config.yaml:
barentswatch:
client_id: "your-email:ClientName"
client_secret: "your-secret-here"Install and run:
pip install -r requirements.txt
python scripts/collect_ais.py
open outputs/index.html- Fetches all AIS data from BarentsWatch API
- Filters to Arctic region (65-82°N, 0-40°E)
- Focuses on Russian/Chinese vessels (~30-40 active)
- Saves snapshots every 30 minutes
Each vessel maintains three levels of history:
Tier 1 - Real-time (0-2 hours)
- Every 30-minute update
- ~4 data points
- Shows: Current detailed movement
Tier 2 - Tactical (2-48 hours)
- Sampled every 30 minutes
- ~92 data points
- Shows: Movement patterns and routes
Tier 3 - Strategic (2-7 days)
- Events only: turns >45°, speed changes >5kts, stops
- ~10-20 data points
- Shows: Long-term behavior patterns
- Red vessels: Russia/China (high risk) - Full tracks visible
- Gray vessels: Norwegian (low risk) - Strategic tier only
- Solid lines: Real-time track (0-2hr)
- Dashed lines: Tactical track (2-48hr)
- Dotted lines: Strategic track (2-7d)
- Click vessel: Focus mode (shows all tiers)
ArcticShadowTracker/
├── scripts/
│ └── collect_ais.py # Main collection pipeline
├── src/
│ ├── mmsi_country_reference.py # MMSI to country mapping
│ ├── ais_ship_types.py # Ship type decoder
│ ├── track_manager.py # Three-tier tracking logic
│ └── map_generator.py # Interactive map generation
├── data/
│ ├── snapshots/ # Raw 30-min snapshots (7-day retention)
│ └── vessel_tracks.json # Processed three-tier tracks
├── outputs/
│ └── index.html # GitHub Pages dashboard
└── .github/workflows/
└── arctic_monitor.yml # Automation configuration
- Snapshots: 7 days (auto-cleanup)
- Vessel Tracks: 7 days with three-tier downsampling
- Storage: ~20MB per week (well under GitHub limits)
GitHub Actions runs every 30 minutes:
- Fetch AIS data from BarentsWatch
- Save snapshot to
data/snapshots/ - Process three-tier tracks
- Generate interactive map
- Commit data and outputs
- Deploy to GitHub Pages
Edit scripts/collect_ais.py:
ARCTIC_REGION = {
'lat_min': 65.0,
'lat_max': 82.0,
'lon_min': 0.0,
'lon_max': 40.0
}Edit src/track_manager.py:
- Tier durations (currently 2hr/48hr/7d)
- Strategic event thresholds (course/speed)
- Sampling intervals (currently 30min)
Edit scripts/collect_ais.py - line 118:
if country in ['Russia', 'China', 'YourCountry']:- Verify
BARENTSWATCH_CLIENT_SECRETsecret is set - Check GitHub Actions logs for errors
- Test API credentials locally with
config.yaml
- Ensure
gh-pagesbranch exists - Check GitHub Pages deployment status
- Allow 1-2 minutes after workflow completes
- Verify vessels are currently in Arctic region
- Check
data/snapshots/for recent files - Review most recent snapshot JSON
- Language: Python 3.9+
- API: BarentsWatch AIS API
- Map Library: Folium (Leaflet.js)
- Automation: GitHub Actions
- Hosting: GitHub Pages
- Data Format: JSON snapshots + processed tracks
- API client secret stored in GitHub Secrets (encrypted)
- Client ID can be public (used in OAuth flow)
- No sensitive vessel data stored
- All data publicly accessible via AIS already
This project processes publicly available AIS data from BarentsWatch. Vessel tracking data is public information transmitted by ships.
- AIS data provided by BarentsWatch (Norwegian Coastal Administration)
- MMSI country mapping from ITU-R M.1371 standard
- Ship type codes from NOAA Marine Cadastre 2018