Weather by You!

Announcements => Promote your site! => Topic started by: Andy9164 on November 01, 2017, 11:16:46 AM

Title: New Sections Added
Post 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.

Title: Re: New Sections Added
Post by: Mr.Meteo on November 02, 2017, 11:47:17 AM
Hey! Great additions Andy! :)

Regards,
Jacques
Title: Re: New Sections Added
Post by: Andy9164 on November 03, 2017, 08:11:55 AM
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.
Title: Re: New Sections Added
Post by: Andy9164 on November 03, 2017, 11:49:50 AM
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  :)