I wanted to figure out what bedtime would be on any planet. I was inspired by Carl's Sagan's quote about the earth being a Pale Blue Dot. How everything you know and love is a small piece of the vast universe. I wanted to be able to show that visualized.
What it does
This app is supposed to let you input a planet or a location and gives you when nightime is using the Skyfield astronomy api. That uses astronomical data to find what the nighttime is. Radar.io is used to figure out your location. Using the Nasa API you could also find the position of satellites above your current location or how far the closest astronomical object is. You could put in your birthday and it would tell you what the weather was on mars that day. Astropy is another api that allows you to access astronomy data and data from Nasa as well.
How I built it
I used flask and the apis and ngrok. The server and all python libraries like numpy, pandas,matplotlib runs on a raspberry pi. The nasa public api is used to find astronomical events close to a date you enter, or your birthday. Radar.io would help track your location if you wanted to find satellites above your head. The Skyfield api is actually dependent on numpy and pandas for data manipulation. Astropy was used for more information handling.
Challenges I ran into
The domain.com redirect was initially not working for me for some reason to my ngrok. And I am still unable to enforce SSL from domain.com (While my ngrok page is secure). So I have kept a link to the ngrok as well. (https://palebluedotin.space/ is the domain I registered) The SSL not being able to be enforced is causing a security prompt in chrome not and saying "this is unsafe", while my actual site is SSL secured.
Accomplishments that I'm proud of
I was able to incorporate the Skyfield Api which is specifically made for astronomy and at least show a proof of concept based on a hard coded location in the flask python script.
What I learned
What's next for When is bedtime
Clean up the user experience and present the data in a nicer format. I don't know if exposing a jupyter notebook publicly would be a good idea from a security standpoint. A lot of my initial testing was through a jupyter notebook.