2/5 The curve the sun travels is called an analemma, from the Ancient Greek ἀνάλημμα: the funky path is due to earth's tilt and elliptical orbit. It looks differently depending on where on earth you are situated: compare DC at noon with the equator (which has the sun directly above at one point!)

3/5 The orientation and position of the analemma depends on your latitude and the specific time of day. Here's the analemma for 5 PM taken from the South Pole to the North Pole in 10 degree increments. When it is partially below the horizon, it means the sun has set by that time for part of the year

figure 8 shape rising and rotating above the horizon
figure 8 shape rising and rotating above the horizon

4/5 As an extreme example, you can plot the analemmas for noon and see that it's below the horizon for part of the year in the arctics: this is when those latitudes are in the long polar night! (the crazy looping around latitude = 0 is just from a singularity due to the spherical-to-rect projection)

figure 8 rising and falling below horizon
figure 8 rising and falling below horizon

5/5 Focusing back on a single lat/long, here we simulate the analemma across the day in DC (here, in 30 minute increments) to see how the shape changes position across the sky/year. Basically, visualizing a 2D projected slice of 4D time/space: that's a fun #dataviz!

#RStats #rayverse