Inspiration
The line that called to work on this project, the call 'To build something out of this world' really inspired me to work on a project using one of NASA's APIs.
What it does
This Python script fetches information on near-Earth asteroids within a specified date range using NASA's Near Earth Object Web Service (NeoWs). NeoWs is a RESTful web service for near earth Asteroid information.
My CLI application takes the start_date and end_date as arguments and outputs the name, Asteroid ID as well as NEO Reference ID of the asteroid(s) within the specified date range.
It also takes optional arguments -s or --size that gives us information about the asteroid's size and the -d or the --distance optional argument that outputs the information on distance between the Earth and the Asteroid.
How we built it
1) API Key Environment Variable: We set up an environment variable to securely store the API key required for accessing asteroid data.
2) Argument Parsing: We used the argparse library to handle command-line arguments. Users can input start and end dates, along with optional flags for size and distance information.
3) Data Retrieval: We constructed a URL using the NASA API to fetch asteroid data within the specified date range. The API key ensures authorized access.
4) Data Processing and Display: We parsed the retrieved data and displayed relevant information. For each date, we listed asteroid details, including ID, name, and NEO reference ID. If requested, we also provided estimated diameter and miss distance.
Challenges we ran into and the things we learned
Initially, working with the data for the asteroids felt really daunting as there was and still are a lot of things that I did not entirely understand. However, through building this application, I learned to break large and daunting things into smaller parts to understand and make sense of them. Learning new things and getting to work on something so interesting was really fun to work with.
What's next for asteroid-tracker
In the future, I wish to build it into something a bit more intuitive than it is now and also provide more detailed information about the asteroids.
Log in or sign up for Devpost to join the conversation.