A live polar sun path chart (plus Moon and some planets)

I happened upon a polar sun path chart a while back and really thought it was a great graphic. It shows where the sun goes each day as a function of the seasons. Behold:

The polar Sun path chart for Seattle, WA

For Seattle, you can see at the top that the sun rises in the SE, peaks at 20° above the horizon, and then sets at 4:30pm on the winter solstice. Ugh. But in the summer, it’s up from before 4am to after 8pm, and peaks above 60° . You can make one of these plots for your area over at the University of Oregon’s Solar Radiation Monitoring Lab.

I liked this plot so much that I wanted to take it to the next level and see where the sun is live. In my experience with Python, I’ve grown to expect there to be sweet libraries that can compute stuff like that. Sure enough, there are a few. First, I found pysolar, which is really straightforward, fast, and simple. A few lines of code and I was up and running.

My first polar solar plot, showing an analemma at different times of day from my location.

The code for this is nearly trivial:

But then as I fiddled with it, I realized I really wanted something that was going to show the Moon as well. And while I was at it, maybe a few more planets. I found the skyfield library, which looked perfect.

Since I want it to be live, I figure the best place to put it is in my self-hosted home automation setup based on Home Assistant (which I’ve written about a lot), right in the weather section. This is basically just local weather information.

So I coded it up as a custom component and added it to my setup. I published it on github and told the Home Assistant community about it. Here’s what it looks like:

Dotted blue line is winter solstice. Green line is summer solstice. This was taken in December so the solid solar path is close to the winter solstice. Planets shown between the moon and sun are Saturn, Venus, and Jupiter. The objects update every 10 seconds in the web browser and tick along from E to W.

As I watched it one day, during the sunset, it looked like some planets were supposed to be out. In the figure above, Jupiter, Saturn, and Venus are closely following the sun into the sunset. The moon was right there to the south but I didn’t see the planets readily. I eventually noticed Venus in the sunset, and then scanned around with my binoculars and, sure enough, I found Jupiter and Saturn too! How about that!

(I realize I could pull up Google Sky Map or similar and do the same thing, but it’s somehow more fun to have a live local version alongside my weather sensors)

A few days later, I’ve gotten used to where the sun rises and sets at this time of year. Out on a jog, I noticed where the sun was. Since I have been paying attention to this plot, it was easy for me to intuit where on the path it is at that time. From this, I was able to immediately orient myself in terms of the cardinal directions. It felt like a revelation.

(I also realize anyone can do this just by thinking about it, but having the polar plot really helped drill it in somehow)

So, this thing is a pretty solid clock, calendar, planet map, and compass! Tons of fun.

For future development, it’d be nice to have an actual web/javascript frontend. Eventually, I’d really like to have this mounted on a wall.

With labels this time

Later on, I added a legend and some constellations:

And just for fun, here’s a great video:

For some more fun info about the Earth’s movements, I do enjoy this video.

3 thoughts on “A live polar sun path chart (plus Moon and some planets)”

  1. hi Nick,
    I found my way here from whatisnuclear. Thanks for all you’ve written!
    I’m curious why you put South at the top of your plot? In Seattle (soon to be my home too) and for most folks in the northern hemisphere I’d think that North on top would be more intuitive… low in the sky would be low on the chart, e.g. at noon, the celestial bodies would arc “up”, etc. You could even prune the northern portion of the chart where the ecliptic never reaches.

    1. Hi Hugh. I started with North on top, since that seemed right to me too. But then I asked myself why the University of Oregon’s Solar Radiation Monitoring Lab put South at the top. As I played around and tried it out, I found that if I put the image on my phone and pointed it South, it lined up perfectly with physical reality and the Sun moved left to right (East to West) along the arc. Now I’m convinced that this is the best way to do this image. If North was on top, I’d be facing north when looking at it and craning my neck to see the Sun behind me. Anyway at least that’s what I’ve convinced myself. Good luck on your move!

Leave a Reply

Your email address will not be published. Required fields are marked *