A powerful Streamlit application for visualizing, managing, and manipulating cluster data with an interactive flow-based interface.
- 📊 Interactive Visualization: Flow-based cluster visualization with member relationships
- 🔧 Cluster Operations: Merge, split, and move members between clusters
- 🔍 Search & Filter: Real-time search across clusters and members
- ↩️ Undo System: Rollback operations with built-in history (up to 10 operations)
- 📤 Data Export: Download modified cluster data as JSON with timestamps
- 🧪 Sample Data: Quick testing with pre-loaded sample data
- 📱 Responsive Design: Works on desktop and mobile devices
- 🎨 Dark/Light Mode: Automatic theme support
- Python 3.8 or higher
- pip package manager
- Clone the repository:
git clone https://github.com/yourusername/cluster-manipulation-tool.git
cd cluster-manipulation-tool- Create a virtual environment (recommended):
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt- Run the application:
streamlit run app/main.py- Open your browser and navigate to
http://localhost:8501
Upload JSON files with the following structure example:
{
"clusters": [
{
"id": "cluster_1",
"name": "Development Team",
"members": [
{
"id": "member_1",
"name": "John Doe",
"metadata": {
"role": "Senior Developer",
"department": "Engineering"
}
},
{
"id": "member_2",
"name": "Jane Smith",
"metadata": {
"role": "UI/UX Designer",
"department": "Design"
}
}
],
"relationships": ["cluster_2", "cluster_3"]
}
]
}- Load Data: Upload your JSON file or click "Load Sample Data" for testing
- Visualize: View your clusters in the interactive flow diagram
- Search: Use the search bar to filter clusters and members
- Manipulate: Use the operations panel to:
- Merge two clusters
- Move members between clusters
- Split clusters into smaller ones
- Export: Download your modified data as JSON
- Select two different clusters
- Provide a name for the merged cluster
- All members and relationships are combined
- Choose source and target clusters
- Select specific members to move
- Members are transferred with their metadata
- Select a cluster with 2+ members
- Choose members for the new cluster
- Original cluster retains remaining members
cluster-manipulation-tool/
├── app/
│ ├── main.py # Main Streamlit application
│ ├── cluster_manager.py # Core cluster operations logic
│ ├── messages.py # UI messages and constants
│ └── styles.py # CSS styles and theming
├── data/
│ └── sample_data.json # Sample data for testing
├── assets/
│ └── screenshots/ # Application screenshots
├── tests/
│ └── test_cluster_manager.py
├── requirements.txt # Python dependencies
├── README.md # This file
├── LICENSE # MIT License
├── .gitignore # Git ignore rules
└── CONTRIBUTING.md # Contribution guidelines
- Max History: Modify
max_historyinClusterManager(default: 10) - File Size Limit: Adjust limit in
render_data_import()(default: 10MB) - Color Palette: Customize colors in
create_flow_visualization()
-
File Upload Fails: Check file size (<10MB) and JSON validity
-
Visualization Issues: Refresh the page or clear browser cache
-
Performance: For large datasets (>100 clusters), consider data pagination
- Visualization performance may degrade with very large datasets
- Drag-and-drop functionality in flow diagram needs enhancement
-
🎯 Enhanced Visualization:
- Fix drag-and-drop member movement in flow diagram
- Member manipulation options on right-click
- Improve node positioning
-
🚀 Performance Improvements:
- Implement data pagination for large datasets
- Add virtual scrolling for member lists
- Optimize rendering for 100+ clusters
-
🔧 Additional Operations:
- Bulk operations for multiple clusters
- Advanced filtering and sorting options
- Cluster templates and presets
- Import/export to other formats (CSV, Excel)
-
📊 Analytics & Insights:
- Cluster relationship analysis
- Member distribution statistics
- Operation history tracking
- Data change visualization
-
🎨 UI/UX Enhancements:
- Keyboard shortcuts
- Accessibility improvements
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
python -m pytest tests/This project is licensed under the MIT License - see the LICENSE file for details.
- Built with Streamlit
- Flow visualization powered by streamlit-flow
- Icons from Lucide
⭐ Star this repository if you find it helpful!

