Vis-Network MicroSim Generator
Overview
The vis-network skill creates educational MicroSims using the vis-network JavaScript library for interactive network and graph visualizations. Each MicroSim is a directory in /docs/sims/ with a main.html file that can be embedded via iframe in educational content.
Purpose
This skill transforms abstract network and graph concepts into interactive, manipulable experiences that enable students to learn through visual exploration and experimentation. Ideal for visualizing learning graphs, concept dependencies, social networks, organizational structures, and any relationship-based data.
Key Features
- Interactive Network Graphs: Node-link diagrams with physics simulations
- Concept Dependency Visualization: Learning graph exploration with search and filtering
- Educational Focus: Simplicity, accessibility, and AI-generation compatibility
- MicroSim Architecture: Standardized patterns for iframe embedding
- Browser-Native: No server-side requirements, universal embedding
- Responsive Design: Adapts to container width
When to Use
Use this skill when users need to: - Visualize learning graphs and concept dependencies - Create network diagrams (social networks, organizational charts) - Show graph structures (trees, DAGs, general graphs) - Display relationship data (connections, dependencies, hierarchies) - Build interactive explorable visualizations - Demonstrate graph algorithms or network analysis
Common Trigger Phrases
- "Create a network visualization for..."
- "Visualize the learning graph..."
- "Show the concept dependencies as..."
- "Build an interactive graph of..."
- "Display the network structure of..."
MicroSim Architecture
Educational MicroSims occupy the intersection of: 1. Simplicity: Focused scope, transparent code 2. Accessibility: Browser-native, universal embedding 3. AI Generation: Standardized patterns, prompt-compatible design
Folder Structure
Each vis-network MicroSim contains:
1 2 3 4 5 | |
Educational Requirements Specification
Before generating, articulate:
- Subject Area and Topic: What specific concept does this visualization teach?
- Grade Level: Elementary (K-5), Middle School (6-8), High School (9-12), Undergraduate
- Learning Objectives: What should students understand? (Align with Bloom's Taxonomy)
- Duration: Typical engagement time (5-15 minutes recommended)
- Prerequisites: Required prior knowledge
- Assessment Opportunities: How can educators verify learning?
Network Types Supported
Learning Graphs (Concept Dependencies)
- Nodes: Concepts (abstract units of knowledge)
- Edges: Prerequisites (directed dependencies)
- Structure: Directed Acyclic Graph (DAG)
- Use Case: Optimal teaching order, adaptive learning paths
Social Networks
- Nodes: People, entities
- Edges: Relationships, connections
- Structure: Undirected or directed graph
- Use Case: Communication patterns, influence networks
Organizational Structures
- Nodes: Departments, roles, people
- Edges: Reporting relationships, collaborations
- Structure: Tree or hierarchical graph
- Use Case: Org charts, team structures
Process Flows
- Nodes: Steps, states, activities
- Edges: Transitions, dependencies
- Structure: Directed graph
- Use Case: Workflows, state machines
vis-network Configuration
Basic Network Setup
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | |
Common Options
Physics Simulation:
1 2 3 4 5 6 7 8 | |
Hierarchical Layout:
1 2 3 4 5 6 7 | |
Interactive Features:
1 2 3 4 5 6 7 | |
Node and Edge Styling
Node Configuration
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | |
Edge Configuration
1 2 3 4 5 6 7 8 9 | |
Interactive Features
Click Events
1 2 3 4 5 6 | |
Hover Tooltips
1 2 3 4 | |
Selection Management
1 2 3 4 5 | |
Learning Graph Specific Features
For learning graphs, implement:
- Search Functionality: Find concepts by name
- Filter by Category: Show only specific concept types
- Highlight Dependencies: Show prerequisite chains
- Statistics Display: Count concepts, dependencies, categories
- Export Options: Download graph data
Example Search Implementation
1 2 3 4 5 6 7 8 9 10 11 12 | |
Metadata Requirements
metadata.json should include:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | |
Best Practices
Network Design
- Limit Complexity: Keep under 200 nodes for performance
- Use Categories: Group related nodes with color coding
- Clear Labels: Concise, readable node names
- Meaningful Edges: Show only significant relationships
- Interactive Help: Provide instructions for navigation
Performance
- Physics Stabilization: Let network stabilize before showing
- Clustering: For large graphs, use vis-network clustering
- Level of Detail: Show/hide details based on zoom level
- Lazy Loading: Load additional data on demand
Educational Value
- Guided Exploration: Provide questions to focus investigation
- Progressive Disclosure: Start simple, add complexity
- Context: Explain what the network represents
- Assessment: Include comprehension questions
Accessibility
- Keyboard Navigation: Support arrow keys and tab navigation
- Color: Use color and shape/pattern for categories
- Labels: Ensure readable text size (minimum 12px)
- Alternative: Provide text-based alternative in index.md
Troubleshooting
Issue: Network not displaying
Solution: Check container has height set, verify data format is correct
Issue: Nodes overlapping excessively
Solution: Adjust physics parameters, increase springLength, enable hierarchical layout
Issue: Performance slow with many nodes
Solution: Disable physics after stabilization, implement clustering, use DataView filtering
Issue: Layout not hierarchical
Solution: Verify graph is DAG (no cycles), enable hierarchical layout, set direction
Output Files
- index.md: Documentation with iframe embed and usage instructions
- main.html: Standalone HTML5 file with vis-network CDN
- [sim-name].js: All JavaScript code for the visualization
- metadata.json: Dublin Core metadata for the MicroSim
Integration with Other Skills
Primary Integrations: - learning-graph-generator: Visualize the learning graph CSV as interactive network - book-chapter-generator: Show chapter structure as network - glossary-generator: Link nodes to glossary definitions
Other Integrations: - chapter-content-generator: Embed network visualizations in content - quiz-generator: Create questions about network structure - intelligent-textbook: Core component for Level 2+ textbooks
Technical Requirements
- vis-network.js: Loaded from CDN
- Modern Browser: Chrome, Firefox, Safari, Edge
- No Server: Runs entirely client-side
- Responsive: Container-based sizing
Example Use Cases
- Learning Graph Viewer: Interactive exploration of concept dependencies
- Course Structure: Visualize relationships between course topics
- Prerequisite Chains: Show what must be learned before advanced topics
- Taxonomy Visualization: Network of concept categories
- Social Learning: Student collaboration and communication networks
References
- vis-network Documentation: https://visjs.github.io/vis-network/docs/network/
- vis-network Examples: https://visjs.github.io/vis-network/examples/
- Graph Theory: Basic concepts for network understanding
- Learning Graphs: Educational concept dependency frameworks