Inspiration
A fellow software engineer and part time sunset enthusiast who couldn't make it to this hackathon has always wanted to build a sunset probability tool
What it does
Grafana dashboard that tracks metrics about the weather, its all there in a nice panel for you ;) Our flagship metric is a clear sunset probability metric, taking by combining multiple relevant metrics in a weighted formula.
How we built it
Python, Ngrok, Grafana, Prometheus, weather api's Multiple weather api and open meteo API calls to collect the data, relevant values are computed to form the probability
def sunset_probability(clow, cmid, chigh, precip, pm25, aod):
cloud = cloud_layer_score(clow, cmid, chigh)
prec = precipitation_score(precip)
air = air_quality_score(pm25, aod)
score = (
WEIGHTS["cloud"] * cloud +
WEIGHTS["precip"] * prec +
WEIGHTS["air"] * air
)
return clamp01(score)
all data is then displayed on Grafana using Prometheus
Challenges we ran into
Configuring Prometheus - getting scraped data from local machine to Grafana cloud Merge conflict
Accomplishments that we're proud of
- Setup a basic HTTP server in python for first time, even had some path validation.
- Used api's to query data
- Configured Prometheus to send data to a grafana cloud account
- Weighted probability model
What we learned
- Integration of Prometheus and Grafana
- Making a weighted model/formula
What's next for Grafana metrics
- Refactoring code-base to follow design patterns.
- Trying out other data-sources, and tracking things like response times for API calls.
- Adding sunset image that stores this to train an LLM
- building LLM that processes sunset images to further improve probability
Log in or sign up for Devpost to join the conversation.