[This article was first published on Revolutions, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

This video tour of the International Space Station from NASA commander Sunny Williams (via Andrew Sullivan)is just amazing:

I loved, loved watching this — it made me feel like I was six again, when I wanted to be an astronaut. I hope NASA does more videos like this to inspire more boys and girls to be scientists and aspire one day to float as effortly in Space. Do check it out this weekend if you don't have time right now, seriously it's worth it.

The bit of the video where Commander Williams is in the cupola and watching the surface of Earth glide below made me wonder: just how much of the Earth can you actually see from the ISS? Google searching didn't reveal the answer, but it's just a simple bit of trigonometry, right? (Cue me spending far too long scratching diagrams and equations on paper…) We just need to find the height of the viewable sperical cap, which if my math is right is just h*r/(h+r), where h is the orbit height and r is the diameter of the Earth. (Don't you just love it when all the terms in a complex formula cancel out, and you're left with something simple?) I wrote an R function to calculate the proportion of the surface that would be visible:

```visible.surface <- function(r=6378,h=370) {
# r - radius of planet (default: radius of earth in km)
# h - height of satellite (default: mean orbit alt of ISS)

## find "x", depth of sperical cap
x <- h*r/(h+r)

## ratio of spherical cap,
##   2*pi*r*x, https://en.wikipedia.org/wiki/Spherical_cap
## to surface area of sphere
##   4*pi*r^2
## returned as a percentage
x / (2*r) * 100
}```

The Earth has a radius of 6478 kilometers, and the ISS is in a low-Earth orbit that averages about 370km above the surface. Plugging those numbers in, we surprisingly find that only 3% of the Earth's surface is visible from the ISS at any one time!

```> visible.surface(6378, 370)
 2.741553```

Running some other calculations,

• From the top of the world's tallest building, the 830m Burj Khalifa, you can see 0.0065% of the Earth's surface (about 33,000 square kilometers)
• Astronauts on the Space Shuttle (orbiting at 390km) could see at most 2.9% of the surface at a time
• GPS satellites (orbiting at 20,200km) have a view of 38% of the earth's surface
• The famous "Blue Marble" photograph shows only 43.8% of the Earth's surface
• An astronaut on the moon can see only 49.2% of the Earth's surface (and conversely, we on Earth see 49.8% of the Moon's surface)

So it turns out you have to get a long, long way away from Earth until you can get close to seeing a complete hemisphere!