The 2024 total solar eclipse that crossed North America on April 8th was the last chance for many of us to see a total solar eclipse for the next 21 years. NASA estimates that 150 million people lived within 200 miles of totality, 5 times as many people as the 2017 eclipse that also crossed the continental US. Many useful web tools and resources existed leading up to the 2024 event to help plan where and when to go to best see the eclipse. All were useful but few in the way I needed - a simple tool just gave you the basic planning information for a US mailing address - a timeline of the eclipse for that location, whether totality could be seen, etc. So I created the tool that I wanted as a Shiny webapp in R.
To create a simple web-based app useful for evaluating locations for eclipse suitability in advance as well as accessing geographically-specific eclipse timielines. While most people will understand the eclipse to be peaking mid-afternoon, that time could range +/- 90 minutes depending on longitude (x-axis).
A secondary goal of this project was to improve my R programming skills, particularly in communicating better interactively using Shiny and Leaflet.
2 web apps came out of this project:
-
April 8, 2024 Total Eclipse Planning Tool: A planning tool for the April 8th, 2024 total solar eclipse that takes almost any US postal address as an input and as an output provides information on whether that location was in the path of totality, how long it would experience totality (if any), the time of the eclipse first and last contact as well as totality (if any), how much of the sun would be eclipsed (< 100% if outside of the path of totality), and finally it would calculate and return the next date that the location would see totality of a total solar eclipse.
-
Find all eclipses for the next 75 years for a location: A planning tool that uses your current location (calculated using your public ip address) that can tell you the date and time of every single lunar and solar eclipse (partial or total) visibile from your current location basically for the rest of your life (75 years from today). This app is computationally heavy and requires a long time to load results after clicking the "Click to Start" button.
- April 8, 2024 Total Eclipse Planning Tool (link to shinyapps.io) | link to code
- Find all eclipses for the next 75 years for a location (link to shinyapps.io) | link to code
- www.eclipsewise.com for information and images of solar and lunar eclipses.
- leaflet: Create Interactive Web Maps with the JavaScript 'Leaflet' Library (link to CRAN) (link to github) (link to project website)
- geoloc: Add geolocation inside your shiny app (link to github)
- swephR: High Precision Swiss Ephemeris (link to CRAN)
- ggmap: spatial visualization with ggplot2 (link to CRAN) (link to D. Kahle and H. Wickham. ggmap: Spatial Visualization with ggplot2. The R Journal, 5(1), 144-161.)
- censusxy: easy access to the U.S. Census Bureau Geocoding Tools (link to github) (link to Census Bureau) (link to "Creating open source composite geocoders: Pitfalls and opportunities" by Prener & Fox)
- shiny: Web Application Framework for R (link to CRAN) (https://shiny.posit.co)
- tigris: Download TIGER/Line shapefiles from the United States Census Bureau (link to CRAN)
- lubridate: Make Dealing with Dates a Little Easier (link to CRAN)
- Photos of 8-21-2017 Total Eclipse I took from Durham, NC @ 92% obscuration through a Questar 3.5" with solar filter using a Nikon D5000 (link to public facebook post)
- https://www.linkedin.com/pulse/building-simple-eclipse-planning-tool-tim-bender-e0hrf
- https://www.space.com/why-99-percent-totality-does-not-exist-need-to-be-on-total-solar-eclipse-path-april-2024
- https://www.si.com/extra-mustard/2013/12/30/the-extra-mustard-trivia-hour-when-a-calendar-defeated-russia-in-the-1908-olympics
- History of the Gregorian Calendar (from the American National Standards Institute blog)
- The American Astronomical Society's "Suppliers of Safe Solar Viewers & Filters" list with purchasing links
- National Solar Observatory interactive eclipse map
- NASA's 2024 Eclipse Website
- NASA's Five Millennium Catalog of Solar Eclipses (pdf download)
- Webpages on the History of Astronomy by Robert Harry van Gent
- Reddit users u/danielsixfive and u/QuackingUp23