Platform
Solutions
Resources
Pricing
Sign in
Sign up
Shirley Wu
Award-winning creative focused on data-driven art and visualizations, trying to push the boundaries of the web one visual story at a time ✨
Workspace
Fork
Public
Workshop: Introduction to D3.js
By
Shirley Wu
Edited
Jun 22, 2022
61 forks
Importers
Comments locked
96 stars
5
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
3
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
html
`
<svg width=100 height=100 style='overflow: visible; margin: 5px;'>
<path d='M0,0 C50,40 50,70 20,100 L0,85 L-20,100 C-50,70 -50,40 0,0'
fill='none' stroke='#000' stroke-width=2 transform='translate(50,0)' />
</svg>
`
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
2
Insert cell
Insert cell
viewof
smileyPath
=
html
`<input type="text" placeholder="Type your smiley path here"></input>`
Insert cell
Insert cell
html
`
<svg width=100 height=100 style='border: 1px dashed'>
<path d='${
petalPath
}' fill='none' stroke='#000' stroke-width=2 transform='translate(50,0)' />
</svg>
<code>100px</code>
`
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
{
window
.
localStorage
.
petalPath
=
petalPath
||
'M0,0 C50,40 50,70 20,100 L0,85 L-20,100 C-50,70 -50,40 0,0'
}
Insert cell
Type JavaScript, then Shift-Enter. Ctrl-space for more options. Arrow ↑/↓ to switch modes.
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
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Show 3 comments
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Show 2 comments
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
smileyPath
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
petalPath
Edit
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
tableSVG
Edit
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
colorXY
Edit
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML