Platform
Resources
Pricing
Sign in
Get started
Mike Bostock
Visualization toolmaker. Founder @observablehq. Creator @d3. Former @nytgraphics. Pronounced BOSS-tock.
Workspace
Fork
Published
By
Mike Bostock
Edited
Nov 2, 2021
4 forks
10 stars
Insert cell
Insert cell
Insert cell
Insert cell
html
`<img width=${
width
} height=600 src="https://api.mapbox.com/styles/v1/${
style
}/static/${
geocoding
.
features
[
0
]
.
center
.
join
(
)
},9.67,0.00,0.00/${
width
}x${
height
}${
devicePixelRatio
>
1
?
"@2x"
:
""
}?access_token=${
access_token
}">`
Insert cell
geocoding
=
fetch
(
`https://api.tiles.mapbox.com/geocoding/v5/mapbox.places/${
encodeURIComponent
(
query
)
}.json?access_token=${
access_token
}`
)
.
then
(
response
=>
response
.
json
(
)
)
Insert cell
access_token
=
"pk.eyJ1IjoibWJvc3RvY2siLCJhIjoiY2s5ZWRqb2w1MDBnYjNmbzcxb2xxaGZjeSJ9.ZOeAUq-8dsbN7zqgG7vkdQ"
Insert cell
height
=
600
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
query
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
style
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
geocoding
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
access_token
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
height
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML