# 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, 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`.
```sh
php -S 127.0.0.1:8080 -t public
```
This environment does not include a system `php` binary, but it does have FrankenPHP:
```sh
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.