Platform
Resources
Pricing
Sign in
Get started
IAT355
Workspace
Fork
Published
Spring2019
By
IAT355
Edited
Jan 29, 2019
9 forks
Importers
2 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
df
=
dfjs
.
DataFrame
.
fromCSV
(
'https://gist.githubusercontent.com/SFU-IAT355/8359599c1f5fbbbdc32028cd224fe827/raw/2d47488ed13afb4b55db02c9ab17b43351b20b1a/gistfile1.txt'
)
Insert cell
Insert cell
Insert cell
Insert cell
cereals
=
df
.
toCollection
(
)
Insert cell
Insert cell
Test
=
VegaLite
(
{
data
:
{
values
:
cereals
}
,
mark
:
"bar"
,
encoding
:
{
x
:
{
bin
:
true
,
field
:
"% from sugar"
,
type
:
"quantitative"
}
,
y
:
{
aggregate
:
"count"
,
type
:
"quantitative"
}
}
}
)
Insert cell
Insert cell
Insert cell
df
.
show
(
40
)
Insert cell
Insert cell
df2
=
df
.
replace
(
'-99'
,
''
,
"rating"
)
Insert cell
Insert cell
Insert cell
df2
.
countValue
(
''
,
"weight"
)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
cereals2
=
df2
.
toCollection
(
)
Insert cell
Insert cell
DOM
.
download
(
new
Blob
(
[
d3
.
csvFormat
(
cereals2
)
]
,
{
type
:
"text/csv"
}
)
,
"Cereals.csv"
)
Insert cell
Insert cell
dfjs
=
require
(
'https://bundle.run/dataframe-js@1.3.2'
)
Insert cell
VegaLite
=
require
(
'@observablehq/vega-lite'
)
Insert cell
d3
=
require
(
'd3@5'
)
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
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
df
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
example
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
cereals
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
Test
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
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
YO
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
df2
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
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
cereals2
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
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
dfjs
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
VegaLite
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
d3
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML