Platform
Resources
Pricing
Sign in
Get started
Tanner Hobson
Dr. Tanner is a research professor at the University of Tennessee working towards making data science accessible using AI tools.
Workspace
Fork
Public
By
Tanner Hobson
Edited
Jun 12, 2023
Insert cell
Insert cell
JS_DEPS_NODE_X
=
fetch
(
'https://accona.eecs.utk.edu/JS-Deps.node.x.f32.bin'
,
{
mode
:
'cors'
,
}
)
.
then
(
(
response
)
=>
response
.
arrayBuffer
(
)
)
.
then
(
(
arrayBuffer
)
=>
new
Float32Array
(
arrayBuffer
)
)
Insert cell
JS_DEPS_NODE_Y
=
fetch
(
'https://accona.eecs.utk.edu/JS-Deps.node.y.f32.bin'
,
{
mode
:
'cors'
,
}
)
.
then
(
(
response
)
=>
response
.
arrayBuffer
(
)
)
.
then
(
(
arrayBuffer
)
=>
new
Float32Array
(
arrayBuffer
)
)
Insert cell
JS_DEPS_ELEMENTS
=
fetch
(
'https://accona.eecs.utk.edu/JS-Deps.edge.elements.2u32.bin'
,
{
mode
:
'cors'
,
}
)
.
then
(
(
response
)
=>
response
.
arrayBuffer
(
)
)
.
then
(
(
arrayBuffer
)
=>
new
Uint32Array
(
arrayBuffer
)
)
Insert cell
NetV
=
(
await
import
(
"https://cdn.skypack.dev/netv@1.1.11"
)
)
.
__moduleExports
.
default
Insert cell
nodes
=
{
const
nodes
=
[
]
;
for
(
let
i
=
0
,
n
=
JS_DEPS_NODE_X
.
length
;
i
<
n
;
++
i
)
{
nodes
.
push
(
{
id
:
(
i
)
.
toString
(
)
,
x
:
JS_DEPS_NODE_X
[
i
]
,
y
:
JS_DEPS_NODE_Y
[
i
]
,
}
)
;
}
return
nodes
;
}
Insert cell
links
=
{
const
links
=
[
]
;
for
(
let
i
=
0
,
n
=
JS_DEPS_ELEMENTS
.
length
;
i
<
1024
;
i
+=
2
)
{
links
.
push
(
{
source
:
(
JS_DEPS_ELEMENTS
[
i
+
0
]
)
.
toString
(
)
,
target
:
(
JS_DEPS_ELEMENTS
[
i
+
1
]
)
.
toString
(
)
,
}
)
;
}
return
links
;
}
Insert cell
{
return
;
const
container
=
htl
.
html
`<div>`
;
yield
container
;
const
netv
=
new
NetV
(
{
container
,
width
,
nodeLimit
:
nodes
.
length
,
linkLimit
:
links
.
length
,
}
)
;
debugger
;
netv
.
data
(
{
nodes
,
links
,
}
)
;
netv
.
draw
(
)
;
}
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
JS_DEPS_NODE_X
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
JS_DEPS_NODE_Y
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
JS_DEPS_ELEMENTS
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
NetV
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
links
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML