- Bubble Chart Visualization: Companies are displayed as bubbles with size proportional to their valuation
- Color Coding: Pastel colors by industry sector
- VC Connections: VCs are displayed in red with investment size shown on edges
- Edge Width: Edge width is determined by investment size
- Interactive: Drag bubbles, hover for tooltips
- Responsive: Adapts to window size
- Force Layout: Physics-based positioning with sector clustering
-
Install dependencies:
bun install
-
Start development server:
bun run dev
-
Build for production:
bun run build
Data is queried from data/companies.lbdb files via the API endpoint. The graph displays:
- Company name (inside bubble)
- Valuation (determines bubble size)
- Industry sector (determines color)
The visualization is configured for a graph database with Company and VC node types. To use with a different database schema, configure the NodeTypes object in src/data.ts:
import { setNodeTypes, NodeTypes } from './data';
setNodeTypes({
Company: {
typeName: 'Organization', // Cypher node label
colorCategoryField: 'industry', // Property to color by
colorCategoryLabel: 'industry'
},
VC: {
typeName: 'Investor',
colorCategoryField: null, // No coloring for this type
colorCategoryLabel: null
}
});This will:
- Query
MATCH (n:Organization)instead ofMATCH (c:Company) - Color nodes by the
industryproperty instead ofsector - Query
MATCH (v:Investor)instead ofMATCH (v:VC)
The colorCategoryField property determines which node property is used for color assignment. Set it to null to use a single color for that node type.
├── src/
│ ├── main.ts # Entry point
│ ├── graph.ts # D3.js visualization logic
│ └── data.ts # Data handling and color schemes
├── index.html # HTML template
├── package.json # Dependencies and scripts
└── tsconfig.json # TypeScript configuration
