takes raw data from NASA and turns it into APIs related to space and spacecraft. We've wrapped these up into convenient function at the end of the document, but you can see their result here. Let's start by seeing where the ISS is right now:
await currentPosition();
And when will it pass over San Francisco?
// Change this to use your location in this example var myLocation = "San Francisco, CA"; await nextPass(myLocation);
And how many are in space?
await numberInSpace();
Which are:
var people = await peopleInSpace(); { return + " (" + person.craft + ")"; });
Get the current position of the ISS.
async function currentPosition() { return JSON.parse(await require("request-promise")("")).iss_position; };
Find out when the ISS will next be above you.
async function nextPass(location) { var geocode = require('notebook')('capicue/geocode/5.0.0'); return geocode.simpleLookup(location).then(function(coordinates) { var options = {lat:, lon: coordinates.lng}; return require("request-promise")('', { qs: options }); }).then(function(passResult) { var timestamp = JSON.parse(passResult).response[0].risetime; return require("moment").unix(timestamp).fromNow(); }); };
Find out how many people are currently in space.
async function numberInSpace() { return JSON.parse(await require("request-promise")('')).number; };
Then find out who they are.
async function peopleInSpace() { return JSON.parse(await require("request-promise")("")).people; };
module.exports = { currentPosition: currentPosition, nextPass: nextPass, numberInSpace: numberInSpace, peopleInSpace: peopleInSpace };


  • posted 6 months ago by 57d86b3a53afa31400597415
    Hello World
  • posted 6 months ago by 57d9137b81f03814001dd72c
  • posted 5 months ago by 5802d4c6ac70ca0014d7801a
    wish i could could see the world from that perception
  • posted 5 months ago by ybouhjira
  • posted 4 months ago by 5827d41eca79740014170f4f
  • posted 3 months ago by 5864349dda298c00141112d4
  • posted 2 months ago by 587faf53aabc770014e31715
  • posted 2 months ago by 589a6a68ae9e7d001447ac02
    this is insane

sign in to comment