Platform
Resources
Pricing
Sign in
Get started
Steve Pegg
Mainly coding for fun these days!
Workspace
Fork
Public
By
Steve Pegg
Edited
Feb 19, 2023
1 fork
Insert cell
Insert cell
data
=
d3
.
csv
(
getCsvUrl
(
url
)
,
d3
.
autoType
)
Insert cell
getCsvUrl
=
url
=>
{
url
=
new
URL
(
url
)
;
const
id
=
url
.
pathname
.
split
(
"/"
)
[
3
]
const
gid
=
new
URLSearchParams
(
url
.
hash
.
slice
(
1
)
)
.
get
(
"gid"
)
||
0
;
return
`https://docs.google.com/spreadsheets/d/${
id
}/export?format=csv&gid=${
gid
}`
}
Insert cell
url
=
"https://docs.google.com/spreadsheets/d/1djrMuUfZnCKdwechSbhhIDQHBBoI8Sb70mIPtR9j0OM/edit#gid=0"
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
data
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
getCsvUrl
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
url
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML