Platform
Resources
Pricing
Sign in
Get started
Sander Evers
Workspace
Fork
Public
By
Sander Evers
Edited
Mar 22
Fork of
Plot: Histogram
•
1 fork
1 star
27
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
data
=
selectedFile
.
json
(
)
;
Insert cell
filteredByGame
=
data
.
filter
(
d
=>
d
.
game
===
selectedGame
)
Insert cell
games
=
[
...
new
Set
(
data
.
map
(
d
=>
d
.
game
)
.
reverse
(
)
)
]
Insert cell
indexDomain
=
d3
.
range
(
d3
.
min
(
filteredByGame
.
map
(
d
=>
d
.
index
)
)
,
d3
.
max
(
filteredByGame
.
map
(
d
=>
d
.
index
)
)
+
1
)
Insert cell
dayWinners
=
[
...
d3
.
rollup
(
filteredByGame
,
selectDayWinner
,
d
=>
d
.
index
)
.
values
(
)
]
Insert cell
selectDayWinner
=
ds
=>
d3
.
least
(
ds
,
(
a
,
b
)
=>
{
const
scoreVal
=
score
=>
score
===
'X'
?
7
:
Number
(
score
)
const
prio
=
scoreVal
(
a
.
score
)
-
scoreVal
(
b
.
score
)
;
return
(
prio
==
0
)
?
(
a
.
ts
-
b
.
ts
)
:
prio
;
}
)
;
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
selectedFile
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
selectedGame
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
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
perc
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
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
files
Edit
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
filteredByGame
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
games
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
indexDomain
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
dayWinners
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
selectDayWinner
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML