Weather by You!
Announcements => Promote your site! => Topic started by: Andy9164 on November 01, 2017, 11:16:46 AM
-
Have been busy adding some new sections to my website.
Forecast - Uses Wunderground API to grab a 4-day forecast and then I have a php script which pulls out the data that I need from the downloaded json file as variables.
http://www.midlifedad.me.uk/weather/forecast.php (http://www.midlifedad.me.uk/weather/forecast.php)
Radar - Again uses Wunderground API and grabs a png image every 15 minutes which saves with a transparent background. I run a script to delete any images that are older then 24 hours and then use Imagemagick on my Raspberry Pi to add a label to each image with the day and time as they are saved and then compile an animated gif from all the png images. I found that the animated wunderground radar image for the UK only gave a short timespan and wasn't very good. This image is then overlayed on to a map which is obtained using Google maps API.
http://www.midlifedad.me.uk/weather/radar.php (http://www.midlifedad.me.uk/weather/radar.php)
Hope you enjoy.
-
Hey! Great additions Andy! :)
Regards,
Jacques
-
Thanks Jacques - See what you started 4 years ago :)
Always some new ideas and always continuing to learn. Not too bad for somebody who knew absolutely nothing about HTML, PHP, JS, API's when he started.
Great fun.
-
I actually just improved the look on the forecast page by putting some borders, backgrounds and spacing around the icons etc at the top. Much more tidy.
See.....always something to do :)