A Python tool that processes BLE beacon tracking data from CSV files and generates an interactive map showing movement trajectories over time. Built with pandas and Folium.
- CSV processing of geolocation tracking records with signal strength data
- Timeline aggregation groups detections by location, time window, and receiver
- Interactive HTML map with OpenStreetMap tiles and color-coded polylines
- RSSI analysis min/max/average signal strength per timeline segment
- Layer control toggle visibility of individual beacon trails
- Popup details showing time window, coordinates, receiver ID, and signal stats
pip install pandas folium- Place your CSV data file as
data.csvin the project directory - Run the script:
python main.py- Open the generated
timeline_map.htmlin any browser
| Column | Type | Description |
|---|---|---|
ident |
string | Beacon identifier |
timestamp |
datetime | Detection timestamp (YYYY-MM-DD HH:MM:SS) |
position_latitude |
float | Latitude coordinate |
position_longitude |
float | Longitude coordinate |
ble_beacon_rssi |
int | Signal strength in dBm |
ble_receiver_ident |
int/str | Receiver that captured the signal |
ident,timestamp,position_latitude,position_longitude,ble_beacon_rssi,ble_receiver_ident
DC0D30213485,2025-03-31 07:41:56,49.4875,8.4660,-72,1001
DC0D30213485,2025-03-31 07:42:30,49.4876,8.4662,-68,1002- Load CSV data with pandas
- Aggregate records by beacon ID, coordinates, and receiver into time windows
- Calculate RSSI statistics (min, max, mean) per segment
- Render an interactive Folium map with:
- Circle markers at each detection point
- Polylines connecting consecutive positions
- Popups with segment details
- Layer control for toggling beacon trails
The generated timeline_map.html is a self-contained interactive map:
- Pan and zoom with mouse/touch
- Click markers to see time windows and signal data
- Use the layer control (top right) to show/hide individual trails
- Works offline once generated
- pandas - Data processing and aggregation
- Folium - Interactive map generation (Leaflet.js wrapper)
- Python 3
See VueTimelineCSV for a more feature-rich browser-based version of this tool built with Vue 3 and TypeScript.
MIT
