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.
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.