Platform
Resources
Pricing
Sign in
Get started
Fati CHEN
Ph.D in DataViz
Workspace
Fork
Published
By
Fati CHEN
Edited
Jun 10, 2020
Importers
Insert cell
Insert cell
Insert cell
Insert cell
graph
=
AgoraGML
.
toGML
(
{
nodes
,
edges
}
)
Insert cell
nodes
=
_
.
map
(
actors
,
(
{
id
:
index
,
label
,
...
meta
}
)
=>
(
{
...
node_defaults
,
index
,
label
,
meta
}
)
)
Insert cell
edges
=
_
.
map
(
links
,
(
{
source
,
target
,
weight
,
...
meta
}
)
=>
(
{
source
,
target
,
meta
:
{
...
meta
,
intWeight
:
weight
}
}
)
)
Insert cell
md
`## Options`
Insert cell
node_defaults
=
(
{
x
:
0
,
y
:
0
,
width
:
20
,
height
:
20
}
)
Insert cell
Insert cell
links
=
fetch
(
"https://gist.githubusercontent.com/stardisblue/a9989f9515680b0fe37a97816becbbb7/raw/6154eac3d0d2b1f8537c96da6bca49c8931eefbc/graph_links.json"
)
.
then
(
l
=>
l
.
json
(
)
)
Insert cell
actors
=
fetch
(
"https://gist.githubusercontent.com/stardisblue/a9989f9515680b0fe37a97816becbbb7/raw/6154eac3d0d2b1f8537c96da6bca49c8931eefbc/actor-nodes.json"
)
.
then
(
d
=>
d
.
json
(
)
)
Insert cell
Insert cell
AgoraGML
=
require
(
'https://cdn.jsdelivr.net/gh/agorajs/agora-gml@latest/dist/agora-gml.min.js'
)
Insert cell
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
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
graph
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
nodes
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
edges
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
node_defaults
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
links
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
actors
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
AgoraGML
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
_
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML