You are browsing as a guest. Sign up (or log in) to start making projects!

akshaj_nagamalli

@akshaj_nagamalli

Joined June 12th, 2026

  • 1Devlogs
  • 1Projects
  • 1Ships
  • 0Votes
Ship Changes requested

Asteroid Radar is a Streamlit web app that pulls a week of NASA near-Earth-object data and ranks asteroids by a weighted danger score (0.4 size / 0.3 speed / 0.3 distance). It shows a sorted table, a top-10 danger chart, and a dropdown to inspect any asteroid. Most challenging part: Streamlit re-runs the whole script on every click, so I had to cache the NASA fetch with @st.cache_data to keep it fast. Proud of designing the danger model myself and getting it deployed live. To test: open the demo link, browse the table, check the chart, and pick asteroids from the dropdown.

  • 1 devlog
  • 4h
Try project → See source code →
Open comments for this post

4h 9m 53s logged

Asteroid Radar is now a working web app
Turned my asteroid danger-ranking model into a live Streamlit app today. Recap of what it does: it pulls a week of NASA near-Earth-object data, normalizes size, speed, and miss-distance onto a 0–1 scale, and combines them into a weighted danger score. I weighted it size-heavy on purpose (0.4 size / 0.3 speed / 0.3 distance) — my reasoning is that a large impactor is the bigger threat even from farther out, so the biggest rock should outrank the closest one.
The app has three pieces:

A full table of all asteroids, sorted by danger.
A top-10 horizontal bar chart. Ran into a fun bug here — Plotly draws bars bottom-up, so my “most dangerous” chart rendered upside down with the scariest asteroid at the bottom. Reversed the data feeding the chart to flip it right.
A dropdown to pick any asteroid and see its full stats.

Biggest thing I learned: Streamlit re-runs your entire script on every interaction, so the NASA API call was firing on every click. Wrapped it in @st.cache_data so it fetches once and reuses the result — now the dropdown updates instantly instead of re-hitting the API every time.
Also cleaned up for shipping: moved my API key into Streamlit secrets (out of the committed code) and pushed a clean repo to GitHub.

1
0
10

Followers

Loading…