Skip to main content

Sunrise vs Sunset Times over the Year

Wisdom
Author

Wolfgang Huber

Published

2026-11-23

For every day of the chosen year this page computes the sunrise and sunset times at a given location with the R package suncalc and plots each day as a point (x = sunrise hour, y = sunset hour). The highlighted points mark the days with the earliest/latest sunset and the day with the earliest/latest sunrise. All computation happens locally in the browser, R runs as WebAssembly, loaded by the quarto-webr extension.

Enter a location and a year, then press Plot. Hover the mouse over a point to see that day’s date.

First use downloads the R WebAssembly runtime and the R packages (suncalc, ggplot2, dplyr, svglite) — this can take a minute. An internet connection is required.


Show the R code
(waiting to run…)