Platform
Resources
Pricing
Sign in
Get started
Evan Galloway
Workspace
Fork
Public
By
Evan Galloway
Edited
Jun 21, 2024
Fork of
Plot U.S. Map
2 stars
1
Insert cell
Insert cell
Plot
.
plot
(
{
projection
:
"albers-usa"
,
width
,
color
:
{
scheme
:
"Oranges"
,
legend
:
true
,
percent
:
true
,
label
:
"Percentile Rank"
}
,
marks
:
[
Plot
.
geo
(
nation
)
,
Plot
.
geo
(
themesData
,
{
geometry
:
(
d
)
=>
features
.
get
(
d
.
fips
)
,
//Use `features` Map below to get county geometry
fill
:
"value"
,
fx
:
"theme"
}
)
,
Plot
.
geo
(
statemesh
,
{
stroke
:
"#fff"
}
)
]
}
)
Insert cell
features
=
new
Map
(
counties
.
features
.
map
(
(
d
)
=>
[
d
.
id
,
d
]
)
)
Insert cell
Insert cell
themes
=
[
[
"RPL_THEME1"
,
"Socioeconomic Status"
]
,
[
"RPL_THEME2"
,
"Household Characteristics"
]
,
[
"RPL_THEME3"
,
"Racial & Ethnic Minority Status"
]
,
[
"RPL_THEME4"
,
"Housing Type & Transportation"
]
]
Insert cell
Insert cell
import
{
us
}
from
"@observablehq/us-geographic-data"
Insert cell
nation
=
topojson
.
feature
(
us
,
us
.
objects
.
nation
)
Insert cell
counties
=
topojson
.
feature
(
us
,
us
.
objects
.
counties
)
Insert cell
Insert cell
states
=
topojson
.
feature
(
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
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
features
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
themesData
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
themes
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
rawData
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
nation
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
statemesh
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
states
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML