Platform
Resources
Pricing
Sign in
Get started
Personal
Workspace
Fork
Public
By
Aaron Olson
Edited
May 6
Fork of
Plot: V-Counties
1
Insert cell
Insert cell
viewof
select
=
Inputs
.
select
(
[
"A"
,
"B"
,
"C"
,
"D"
,
"E"
,
"F"
,
"G"
,
"H"
,
"I"
,
"J"
,
"K"
,
"L"
,
"M"
,
"N"
,
"O"
,
"P"
,
"Q"
,
"R"
,
"S"
,
"T"
,
"U"
,
"V"
,
"W"
,
"X"
,
"Y"
,
"Z"
]
,
{
label
:
"Select a letter"
}
)
Insert cell
selectedValue
=
select
Insert cell
Plot
.
plot
(
{
projection
:
"albers-usa"
,
marks
:
[
Plot
.
geo
(
countymesh
,
{
strokeWidth
:
0.1
}
)
,
Plot
.
geo
(
statemesh
,
{
strokeWidth
:
0.5
}
)
,
Plot
.
dot
(
counties
,
Plot
.
centroid
(
{
filter
:
(
d
)
=>
d
.
properties
.
name
.
match
(
new
RegExp
(
`^${
selectedValue
}`
)
)
,
fill
:
"red"
,
tip
:
true
//,stroke: "red"
}
)
)
]
}
)
Insert cell
us
=
FileAttachment
(
"us-counties-10m.json"
)
.
json
(
)
Insert cell
counties
=
topojson
.
feature
(
us
,
us
.
objects
.
counties
)
.
features
Insert cell
countymesh
=
topojson
.
mesh
(
us
,
us
.
objects
.
counties
)
Insert cell
statemesh
=
topojson
.
mesh
(
us
,
us
.
objects
.
states
)
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
select
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
selectedValue
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
us
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
counties
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
countymesh
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
statemesh
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML