πŸ“Š GraphVisual

Community evolution visualization for student social networks using Bluetooth proximity data

CI CodeQL Java 8+ JUNG 2.0.1 MIT License
⭐ View on GitHub πŸš€ Get Started

Features

🎨

Interactive Visualization

Drag, zoom, and rotate graph nodes using JUNG's graph mouse. Explore community structures visually with cluster-based layouts.

⏱️

Timeline Playback

Animate community graphs across 92 days with play/pause/stop controls. Watch relationships form and dissolve over time.

🏷️

5 Relationship Types

Classify social interactions as friends, classmates, study groups, familiar strangers, or strangers β€” each color-coded on the graph.

πŸŽ›οΈ

Adjustable Thresholds

Tune meeting duration and frequency thresholds per relationship type in real-time to explore different classification parameters.

πŸ“Š

Network Statistics

Real-time metrics including node/edge counts, graph density, average/max degree, edge weights, isolated nodes, and hub identification.

πŸ’Ύ

Export & Annotate

Save visualizations as PNG images, export edge lists for further analysis, and add notes for each timestamp during research.

Relationship Classification

Type Location Duration Frequency
Friends Public areas > 10 min β‰₯ 2/day
Classmates Classrooms > 30 min β‰₯ 1/day
Study Groups Classrooms > 20 min ≀ 1/day
Familiar Strangers Public/paths < 2 min > 1/day
Strangers Public/paths < 2 min < 2/day

All thresholds are adjustable at runtime via the Category Panel sliders.

Data Pipeline

πŸ“‘ Bluetooth Events

Raw Bluetooth proximity data from event_3 table

↓

πŸ” findMeetings.java

Extracts meetings β€” IMEI pairs, start/end time, duration

↓

πŸ”— matchImei.java

Maps device nodes to IMEI identifiers

↓

πŸ“ addLocation.java

Classifies meeting locations via WiFi access points

↓

🌐 Network.java

Generates edge-list files with parameterized SQL queries

↓

πŸ“Š Main.java

Interactive JUNG graph visualization with timeline playback

Getting Started

1 Clone the repository

git clone https://github.com/sauravbhattacharya001/GraphVisual.git
cd GraphVisual

2 Configure database

Set environment variables for PostgreSQL credentials:

export DB_HOST=localhost
export DB_USER=your_user
export DB_PASS=your_pass

3 Build the project

cd Gvisual
ant build

Requires Java JDK 8+ and Apache Ant.

4 Run the pipeline

# Match devices β†’ Extract meetings β†’ Classify locations
java -cp "build/classes:lib/*" app.matchImei
java -cp "build/classes:lib/*" app.findMeetings
java -cp "build/classes:lib/*" app.addLocation

5 Launch the visualizer

java -cp "build/classes:lib/*" gvisual.Main

Tech Stack

β˜•
Java 8+
Application language
πŸ•ΈοΈ
JUNG 2.0.1
Graph framework
πŸ–₯️
Java Swing
Desktop GUI
🐘
PostgreSQL
Data storage
🐜
Apache Ant
Build system
πŸ§ͺ
JUnit 4
Unit testing
βš™οΈ
GitHub Actions
CI/CD
πŸ”’
CodeQL
Security scanning

Architecture

GraphVisual/
β”œβ”€β”€ Gvisual/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ gvisual/
β”‚   β”‚   β”‚   β”œβ”€β”€ Main.java            # Swing GUI β€” graph panel, timeline, controls
β”‚   β”‚   β”‚   β”œβ”€β”€ edge.java            # Edge model (type, vertices, weight)
β”‚   β”‚   β”‚   β”œβ”€β”€ GraphStats.java      # Network metrics (density, degree, hubs)
β”‚   β”‚   β”‚   └── ShortestPathFinder.java  # Path analysis
β”‚   β”‚   └── app/
β”‚   β”‚       β”œβ”€β”€ Network.java         # Edge-list generation from DB
β”‚   β”‚       β”œβ”€β”€ Util.java            # Database connection factory
β”‚   β”‚       β”œβ”€β”€ findMeetings.java    # Bluetooth β†’ meeting extraction
β”‚   β”‚       β”œβ”€β”€ addLocation.java     # Meeting location classification
β”‚   β”‚       └── matchImei.java       # Device β†’ IMEI matching
β”‚   β”œβ”€β”€ test/                        # JUnit test suites
β”‚   β”œβ”€β”€ lib/                         # JUNG, PostgreSQL JDBC, Commons IO
β”‚   └── images/                      # UI icons
β”œβ”€β”€ docs/                            # This documentation site
β”œβ”€β”€ .github/workflows/               # CI, CodeQL, Pages, Auto-label
└── DATABASE.md                      # Database schema reference