Is your city in the path of the total eclipse?


There will be a total solar eclipse on August 21, 2017, and the umbra (total shadow) will pass right across the United States! As a data guy, a map guy, and an astronomy fan, this is an opportunity I just couldn't pass up! Follow along as I apply my computer skills to my astronomy interests, in total geek fashion!

But before we get started, here is a picture from one of my fellow geek friends, David H. He's a smidgen older than me, and was old enough to appreciate the eclipse that passed over NC in 1970. Here's what he said about his picture & the event ... "Observing the lead-up to totality at the Kinston Airport in March of 1970. Several of us from NCSU's WKNC and The Technician had driven down to see it. I had made solar filters out of exposed black and white film and attached them in front of my binoculars! There were thousands of people at the airport from all over the country. Many had flown in in the their airplanes (of ALL sizes) to view it. At the moment of totality, as we all saw the eclipsed sun and it's corona, ALL of of us made a soft collective "Ohhhhhh" sound. I'll never forget that moment!"

And now, let's get ready for the upcoming eclipse! For starters, I wanted to show the path of the eclipse on a map. I did a few Google searches, and soon found that NASA had a webpage where they provided Esri shapefiles of the eclipse path. I downloaded their shapefiles, and used SAS Proc Mapimport to import the upath17.shp file (umbra path for 2017 eclipse) into a SAS dataset. I converted this into an annotate dataset, and plotted it on a US map using SAS Proc GMap.

I thought it would also be interesting to figure out exactly which cities were in the umbra, so I pretended the umbra polygon was a map area, and used SAS Proc Ginside to determine which city centroids (from the sashelp.zipcode dataset) were 'inside' it. I then added those cities to the map.

Once I had a list of all the cities, it was also easy to calculate a list of all the states in the eclipse umbra. I used that list of states as my response data in Proc GMap, and plotted the map again with those states in a slightly brighter color than the other states. Now, for example, it's easier to tell that Iowa and Indiana have no cities in the umbra of the eclipse.

We now have a pretty nice map, but I still can't tell exactly which cities are in the path. I could  add HTML mouse-over text, but the cities are packed in so densely that it would be very difficult to hover your mouse over a specific city. So I decided to add drilldowns to the map! Click the map above to see the interactive version, and then you can click any of the states in the path to see a detailed map of just that state. In the state map, you can hover your mouse over the cities and see their names, and click the cities to see an animation of the eclipse along with clock/time info to let you know exactly when the eclipse will be visible (I didn't create the animation - credit to Berkeley & Google for that part!)

Here's a snapshot of the drilldown map for Tennessee, showing the mouse-over info ...

Are you one of the lucky people living in the path of the eclipse? Or are you perhaps planning to travel to see it? Have you witnessed a solar eclipse in the past? Feel free to share your 'eclipse story' in a comment!



About Author

Robert Allison

The Graph Guy!

Robert has worked at SAS for over 25 years, and is perhaps the foremost expert in creating custom graphs using SAS/GRAPH. His educational background is in Computer Science, and he holds a BS, MS, and PhD from NC State University. He is the author of several conference papers, has won a few graphic competitions, and has written a book (SAS/GRAPH: Beyond the Basics).


  1. Hi Robert,

    Thank you for the information with the hyperlinks that take us to the city to see how the eclipse is expected. Do we know why the trajectory always looks like the eclipse is coming from the west (left) to the southeast (right) in the morning? When, every morning the sun rises in the east (right) and sets in the west (left). Just curious. :)

    Take care,

    • Robert Allison

      I think that although a map usually has west to the left, this eclipse simulation is from the perspective of someone standing on the ground, and looking up at the sun. For people in the northern hemisphere, the sun is a bit to the south of us, and rises in the east (left side of the animation) and sets in the west (right side of the animation). So, basically, instead of looking down at a map, you're looking up at the sun, in the simulation.

  2. Glad to hear you're an astronomy fan, Robert! Though not graphing or map related, I wrote a SAS program using FILENAME URLs to pull the National Weather Service zone forecasts for eclipse Monday for all the counties along the path of totality in Illinois, Missouri, Kansas, Nebraska, and Wyoming. Anyone planning to travel for the eclipse here in the Midwest might find this of interest:

    Clear skies and good luck!


Leave A Reply

Back to Top