Skip to content

Commit 0d8e5d0

Browse files
[NEW POST] KORE SUPER SIM Heatmap using Event Streams
A Github repository for a real-time geospatial dashboard using KORE SUPER SIM Event Streams, FastAPI, and Leaflet.
1 parent 6b9d4ac commit 0d8e5d0

9 files changed

Lines changed: 171 additions & 0 deletions

.DS_Store

0 Bytes
Binary file not shown.
36.4 KB
Loading
3.26 MB
Loading
3.27 MB
Loading
749 KB
Loading
1.38 MB
Loading
1.49 MB
Loading
Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
---
2+
title: "KORE SUPER SIM Heatmap using Event Streams"
3+
date: 2025-11-26
4+
description: "A Github repository for a real-time geospatial dashboard using KORE SUPER SIM Event Streams, FastAPI, and Leaflet."
5+
categories: ["KORE", "KORE ONE", "SUPER SIM", "Event Streams", "Github code", "API"]
6+
tags: ["KORE", "KORE ONE", "Super SIM", "Event Streams", "Connectivity", "FastAPI", "Leaflet", "Heatmap", "IoT"]
7+
image: "KORE-LOGO-SUPERSIM.png"
8+
---
9+
10+
![](KORE-LOGO-SUPERSIM.png)
11+
12+
# Visualizing KORE SUPER SIM Event Streams in Real Time
13+
14+
Hi there, my name is **Vitor Ribeiro**, and I am a **Solutions Architect** at **KORE Wireless**.
15+
16+
In this article, I’ll show you how I built a full real-time geospatial visualization tool for [**KORE SUPER SIM**](https://www.korewireless.com/super-sim/) using the **Event Streams**, [**FastAPI**](https://fastapi.tiangolo.com/), and [**Leaflet**](https://leafletjs.com/) using [**OpenAI Codex**](https://openai.com/codex/)
17+
18+
You can download the code from my [**GitHub repository here**](https://github.com/naturalfunction/KORE-SUPERSIM-heatmap)
19+
20+
---
21+
22+
## ⭐ What the App Does
23+
Super SIM Heatmap provides:
24+
25+
- Real-time Super SIM event ingestion
26+
- Persistent storage of CloudEvents payloads
27+
- Dual online/offline heatmap layers
28+
- Timeline slider for replay
29+
- Device event feed with metadata
30+
- Click-to-pan tower visualization
31+
32+
---
33+
34+
## 🌍 Why Visualize Super SIM Events?
35+
KORE SUPER SIM emits session lifecycle events such as:
36+
37+
- `connection.data-session.started`
38+
- `connection.data-session.updated`
39+
- `connection.data-session.ended`
40+
41+
Visualizing them helps teams understand connectivity patterns and issues across geography and time.
42+
43+
---
44+
45+
## 🧱 Architecture Overview
46+
```
47+
FastAPI → Webhook ingestion
48+
SQLite → Raw event persistence
49+
SQLModel → ORM
50+
Leaflet → Heatmap rendering
51+
Jinja2 → Templates
52+
```
53+
54+
---
55+
56+
## ⚡ Webhook Ingestion
57+
The webhook endpoint:
58+
59+
```
60+
POST /webhooks/supersim
61+
```
62+
63+
Validates, extracts, and persists raw event payloads.
64+
65+
---
66+
67+
## 🔥 Dual-Layer Heatmap
68+
- Green = online
69+
- Red = offline
70+
71+
State is inferred by latest event per ICCID.
72+
73+
---
74+
75+
## ⏱ Timeline Scrubbing
76+
Scrub 00:00–23:59 and reconstruct fleet activity by timestamp.
77+
78+
---
79+
80+
## 📋 Device Event Sidebar
81+
Shows:
82+
83+
- ICCID
84+
- Tower
85+
- Network
86+
- RAT
87+
- Timestamp
88+
89+
---
90+
91+
## 🤖 Synthetic Data Seeder
92+
Simulates START → UPDATE → END events across global cities.
93+
94+
Example:
95+
96+
```
97+
.venv/bin/python scripts/seed_events.py --region naples --devices 50 --count 550
98+
```
99+
100+
---
101+
102+
## 🧪 Manual cURL Tests
103+
Includes samples for all session lifecycle events.
104+
105+
---
106+
107+
## 🖥 Web UI Overview
108+
- Device sidebar
109+
- Heatmap toggles
110+
- Timeline slider
111+
- Stats counters
112+
113+
---
114+
115+
## 📁 Project Structure
116+
```
117+
app/
118+
scripts/
119+
templates/
120+
static/
121+
docs/
122+
```
123+
124+
---
125+
126+
## 🛠 Quick Start
127+
```
128+
python3 -m venv .venv
129+
source .venv/bin/activate
130+
pip install -r requirements.txt
131+
uvicorn app.main:app --reload
132+
```
133+
134+
---
135+
136+
![](run-project.png)
137+
138+
## 🛠 Seed sample data
139+
140+
141+
50 devices in Naples, ~550 sessions total
142+
143+
```
144+
.venv/bin/python scripts/seed_events.py --region naples --devices 50 --count 550
145+
```
146+
147+
30 devices in every region, 5 sessions each
148+
```
149+
for region in naples toronto saopaulo lisbon shanghai capetown sydney; do
150+
.venv/bin/python scripts/seed_events.py --region "$region" --devices 30 --sessions-per-device 5
151+
done
152+
```
153+
154+
---
155+
156+
## 🛠 Map Examples
157+
158+
Map after seeding data
159+
![](heatmap.png)
160+
161+
Map after filtering data using the Timeline
162+
![](heatmap-filtering-timeline.png)
163+
164+
Map after filtering data using the Timeline Online Only.
165+
![](heatmap-filtering-timeline-online.png)
166+
167+
Map after filtering data using the Timeline Offline Only.
168+
![](heatmap-filtering-timeline-offline.png)
169+
170+
Map after clicking SHOW ALL
171+
![](heatmap-filtering-timeline-showall-max-zoom.png)
23.1 KB
Loading

0 commit comments

Comments
 (0)