Platform
Solutions
Resources
Pricing
Sign in
Sign up
Kemper Smith
data viz
Workspace
Fork
Published
By
Kemper Smith
Edited
Jan 28, 2022
1 star
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
myData
=
[
12
,
4
,
23
,
10
,
6
,
9
,
11
,
12
,
4
,
10
,
6
,
9
,
11
,
12
,
4
,
23
,
10
,
6
,
9
,
11
,
12
,
4
,
23
,
10
,
6
,
9
,
11
]
Insert cell
myData
.
length
Insert cell
myViz
=
{
var
svg
=
d3
.
select
(
DOM
.
svg
(
width
,
height
)
)
;
svg
.
style
(
'background-color'
,
'#eeeeee'
)
;
svg
.
selectAll
(
'circle'
)
.
data
(
myData
)
.
join
(
'circle'
)
.
attr
(
'cx'
,
(
d
,
index
)
=>
{
return
(
40
*
index
)
+
20
;
}
)
.
attr
(
'cy'
,
height
/
2
)
.
attr
(
'r'
,
d
=>
d
)
.
style
(
'fill'
,
'#0000ff'
)
.
style
(
'opacity'
,
d
=>
d
/
100
)
;
return
svg
.
node
(
)
;
}
Insert cell
Insert cell
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
myCodeBlock
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
add5
Edit
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
myData
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
myViz
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
mySimpleViz
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
height
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML