Platform
Resources
Pricing
Sign in
Get started
Data Analysis for History
Workspace
Fork
Public
By
Hrgl226
Edited
Apr 21
2
Insert cell
Insert cell
import
{
ForceGraph
}
from
"@d3/force-directed-graph-component"
Insert cell
staff_nodes.csv
Filter
Columns
Sort
Slice
Save
Type Table, then Shift-Enter. Ctrl-space for more options.
Insert cell
staff_edges.csv
Filter
Columns
Sort
Slice
Save
Type Table, then Shift-Enter. Ctrl-space for more options.
Insert cell
buildNetwork
=
(
n
,
e
)
=>
{
return
{
nodes
:
n
,
links
:
e
}
;
}
Insert cell
staffnetwork
=
buildNetwork
(
staff_nodes
,
staff_edges
)
Insert cell
ForceGraph
(
staffnetwork
)
Insert cell
ForceGraph
(
staffnetwork
,
{
nodeId
:
d
=>
d
.
id
,
nodeGroup
:
d
=>
d
.
weight
,
nodeTitle
:
d
=>
d
.
id
,
tip
:
true
,
width
,
height
:
1200
,
nodeRadius
:
9
,
linkStrokeWidth
:
d
=>
0.2
*
Math
.
sqrt
(
d
.
weight
)
}
)
Insert cell
staffnetwork
.
nodes
[
0
]
Insert cell
Purpose-built for displays of data
Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Try it for free
Learn more
Fork
View
Export
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
staff_nodes
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
File attachments
staff_nodes.csv
CSV
staff_edges.csv
CSV
Databases
Filter
Column
Operator
Columns
Sort
Column
Direction
Descending
Ascending
Slice
From
Start
To
End
staff_edges
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
File attachments
staff_nodes.csv
CSV
staff_edges.csv
CSV
Databases
Filter
Column
Operator
Columns
Sort
Column
Direction
Descending
Ascending
Slice
From
Start
To
End
buildNetwork
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
staffnetwork
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML