master
Weather
A PHP, SQLite, HTML5, and JavaScript weather dashboard that uses public weather APIs for forecasts, air quality, radar, historical comparison facts, local caching, and searchable archives.
Features
- Search by city/state or ZIP code.
- Open-Meteo forecast data with current, hourly, daily, and 16-day projections.
- Open-Meteo air quality data with AQI, pollutants, UV, and pollen forecast values.
- RainViewer radar tiles on an interactive Leaflet map.
- Local SQLite API cache with a five minute weather refresh window.
- Hourly and daily archive snapshots with search and JSON detail export.
- Cookie-backed display preferences, map layer toggles, 12/24 hour time format, dark/light theme, and import/export.
- Current-date history facts comparing the projection to the same date last year.
Run
Use any PHP server with SQLite/PDO enabled and point the document root at public.
php -S 127.0.0.1:8080 -t public
This environment does not include a system php binary, but it does have FrankenPHP:
frankenphp php-server --root public --listen 127.0.0.1:8080
The SQLite database is created automatically at data/weather.sqlite.
APIs
- Forecast, geocoding, air quality, and historical comparison data: Open-Meteo.
- Radar tiles: RainViewer.
- Base map: OpenStreetMap tile layer through Leaflet.
Languages
PHP
47.8%
JavaScript
38.1%
CSS
14.1%