Platform
Resources
Pricing
Sign in
Contact us
Observable
The end-to-end solution for building and hosting better data apps, dashboards, and reports.
Workspace
Fork
Published
Introduction to Web-based Data Visualization
By
Ian Johnson
Edited
Apr 19, 2022
Fork of
Input + Chart
•
4 forks
2 stars
1
Insert cell
Insert cell
Insert cell
data
=
FileAttachment
(
"bandcamp-oneday.csv"
)
.
csv
(
{
typed
:
true
}
)
Insert cell
Inputs
.
table
(
data
)
Insert cell
Insert cell
Insert cell
// type your code here
Insert cell
Insert cell
Insert cell
// type your code here
Insert cell
Insert cell
1
// let's update this code to change the group by and the aggregation
Plot
.
barX
(
data
,
Plot
.
groupY
(
{
x
:
"mean"
}
,
{
x
:
"amount_paid"
,
y
:
"type"
,
sort
:
{
y
:
"x"
,
reverse
:
true
}
}
)
)
.
plot
(
{
marginLeft
:
100
}
)
Insert cell
Insert cell
Insert cell
countries
=
new
Set
(
data
.
map
(
d
=>
d
.
country
)
)
Insert cell
// type your code here
Insert cell
Insert cell
// let's update this code to filter the data by country
Plot
.
barX
(
data
,
Plot
.
groupY
(
{
x
:
"sum"
}
,
{
x
:
"amount_paid"
,
y
:
"type"
,
sort
:
{
y
:
"x"
,
reverse
:
true
,
limit
:
10
}
}
)
)
.
plot
(
{
marginLeft
:
100
}
)
Insert cell
Insert cell
Insert cell
Insert cell
// lets update this code to color dots differently above and below a minimum amount paid
Plot
.
plot
(
{
marks
:
[
Plot
.
dot
(
data
.
filter
(
d
=>
d
.
country
==
"United Kingdom"
)
,
{
x
:
"utc_timestamp"
,
y
:
"amount_paid"
}
)
]
,
y
:
{
type
:
"symlog"
}
}
)
Insert cell
Insert cell
Insert cell
Insert cell
// type your code here
Insert cell
// update this code to use the search data
Inputs
.
table
(
data
)
Insert cell
// update this code to use the search data
Plot
.
plot
(
{
marks
:
[
Plot
.
rectY
(
data
,
Plot
.
binX
(
{
y
:
"sum"
}
,
{
x
:
"utc_timestamp"
,
y
:
"amount_paid"
,
fill
:
"type"
,
thresholds
:
d3
.
utcHour
}
)
)
]
,
}
)
Insert cell
Insert cell
Insert cell
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
data
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
Edit
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
Edit
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
Show 1 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
countries
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
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
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
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
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML