The Weather on your Website
Displaying the latest weather conditions on your website adds interest to your page. It's easy to do.
At Rose of the Shires we encourage community groups and others to share news about their events and often, especially for outdoors activities, a weather forecast on your webpage can be really useful for those planning to join you.
We published a blog article in February 2019 about how to find and share local weather data (read now »). We updated it when IBM's Weather Underground service changed what was available. Other developments there and elsewhere lead us now to suggest other easy and attractive options.
We think that the simplest and best free service to use is the one from Meteored, a Spanish company with local web "portals" in many countries, including the one at https://www.yourweather.co.uk. Anyone who understands how to code the simplest web page can add this. See the forecast for Kettering here. Clicking on it links to more detail, right down to forecasts hour by hour.
We also offer our own widget as a downloadable package of php scripts, css, graphics and documentation. It's not difficult and takes only a few minutes to get working, but you will need just a little more technical knowledge to get this one's options set up.
Adding the Meteored Widget to your page.
Visit https://www.yourweather.co.uk/widget/. You will find a wealth of options for the style and content of the Weather Forecast you want on your page. As you make your choices, the example at the top of the page changes to reflect them. When you are happy with the result and have added your email address, click on "Generate Code" at the bottom of the page and copy what you see in the box there to your HTML document.
The whole process really is that simple and can be completed in a few minutes. You can go back as often as you want to try different options and get new code.
The Rose of the Shires Current Weather Widget
See the example graphic on this page.
Sometimes you want to show people what the weather is right now rather than publishing a forecast. Further down you will see a list of possible options and sources which we have not tested and so cannot endorse. However, we have produced our own package which delivers an attractive Current Weather Report for your webpage. It can be installed and working in a few minutes although you may later want to test and tweak the options.
First you need to collect current weather data. We would have liked to use the UK Met Office as our source but as of Summer 2019 their website is, frankly, a mess with broken links and missing content. As far as we can see, although we can get and have used excellent forecast data from Meteored, they don't issue currrent live data for download.
So we turned instead to OpenWeather
You need to register to download OpenWeather's data. Visit https://home.openweathermap.org/users/sign_up and fill in the form and you will receive an API Key by email.
Unpack our scripts into an appropriate directory on your website and open the file "weather-widget-data.php" in your favourite editor. All the instructions you need and the few options you need to set are in that script although you may also want to tweak the styles in "weather-widget.css", which also includes instructions.
Finally just copy one of the the <iframe> tags from "weather-widget-data.php" to your web page, using the graphical or text version of the report. We use an <iframe> so the whole widget is self contained and you do not have to change your page <head> to import the required resources.
We are sure that visitors to your website will be pleased with the results.
Here are some other weather report widgets which might suit your needs:
Some of these will add advertising on your page or in pop up new windows.
Rose of the Shires Widget