Platform
Resources
Pricing
Sign in
Get started
Fabian Gündel
Workspace
Fork
Public
By
Fabian Gündel
Edited
Aug 14, 2023
Fork of
IR Result
•
1 fork
1
Insert cell
Insert cell
Insert cell
Plot
.
plot
(
{
x
:
{
label
:
'Frequency'
,
reverse
:
true
,
domain
:
[
0
,
4000
]
}
,
y
:
{
label
:
'Intensity'
,
}
,
marks
:
[
Plot
.
ruleY
(
[
0
]
)
,
Plot
.
rectY
(
ir
,
{
x1
:
d
=>
d
.
x
-
range
/
2
,
x2
:
d
=>
d
.
x
+
range
/
2
,
y
:
'y'
,
fill
:
'rebeccapurple'
}
)
,
]
}
)
Insert cell
Insert cell
index
=
FileAttachment
(
"index.json"
)
.
json
(
)
Insert cell
Insert cell
ir
=
{
const
data
=
[
]
const
{
ir
}
=
index
.
reports
[
0
]
.
results
for
(
let
i
=
0
;
i
<
ir
.
frequencies
.
data
.
length
;
++
i
)
{
const
x
=
ir
.
frequencies
.
data
[
i
]
const
y
=
ir
.
intensities
.
data
[
i
]
data
.
push
(
{
x
,
y
}
)
}
return
data
}
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
range
Edit
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
index
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
ir
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML