Platform
Resources
Pricing
Sign in
Get started
Lucas
Workspace
Fork
Published
By
Lucas
Edited
Jul 16, 2022
Importers
1
Insert cell
#
PLOS Taxonomy
Insert cell
Insert cell
Insert cell
chart3
=
Tree
(
filterDepth
(
flare
.
children
[
0
]
,
4
)
,
{
label
:
(
d
)
=>
d
.
name
,
width
:
width
*
8
,
height
:
width
*
8
,
margin
:
100
}
)
Insert cell
flareDepth3
=
{
const
data
=
JSON
.
parse
(
JSON
.
stringify
(
flare
)
)
;
data
.
children
=
data
.
children
.
map
(
d
=>
{
d
.
children
=
d
.
children
.
map
(
d
=>
{
d
.
children
=
[
]
;
return
d
;
}
)
return
d
;
}
)
return
data
;
}
Insert cell
filterDepth
=
(
inData
,
depth
)
=>
{
const
data
=
structuredClone
(
inData
)
;
function
fd
(
da
,
de
)
{
if
(
da
.
children
&&
de
>
0
)
{
da
.
children
.
map
(
(
d
)
=>
fd
(
d
,
de
-
1
)
)
;
}
else
{
da
.
children
=
[
]
;
}
return
da
;
}
return
fd
(
data
,
depth
)
;
}
Insert cell
data
=
FileAttachment
(
"plosthes.2020-1.csv"
)
.
csv
(
)
Insert cell
tier1
=
data
.
filter
(
d
=>
d
[
"Tier 1"
]
!==
""
)
Insert cell
Insert cell
Insert cell
PLOSFlareData
=
flare
Insert cell
import
{
Sunburst
}
from
"@d3/sunburst"
Insert cell
import
{
Tree
}
from
"@d3/radial-tree"
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
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
chart
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
chart2
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
chart3
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
flareDepth3
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
filterDepth
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
data
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
tier1
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
tier1Count
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
flare
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
PLOSFlareData
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML