Platform
Resources
Pricing
Sign in
Get started
Tom MacWright
hi!
Workspace
Fork
Published unlisted
By
Tom MacWright
Edited
May 22, 2018
1 star
Insert cell
Insert cell
Insert cell
townsAndBoroughs
=
d3
.
html
(
'https://cors-anywhere.herokuapp.com/https://en.wikipedia.org/wiki/List_of_towns_and_boroughs_in_Pennsylvania'
)
Insert cell
Array
.
from
(
townsAndBoroughs
.
querySelectorAll
(
'.wikitable'
)
[
1
]
.
querySelectorAll
(
'tr'
)
,
row
=>
Array
.
from
(
row
.
querySelectorAll
(
'td'
)
,
td
=>
td
.
textContent
)
)
Insert cell
Insert cell
Insert cell
d3
=
require
(
'd3'
)
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
townsAndBoroughs
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
d3
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML