Skip to content

A twitterbot about space facts (e.g Voyager's Distance, Near-Earth Objects ...)

License

Notifications You must be signed in to change notification settings

FXelix/space_facts_bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

space_facts_bot

This is a little twitterbot tells you the distance from earth to Voyager I & II and other cool facts like nearby NEOs (near-earth-objects). Link: https://twitter.com/space_facts_bot

alt text alt text


Source of information

Near-Earth objects data from the NASA/JPL SBDB Close Approach Data API: https://ssd-api.jpl.nasa.gov/doc/cad.html

Voyager Distance data from: https://theskylive.com/voyager1-tracker / https://theskylive.com/voyager2-tracker

NASA's Astronomical Picture of the Day (APOD): https://api.nasa.gov/api.html#apod

Examples

  • Voyager I is now 20,858,510,826 km from Earth. Voyager II is now 17,163,741,991 km from Earth. #bot #space #voyager

  • Today's NEO: Object: 2017 QQ1 at 18:57. Estimated diameter: 0.0297 - 0.0665 km. #bot #NEO #asteroids

  • APOD: 2nd september 2017:

APOD: 2nd september 2017

Project Structure

  • bot.py is the main file from where the tweets are send.

  • voyager_distance.py, NEO_flyby.py and nasa_data.py are the files resonsible for accessing the APIs and scraping the data.

  • The individual scripts are written in a way that no error might interrupt the process. Instead no tweet will be send regarding that data.

TODO

  • Add more information, possibly trough more APIs
  • clean up code and be DRYer
  • more explicit file and extension handling in nasa_data.py (e.g youtube video as APOD)
  • Allow .gif formats, but only up to 3MB (Twitter limitation)