Skip to content

Repository files navigation

Melbourne Cloud Stability Map

Most weather apps tell you "cloudy or sunny." This one answers a better question for filmmakers and photographers:

Where in Melbourne will the light stay steady today?

As clouds drift across the sun, the light flicks between sun and shade. This app scores that intermittency as a Stability Score, paints it as contour bands over Greater Melbourne, and ranks the best / average / worst shoot spots by zone.

Features (MVP)

  • Contour stability map over Greater Melbourne (deck.gl + MapLibre).
  • Time-window slider (1 / 3 / 6 hours) that re-scores everything live.
  • Best / Average / Worst shoot cards + 4-zone summary + color radar.
  • Day / Film mode. Night / Astro mode is stubbed ("coming soon").

How stability is computed

For each grid point over the selected window (src/lib/stability.ts):

  • Mean cloud cover — overall sunniness.
  • Std-dev of cloud cover — how much it varies.
  • Sun/shade transitions — how often it crosses the sun (<30%) / shade (>70%) thresholds, using hysteresis.
variability = 0.6 * norm(stdev) + 0.4 * norm(transitions)
score       = round(100 * (1 - variability))   // 0..100, higher = steadier

Shoot ranking also uses brightness (cloud cover + shortwave radiation).

Architecture: swappable forecast provider

The front end only ever calls our own GET /api/forecast, which returns our own ForecastResponse contract. Today that endpoint wraps Open-Meteo; later it can wrap our own forecasting model with no front-end changes.

The same getForecast() logic runs in two runtimes:

  • Production: functions/api/forecast.ts (Cloudflare Pages Function).
  • Local dev: a Vite middleware (vite.config.ts), so npm run dev works without wrangler.

Getting started

npm install
npm run dev        # http://localhost:5173  (/api/forecast via Vite middleware)

Build

npm run build           # typecheck + build to dist/
npm run pages:dev       # local preview of dist + Pages Functions via wrangler

Deploy

See DEPLOY.md for the full Cloudflare Pages walkthrough (CLI and GitHub-connected). Short version:

npx wrangler login
npm run pages:deploy

Roadmap

  • Our own forecasting model behind the provider seam.
  • Night / astro mode: clear-sky stability + Bortle light-pollution layer.
  • Solar-power vertical (intermittency vs. output).
  • Himawari-8/9 satellite motion overlay and short-term nowcasting.

Data & credits

Forecast data from Open-Meteo. Basemap from CARTO / OpenStreetMap contributors.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages