Graph Data
Utilities in lib/graphData.ts
define the core types and a loader for the renderer.
Types
Entity
: nodes with degree, frequency, and text-unit IDsRelationship
: edges with weight and descriptionCommunity
: hierarchical clusters with parent/children and entity membershipsCommunityReport
: model-generated summaries and ranksGraphData
: aggregate structure
GraphDataLoader
- Fetches
entities.json
,relationships.json
,communities.json
,community_reports.json
- Normalizes fields and maps types
- Enriches community titles from
community_reports
Use:
const loader = new GraphDataLoader('/api/data')
const data = await loader.loadGraphData()
Last updated on