Platform
Resources
Pricing
Sign in
Get started
University of Iowa
Workspace
Fork
Public
By
m-anhalt
Edited
May 8
Fork of
Respiratory Disease per Iowa County - Natural Breaks
2
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
height
=
610
Insert cell
width
=
975
Insert cell
path_points
=
d3
.
geoPath
(
)
.
projection
(
projection
)
Insert cell
path_basemap
=
d3
.
geoPath
(
)
.
projection
(
projection
)
Insert cell
projection
=
d3
.
geoAlbers
(
)
// Set up the projection centered on Iowa
.
center
(
[
0
,
42.0
]
)
// latitude center
.
rotate
(
[
93.5
,
0
]
)
// longitude center (Iowa is ~93.5°W)
.
parallels
(
[
29.5
,
45.5
]
)
// standard parallels for conic projections
.
scale
(
8000
)
// zoom level; adjust depending on canvas size
.
translate
(
[
width
/
2
,
height
/
2
]
)
// center it in your SVG
Insert cell
format
=
d3
.
format
(
".2s"
)
Insert cell
//proportional symbols
//radius = d3.scaleSqrt([0, d3.max(attribute)], [0, 30])
Insert cell
radius
=
d3
.
scaleThreshold
(
)
.
domain
(
attribute
)
.
range
(
radiusArray
)
Insert cell
sizeArrayForLegend
=
Array
.
from
(
radiusArray
,
d
=>
Math
.
PI
*
Math
.
pow
(
d
,
2
)
)
Insert cell
radiusArray
=
[
3
,
6
,
12
,
20
]
Insert cell
circleLabels
=
Array
.
from
(
cluster
,
d
=>
format
(
Math
.
pow
(
d
,
2
)
)
)
Insert cell
quantiles
=
d3
.
scaleQuantile
(
)
.
domain
(
attribute
)
.
range
(
pinks
)
Insert cell
pinks
=
[
"#feebe2"
,
"#fbb4b9"
,
"#f768a1"
,
"#ae017e"
]
Insert cell
cluster
=
simple
.
ckmeans
(
attribute
,
4
)
.
map
(
v
=>
v
.
pop
(
)
)
Insert cell
d3
.
max
(
attribute
)
Insert cell
attribute
=
Array
.
from
(
points
.
features
,
d
=>
Math
.
sqrt
(
d
.
properties
[
attributeName
]
)
)
Insert cell
attributeName
=
"T_Respiratory_Disease_Death_Data___Resp_Crude"
Insert cell
idName
=
"FIPS"
Insert cell
//import the point data (geojson)
points
=
FileAttachment
(
"CAFOResp.geojson"
)
.
json
(
)
Insert cell
//import the polygon base map data
basepolygons
=
FileAttachment
(
"iowa_counties_topo.json"
)
.
json
(
)
Insert cell
Insert cell
Insert cell
Insert cell
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
symbolLegend
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
graduatedSymbols
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
symbolLegendDef
Edit
Pin
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
height
Unpin
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
width
Unpin
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
path_points
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
path_basemap
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
projection
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
format
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
radius
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
sizeArrayForLegend
Unpin
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
radiusArray
Unpin
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
circleLabels
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
quantiles
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
pinks
Unpin
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
cluster
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
attribute
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
attributeName
Unpin
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
idName
Unpin
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
points
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
basepolygons
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
simple
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
topojson
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
d3
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
JavaScript
Markdown
HTML
JavaScript
Markdown
HTML
JavaScript
Markdown
HTML
JavaScript
Markdown
HTML
JavaScript
Markdown
HTML
JavaScript
Markdown
HTML
JavaScript
Markdown
HTML