Platform
Resources
Pricing
Sign in
Get started
Aaron Hill
Workspace
Fork
Published
2 collections
By
Aaron Hill
Edited
Sep 10, 2019
uncertainty
pixelated area
random lines
bootstrap sample points
identity
area: map/geographic coordinate system
area: cartesian coordinate system
line
point
area: polar coordinate system
Also listed in…
uncertainty: templates
Insert cell
md
`# area: map/geographic coordinate system`
Insert cell
chart
=
{
const
svg
=
d3
.
select
(
DOM
.
svg
(
width
,
height
)
)
.
style
(
"width"
,
"40%"
)
.
style
(
"height"
,
"auto"
)
.
style
(
"font"
,
"10px sans-serif"
)
;
svg
.
selectAll
(
"path"
)
.
data
(
subunits
.
features
)
.
enter
(
)
.
append
(
"path"
)
.
attr
(
"d"
,
mapPath
)
;
return
svg
.
node
(
)
;
}
Insert cell
projection
=
d3
.
geoMercator
(
)
.
center
(
[
-
3
,
40
]
)
.
scale
(
[
1300
]
)
.
translate
(
[
width
/
2
,
height
/
2
]
)
;
Insert cell
mapPath
=
d3
.
geoPath
(
)
.
projection
(
projection
)
;
Insert cell
width
=
300
Insert cell
height
=
300
Insert cell
subunits
=
topojson
.
feature
(
data
,
data
.
objects
.
subunits
)
Insert cell
topojson
=
require
(
"topojson-client@3"
)
Insert cell
data
=
d3
.
json
(
"https://gist.githubusercontent.com"
+
"/aaronxhill/cc1ee2394eb7eb9e42b57a3e0f14e458"
+
"/raw/889e38c6dbcc6b4fcca0bdbce583a12131c6b0ca"
+
"/esp.json"
)
//https://gist.github.com/aaronxhill/cc1ee2394eb7eb9e42b57a3e0f14e458/raw/889e38c6dbcc6b4fcca0bdbce583a12131c6b0ca/esp.json
Insert cell
d3
=
require
(
"d3@5"
,
"topojson"
)
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
Listed in...
uncertainty: templates
Aaron Hill
uncertainty
Aaron Hill
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
chart
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
mapPath
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
width
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
subunits
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
topojson
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
data
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
d3
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML