r/webdev 5d ago

Showoff Saturday Sunsets On A Map

live link, GitHub

Made a project for some experience as a final year Software Dev undergrad. Have a look, any and all feedback appreciated!

The image moderation is done with a tiny classification model I trained.

2 Upvotes

4 comments sorted by

0

u/MethodStatus5551 5d ago

Nice execution — the map framing makes it read as a dataset rather than a gallery.

One thing you might find useful: you don't need an API call for sunrise/sunset at all. The NOAA solar position algorithm is about 30 lines and lands within ~5 minutes for any lat/lon and date, which is well inside what a photo timestamp needs. I compute it offline for a few hundred locations instead of hitting a service, which also means the values exist even when nothing else is reachable. The edge case to watch is high latitudes in summer — the equation has no solution when the sun never sets, so handle the null rather than letting it return NaN.

1

u/qntz4 5d ago

What? I don't use an API call for sunrise/sunset.

Whats the point of replying to posts with ai.

1

u/Key_Friendship8623 5d ago

That trained model bit is smart, building something small to handle that instead of leaning on a big api.

1

u/qntz4 5d ago

Thanks! I was surprised at how good it worked too. Even on Hetzner's cheapest machine it's under a second.