composer: Update deps
README: Update links
Update README
(status: alpha/brain-dump)
Simple private API to get current weather information at a lon/lat position from Environment Canada (EC).
Alpine Linux package available here: /chimo/apkbuilds/weather
The list of weather stations[1] published by Environment Canada and their lat/lon locations[2] are imported into the database.
When we pass a lat/lon pair to our API, we use PostGIS to find the closest weather station, and then query the proper EC endpoint to get current weather[2] from that weather station.
[1] https://dd.weather.gc.ca/citypage_weather/xml/siteList.xml
[2] example: https://dd.weather.gc.ca/citypage_weather/xml/BC/s0000671_e.xml
composer install
in the "private" folderIf you want to bootstrap the database with the weather station information, use
pg_restore
with the dump provided in "private/weather.sql.dump"
If you want to import the weather station data yourself:
curl -H "secret: xxx" https://example.org?lat=45.00&lon=-75.00
{
"condition": "Sunny",
"temperature": "16",
"humidity": "12"
}