Platform
Resources
Pricing
Sign in
Contact us
Jeshurun Hembd
I want to help more people experience the excitement of exploring Earth's subsurface
Workspace
Fork
Published
By
Jeshurun Hembd
Edited
Aug 3, 2019
1 fork
7 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
visibleYextent
=
2
*
altitude
*
Math
.
tan
(
0.5
*
fieldOfView
*
Math
.
PI
/
180
)
Insert cell
Insert cell
Insert cell
scale
=
earthRadius
*
numPixelsY
/
visibleYextent
;
Insert cell
Insert cell
snyderP
=
1
+
altitude
/
earthRadius
;
Insert cell
projection
=
d3
.
geoSatellite
(
)
.
translate
(
[
width
/
2
,
numPixelsY
/
2
]
)
.
scale
(
scale
)
.
rotate
(
[
-
longitude
,
-
latitude
,
0
]
)
.
distance
(
snyderP
)
.
clipAngle
(
Math
.
acos
(
1
/
snyderP
)
*
180
/
Math
.
PI
)
.
precision
(
0.1
)
;
Insert cell
Insert cell
numPixelsY
=
width
*
0.6
;
Insert cell
earthRadius
=
6371
;
// Spherical approximation: average radius in km
Insert cell
horizon
=
(
{
type
:
"Sphere"
}
)
Insert cell
graticuleMinor
=
d3
.
geoGraticule
(
)
.
step
(
[
5
,
5
]
)
(
)
Insert cell
graticuleMajor
=
d3
.
geoGraticule
(
)
.
step
(
[
15
,
15
]
)
(
)
Insert cell
land
=
topojson
.
feature
(
world
,
world
.
objects
.
land
)
Insert cell
world
=
fetch
(
"https://cdn.jsdelivr.net/npm/world-atlas@1/world/50m.json"
)
.
then
(
response
=>
response
.
json
(
)
)
Insert cell
topojson
=
require
(
"topojson-client@3"
)
Insert cell
import
{
number
}
from
"@jashkenas/inputs"
Insert cell
d3
=
require
(
"d3-geo@1"
,
"d3-geo-projection@2"
)
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
longitude
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
latitude
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
altitude
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
fieldOfView
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
map
Edit
Add comment
Copy import
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
visibleYextent
Add comment
Copy import
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
scale
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
snyderP
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
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
numPixelsY
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
earthRadius
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
horizon
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
graticuleMinor
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
graticuleMajor
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
land
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
world
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
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