Platform
Resources
Pricing
Sign in
Get started
Aaron Kyle Dennis
Social development practitioner. Trying to understand our world.
Workspace
Fork
Published
By
Aaron Kyle Dennis
Edited
Aug 18, 2019
2 forks
1 star
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
{
var
svg
=
d3
.
select
(
DOM
.
svg
(
width
,
height
)
)
;
svg
.
selectAll
(
".subunit"
)
.
data
(
subunits
.
features
)
.
enter
(
)
.
append
(
"path"
)
.
attr
(
"class"
,
function
(
d
)
{
return
"subunit "
+
d
.
id
;
}
)
.
attr
(
"d"
,
path
)
;
return
svg
.
node
(
)
;
}
Insert cell
width
=
1000
Insert cell
height
=
590
;
Insert cell
projection
=
d3
.
geoPatterson
(
)
.
center
(
[
58
,
54
]
)
.
scale
(
520
)
.
translate
(
[
0
,
0
]
)
.
precision
(
.1
)
;
Insert cell
path
=
d3
.
geoPath
(
)
.
projection
(
projection
)
;
Insert cell
subunits
=
topojson
.
feature
(
asia
,
asia
.
objects
.
subunits
)
;
Insert cell
asia
=
fetch
(
"https://gist.githubusercontent.com/dhoboy/ff8448ace9d5d567390a/raw/f98a7b12ec0005f72641696752a96d1ccd73ed22/asia.json"
)
.
then
(
response
=>
response
.
json
(
)
)
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
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
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
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
projection
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
path
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
asia
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
d3
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML