by @ddbeck
Star Near You is a bot that's tweeting animated GIFs of the Sun's corona using data from a NASA spacecraft, the Solar Dynamics Observatory. It's scheduled to tweet three times a day, showing a time-lapse view of the Sun during the previous eight hours. A typical GIF looks like this:
Star Near You helped to inspire another bot maker to make an animated GIF bot that stays a little closer to Earth.
Thanks to NASA/SDO and the AIA, EVE, and HMI science teams for providing the data used in this project. Additional thanks to the attendees of Bot Summit 2014 and the people of #botally, who answered my technical questions and provided inspiration.
To set up Star Near You, you'll need the following:
- Python 3.5 or later
- ImageMagick
- Gifsicle
To install and configure Star Near You:
-
Run
pip install https://github.com/ddbeck/starnearyou
. -
Create a work directory with two subdirectories,
gifs
andoriginals
. This is where downloaded files and generated GIFs are stored. -
Create a Twitter API app and put your API keys in a JSON file, like this:
{ "consumer_key": "consumer (api) key goes here", "consumer_secret": "consumer (api) secret goes here", "oauth_token": "", "oath_token_secret": "" }
-
Run
starnearyou --keyfile <path_to_keyfile> --request-access
, where<path_to_keyfile>
is the path to the JSON file you created in the previous step. -
Follow the instructions shown. When you're finished, add the access key and secret to the JSON file.
To tweet with Star Near You, run starnearyou --keyfile <path_to_keyfile>
in your work directory.
Although this is an art piece, if you need help or have a suggestion for improving this bot, then you may open an issue on the GitHub repository.
You are free to use, copy, modify, and distribute this software under the terms of the MIT license, as long as you include the copyright and license notice. See the LICENSE
file for details.
The data provided by NASA is a work of the United States government and is not copyrighted. See the Solar Dynamics Observatory page on Data Rights and Rules for Data Use for details.