Methodology

Data sources

SnapCosmos runs entirely in your browser. Everything you see is computed locally or fetched from open, keyless APIs. Full accounting below.

Sun, Moon, planets & twilight

MIT
Provider
astronomy-engine (open source, MIT)
Endpoint
https://github.com/cosinekitty/astronomy
Refresh
Computed live in your browser on every page load
Accuracy
Sub-arcminute for the Sun; better than 30 arcseconds for planets across a millennium
Notes
The same high-precision ephemeris used by professional planetariums. No API dependency — works offline once the page has loaded.

Weather (clouds, humidity, visibility, precipitation)

CC BY 4.0
Provider
Open-Meteo
Endpoint
https://api.open-meteo.com/v1/forecast
Refresh
Every 60 minutes; forecast horizon 7 days
Accuracy
Ensemble output from ECMWF, GFS, ICON and MET Norway models; ~10 km spatial resolution
Notes
Cloud cover shown as a percentage average over the coming night; individual short cloud breaks may still occur.

Location search (city / place names)

CC BY 4.0 (GeoNames)
Provider
Open-Meteo Geocoding
Endpoint
https://geocoding-api.open-meteo.com/v1/search
Refresh
On demand as you type
Accuracy
GeoNames-derived; populated places > 500 inhabitants

Aurora — planetary Kp index

Public domain (US federal government)
Provider
NOAA Space Weather Prediction Center
Endpoint
https://services.swpc.noaa.gov/products/noaa-planetary-k-index.json
Refresh
Every 1 minute (estimated), every 3 hours (definitive)
Accuracy
Global geomagnetic disturbance index (0–9); real-time values are estimates and may be revised

Aurora — solar wind & IMF (Bz, speed, density)

Public domain (US federal government)
Provider
NOAA SWPC / DSCOVR & ACE
Endpoint
https://services.swpc.noaa.gov/products/solar-wind/
Refresh
Every 1 minute
Accuracy
Measured 1.5 million km upstream of Earth at the L1 Lagrange point; ~15–60 min lead time before effects reach Earth

ISS pass predictions

Free public API
Provider
Community satellite pass service
Endpoint
https://api.g7vrd.co.uk/v1/satellite-passes/25544/{lat}/{lon}.json
Refresh
On demand; based on latest NORAD TLEs
Accuracy
Within a few seconds for passes in the coming 10 days; degrades after ISS orbital re-boosts

Meteor showers

See International Meteor Organization
Provider
IMO / AMS reference data, curated locally
Endpoint
Static dataset in the SnapCosmos codebase
Refresh
Reviewed at least once per year
Accuracy
Peak dates within ±1 day; ZHRs are theoretical maxima and depend heavily on radiant altitude and Moon phase

How tonight's score is calculated

The 0–100 score on the home page is a weighted combination of five inputs, each normalised to 0–100 before weighting:

  • Cloud cover (weight 40%) — the single biggest factor. 0% cloud = 100 points.
  • Humidity & visibility (weight 15%) — high humidity softens star images.
  • Moon interference (weight 20%) — a bright, high Moon washes out fainter targets.
  • Astronomical darkness (weight 15%) — how much of the night reaches −18° solar altitude.
  • Visible objects (weight 10%) — whether major planets, the ISS or an active meteor shower are on the menu.

The weights are chosen to match what actually determines a memorable night for a naked-eye observer — not for a professional imager. The exact algorithm lives in the open source at src/lib/score.ts in the SnapCosmos codebase.

Corrections & contact

If you spot a wrong number, a broken endpoint, or a claim that no longer holds, please email snapcosmosplus@gmail.com. Include the page URL and, if possible, your location. Corrections are documented in the site changelog when they involve editorial content.

Frequently asked questions

← Back to tonight