Platform
Solutions
Resources
Pricing
Sign in
Sign up
IDCC
We are here to walk with you the journey of managing social impact.
Workspace
Fork
Published
By
IDCC
Edited
Oct 26, 2021
ISC
1
Insert cell
Insert cell
import
{
slider
}
from
"@jashkenas/inputs"
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
function
autoBox
(
)
{
document
.
body
.
appendChild
(
this
)
;
const
{
x
,
y
,
width
,
height
}
=
this
.
getBBox
(
)
;
document
.
body
.
removeChild
(
this
)
;
return
[
x
,
y
,
width
,
height
]
;
}
Insert cell
color
=
d3
.
scaleOrdinal
(
)
.
domain
(
[
"Physical disability"
,
"SEN children"
,
"Visual impairments"
,
"Hearing impairments"
,
"Mental illnesses"
]
)
.
range
(
d3
.
schemeCategory10
)
Insert cell
function
setColor
(
d
)
{
var
name
=
d
.
data
.
name
;
d
.
color
=
color
.
domain
(
)
.
indexOf
(
name
)
>=
0
?
color
(
name
)
:
d
.
parent
?
d
.
parent
.
color
:
null
;
if
(
d
.
children
)
d
.
children
.
forEach
(
setColor
)
;
}
Insert cell
data
=
FileAttachment
(
"data.json"
)
.
json
(
)
Insert cell
width
=
3975
Insert cell
radius
=
width
/
1.3
Insert cell
tree
=
d3
.
cluster
(
)
.
size
(
[
2
*
Math
.
PI
,
radius
-
100
]
)
Insert cell
d3
=
require
(
"d3@5"
)
Insert cell
One platform
to build and deploy the best data apps
Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
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
filter_year
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
chart
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
wrap
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
wrap_text_array
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
autoBox
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
color
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
setColor
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
width
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
radius
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
tree
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
d3
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML