Platform
Resources
Pricing
Sign in
Get started
Fabio Miranda
Workspace
Fork
Published
Intro to Observable and D3
By
Fabio Miranda
Edited
Sep 22, 2022
Fork of
Introduction to Observable
2 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
1
+
12
// Operations
Insert cell
w
=
10
// attributions
Insert cell
{
const
angles
=
[
0
,
15
,
30
,
45
,
60
,
75
,
90
]
;
const
sines
=
angles
.
map
(
x
=>
Math
.
sin
(
x
*
(
Math
.
PI
/
180
)
)
)
;
return
sines
;
}
Insert cell
Insert cell
obj
=
{
return
{
x
:
10
,
y
:
20
}
;
}
Insert cell
Insert cell
data
=
{
const
random_numbers
=
[
]
;
for
(
let
i
=
0
;
i
<
nNumbers
;
i
++
)
{
random_numbers
.
push
(
Math
.
random
(
)
*
10
)
;
}
return
random_numbers
;
}
Insert cell
nNumbers
=
5
Insert cell
Insert cell
squared
(
4
)
Insert cell
##
Useful Links
Insert cell
Insert cell
squared
=
{
return
(
a
)
=>
{
return
Math
.
pow
(
a
,
2
)
;
}
}
Insert cell
greypin
=
{
return
html
`<svg style='vertical-align:middle' viewBox="0 0 16 16" fill='#999999' stroke=none viewBox="0 0 16 16" width=16 height=16><path d="M8 1h3v1l-1 1v4l2 .875V9H9v5.125L8 15l-1-.875V9H4V7.875L6 7V3L5 2V1z"></path></svg>`
}
Insert cell
greyarrow
=
{
return
html
`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" transform="rotate(-90) translate(-3,0)"><path d="M13 6.5L8 12L3 6.5" stroke="#999999" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></svg>`
}
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
Compare fork
Fork
View
Export
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
w
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
obj
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
data
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
nNumbers
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
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
squared
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
greypin
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
greyarrow
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML