Skip to content

dan17612/python-timeline-map

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Timeline Map

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.

Screenshot

Features

  • 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

Installation

pip install pandas folium

Usage

  1. Place your CSV data file as data.csv in the project directory
  2. Run the script:
python main.py
  1. Open the generated timeline_map.html in any browser

CSV Format

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

Example

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

How It Works

  1. Load CSV data with pandas
  2. Aggregate records by beacon ID, coordinates, and receiver into time windows
  3. Calculate RSSI statistics (min, max, mean) per segment
  4. 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

Output

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

Tech Stack

  • pandas - Data processing and aggregation
  • Folium - Interactive map generation (Leaflet.js wrapper)
  • Python 3

Related

See VueTimelineCSV for a more feature-rich browser-based version of this tool built with Vue 3 and TypeScript.

License

MIT

About

Generate interactive maps from BLE beacon tracking CSV data - visualize movement trajectories with signal strength analysis. Built with pandas and Folium.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages