Being on annual leave for the annual Eastbourne Airbourne air show, I’ve been using the Met Office app on my iPhone quite a bit to keep track of the weather.
This has to be one of the apps I use most frequently, and the according to a press release from the Met Office from September 2010, the Met Office iPhone app has had over a million downloads and it ranks amongst the top 5 apps in the UK.
The app was written by an agency called Gorillabox.
I thought I’d take a look at how it works.
All the pages seem to take advantage of a web service located at http://metip.g-box.tv/ . Judging from the headers sent from the service, this appears to be written in Perl using the excellent Catalyst framework. They return UTF-8 encoded XML.
Loading
When you load the app, it queries your device’s GPS to get your current latitude and longitude, this location is used throughout the app.
Home
The first page you get to is the home page. This shows the Met Office logo, a space for an advertisement that is currently just pushing the Met Office’s Twitter account, an image of the current weather, and a bar showing your current location’s weather, temperature, wind speed / direction and sunset time.
Behind the scenes a query is sent to http://metip.g-box.tv/home with your lat and long in the query string. Here’s what was sent for my location. As you can see, all elements are returned from the web service.
GET /home?lat=50.7732N&long=0.2887E HTTP/1.1 Host: metip.g-box.tv User-Agent: Gorillabox/2011031601.1.3 CFNetwork/485.13.9 Darwin/11.0.0 Accept: */* Accept-Language: en-us Accept-Encoding: gzip, deflate Connection: keep-alive HTTP/1.1 200 OK Date: Mon, 15 Aug 2011 18:36:02 GMT Server: Apache/2.2.12 (Ubuntu) Content-Length: 456 X-Catalyst: 5.80031 X-PageCache: Catalyst Connection: close Content-Type: application/xml <?xml version="1.0" encoding="UTF-8"?> <xml last_updated="15/08/2011 18:31"> <ad img="http://image.metip.g-box.tv:80/Twitter.png" url="http://twitter.com/metoffice" /> <severe_weather status="false" /> <site Sunset="20:24" display="Eastbourne Station" site_id="138" site_name="Eastbourne"> <view type="home"> <data date="15/08/2011" temp="16" time="21:00" weather_code="7" wind_direction="SW" wind_speed="8" /> </view> </site> </xml>
Weather
The next page is probably the most important one, the weather! This gives you a 5 day forecast of the weather for your location, along with a more detailed 24 hour forecast.
Behind the scenes a query is sent to http://metip.g-box.tv/weather with your lat and long in the query string. Here’s what was sent for my location.
GET /weather?lat=50.7732N&long=0.2887E HTTP/1.1 Host: metip.g-box.tv User-Agent: Gorillabox/2011031601.1.3 CFNetwork/485.13.9 Darwin/11.0.0 Accept: */* Accept-Language: en-us Accept-Encoding: gzip, deflate Connection: keep-alive HTTP/1.1 200 OK Date: Mon, 15 Aug 2011 19:13:07 GMT Server: Apache/2.2.12 (Ubuntu) Content-Length: 3804 X-Catalyst: 5.80031 Connection: close Content-Type: application/xml <?xml version="1.0" encoding="UTF-8"?> <xml last_updated="15/08/2011 18:33"> <site display="Eastbourne Station" site_name="Eastbourne"> <view type="overview"> <data id="1945892" display="Today 15/08/2011" index="0" sunrise="05:47" sunset="20:24" temp="15" type="night_header" weather_code="12" wind_direction="W" wind_speed="5" /> <data id="1950464" display="Tuesday 16/08/2011" index="1" sunrise="05:49" sunset="20:22" temp="19" type="standard" weather_code="7" wind_direction="SW" wind_speed="13" /> <data id="1955036" display="Wednesday 17/08/2011" index="2" sunrise="05:50" sunset="20:20" temp="19" type="standard" weather_code="3" wind_direction="E" wind_speed="7" /> <data id="1959608" display="Thursday 18/08/2011" index="3" sunrise="05:52" sunset="20:18" temp="19" type="standard" weather_code="7" wind_direction="NE" wind_speed="15" /> <data id="1964180" display="Friday 19/08/2011" index="4" sunrise="05:54" sunset="20:16" temp="21" type="standard" weather_code="1" wind_direction="NW" wind_speed="8" /> </view> <view overview_index="0" type="detail"> <data display="15/08/2011 18:00 - 21:00" humidity="69" index="0" temp="17" type="3hr" visibility="GO" weather_code="10" wind_direction="SW" wind_speed="9" /> <data display="15/08/2011 21:00 - 00:00" humidity="79" index="0" temp="16" type="3hr" visibility="VG" weather_code="2" wind_direction="SW" wind_speed="6" /> </view> <view overview_index="1" type="detail"> <data display="16/08/2011 00:00 - 03:00" humidity="86" index="0" temp="15" type="3hr" visibility="GO" weather_code="12" wind_direction="W" wind_speed="5" /> <data display="16/08/2011 03:00 - 06:00" humidity="85" index="0" temp="15" type="3hr" visibility="VG" weather_code="7" wind_direction="SW" wind_speed="9" /> <data display="16/08/2011 06:00 - 09:00" humidity="83" index="0" temp="15" type="3hr" visibility="EX" weather_code="7" wind_direction="SW" wind_speed="8" /> <data display="16/08/2011 09:00 - 12:00" humidity="82" index="0" temp="17" type="3hr" visibility="VG" weather_code="7" wind_direction="SW" wind_speed="10" /> <data display="16/08/2011 12:00 - 15:00" hu midity="75" index="0" temp="18" type="3hr" visibility="VG" weather_code="3" wind_direction="SW" wind_speed="13" /> <data display="16/08/2011 15:00 - 18:00" humidity="73" index="0" temp="18" type="3hr" visibility="VG" weather_code="3" wind_direction="SW" wind_speed="15" /> <data display="16/08/2011 18:00 - 21:00 " humidity="85" index="0" temp="17" type="3hr" visibility="GO" weather_code="8" wind_direction="SW" wind_speed="13" /> <data display="16/08/2011 21:00 - 00:00" humidity="92" index="0" temp="17" type="3hr" visibility="GO" weather_code="2" wind_direction="SW" wind_speed="11" /> </view> <view overview_index="2" type="detail"> <data id="1955036" display="Wednesday 17/08/2011" index="0" temp="19" type="day" weather_code="3" wind_direction="E" wind_speed="7" /> <data id="1955036" display="Night" index="1" temp="16" type="night" weather_code="2" wind_direction="E" wind_speed="15" /> </view> <view overview_index="3" type="detail"> <data id="1959608" display="Thursday 18/08/2011" index="0" temp="19" type="day" weather_code="7" wind_direction="NE" wind_speed="15" /> <data id="1959608" display="Night" index="1" temp="13" type="night" weather_code="2" wind_direction="NW" wind_speed="8" /> </view> <view overview_index="4" type="detail"> <data id="1964180" display="Friday 19/08/2011" index="0" temp="21" type="day" weather_code="1" wind_direction="NW" wind_speed="8" /> <data id="1964180" display="Night" index="1" temp="13" type="night" weather_code="0" wind_direction="W" wind_speed="10" /> </view> </site> </xml>
Maps
The maps section allows you to either see the weather, temperature or wind speed for the whole UK, or to click into a specific part of the country to see regional data. There is also an icon on the top right of the page that gives you a written weather forecast.
This is probably the most complex part of the app, and a lot of data is returned from the query made to http://metip.g-box.tv/map. Here’s a cut back version of the data returned when tested.
GET /map HTTP/1.1 Host: metip.g-box.tv User-Agent: Gorillabox/2011031601.1.3 CFNetwork/485.13.9 Darwin/11.0.0 Accept: */* Accept-Language: en-us Accept-Encoding: gzip, deflate Connection: keep-alive HTTP/1.1 200 OK Date: Mon, 15 Aug 2011 18:49:57 GMT Server: Apache/2.2.12 (Ubuntu) Content-Length: 34217 X-Catalyst: 5.80031 Connection: close Content-Type: application/xml <?xml version="1.0" encoding="UTF-8"?> <xml last_updated="15/08/2011 18:45"> <forecast_text> <item display="Headline:" index="0">Outbreaks of rain spreading north, heaviest towards the west.</item> <item display="This Evening and Tonight:" index="1">Outbreaks of rain spreading north, with the far northeast of Scotland remaining dry. Heaviest bursts are expected across northwestern areas with extensive hill fog developing later. Very little rain reaching southeastern parts. Brisk winds across the southwest.</item> <item display="Tuesday:" index="2">Cloudy with occasionally rain, heavy at times over northern UK. Generally drier towards the southeast, but a chance of sharp showers during the afternoon. Brisk winds.</item> <item display="Outlook for Wednesday to Friday:" index="3">Rain or showers across northwestern and southern parts of the UK, possibly thundery at times across the far south. The best of the drier and brighter weather across central parts.</item> </forecast_text> <region region_name="SW Scotland, Lothian"> <site site_name="Galashiels" xpos="159" ypos="108"> <view type="map"> <data display="Monday 21:00" index="0" temperature="12" weather_code="2" wind_direction="SW" wind_speed="8" /> <data display="Tuesday 00:00" index="1" temperature="12" weather_code="7" wind_direction="S" wind_speed="6" /> <data display="Tuesday 03:00" index="2" temperature="11" weather_code="15" wind_direction="SE" wind_speed="6" /> <data display="Tuesday 06:00" index="3" temperature="11" weather_code="15" wind_direction="SE" wind_speed="8" /> <data display="Tuesday 09:00" index="4" temperature="12" weather_code="7" wind_direction="SE" wind_speed="8" /> <data display="Tuesday 12:00" index="5" temperature="14" weather_code="8" wind_direction="SE" wind_speed="7" /> <data display="Tuesday 15:00" index="6" temperature="16" weather_code="7" wind_direction="SW" wind_speed="9" /> <data display="Tuesday 18:00" index="7" temperature="14" weather_code="3" wind_direction="W" wind_speed="14" /> <data display="Tuesday 21:00" index="8" temperature="12" weather_code="2" wind_direc tion="W" wind_speed="14" /> <data display="Wednesday 00:00" index="9" temperature="12" weather_code="2" wind_direction="W" wind_speed="14" /> <data display="Wednesday" index="10" temperature="17" weather_code="3" wind_direction="NW" wind_speed="8" /> <data display="Wednesday Night" index="11" temper ature="10" weather_code="2" wind_direction="N" wind_speed="4" /> <data display="Thursday" index="12" temperature="15" weather_code="14" wind_direction="SE" wind_speed="5" /> <data display="Thursday Night" index="13" temperature="9" weather_code="2" wind_direction="W" wind_speed="7" /> <data display="Friday" index="14" temperature="16" weather_code="3" wind_direction="W" wind_speed="10" /> <data display="Friday Night" index="15" temperature="11" weather_code="9" wind_direction="SW" wind_speed="10" /> </view> </site> </region> <region region_name="East England"> <site site_name="Norwich" xpos="249" ypos="214"> <view type="map"> <data display="Monday 21:00" index="0" temperature="18" weather_code="2" wind_direction="SW" wind_speed="5" /> <data display="Tuesday 00:00" index="1" temperature="17" weather_code="12" wind_direction="SW" wind_speed="6" /> <data display="Tuesday 03:00" index="2" temperature="15" weather_code="12" wind_direction="SW" wind_speed="4" /> <data display="Tuesday 06:00" index="3" temperature="14" weather_code="7" wind_direction="SW" wind_speed="6" /> <data display="Tuesday 09:00" index="4" temperature="16" weather_code="7" wind_direction="SW" wind_speed="11" /> <data display="Tuesday 12:00" index="5" temperat ure="18" weather_code="7" wind_direction="SW" wind_speed="13" /> <data display="Tuesday 15:00" index="6" temperature="19" weather_code="7" wind_direction="SW" wind_speed="13" /> <data display="Tuesday 18:00" index="7" temperature="20" weather_code="3" wind_direction="SW" wind_speed="12" /> <data display="Tuesday 21:00" index="8" temperature="18" weather_code="2" wind_direction="SW" wind_speed="9" /> <data display="Wednesday 00:00" index="9" temperature="16" weather_code="2" wind_direction="NW" wind_speed="9" /> <data display="Wednesday" index="10" temperature="20" weather_code="3" wind_direction="NW" wind_speed="8" /> <data display="Wednesday Night" index="11" temperature="13" weather_code="7" wind_direction="NE" wind_speed="5" /> <data display="Thursday" index="12" temperature="17" weather_code="10" wind_direction="NE" wind_speed="9" /> <data display="Thursday Night" index="13" temperature="13" weather_code="7" wind_direction="NW" wind_speed="8" /> <data display="Friday" index="14" temperature="19" weather_code="1" wind_direction="NW" wind_speed="12" /> <data display="Friday Night" index="15" temperature="12" weather_code="0" wind_direction="S" wind_speed="9" /> </view> </site> </region> <region region_name="East Midlands"> <site site_name="Boston" xpos="216" ypos="189"> <view type="map"> <data display="Monday 21:00" index="0" temperature="18" weather_code="2" wind_direction="SW" wind_speed="5" /> <data display="Tuesday 00:00" index="1" temperature="16" weather_code="9" wind_direction="SW" wind_speed="6" /> <data display="Tuesday 03:00" index="2" temperature="14" weather_code="12" wind_direction="S" wind_speed="7" /> <data display="Tuesday 06:00" index="3" temperature="14" weather_code="15" wind_direction="S" wind_speed="10" /> <data display="Tuesday 09:00" index="4" temperature="15" weather_code="12" wind_direction="S" wind_speed="12" /> <data display="Tuesday 12:00" index="5" temperature="18" weather_code="7" wind_direction="SW" wind_speed="15" /> <data display="Tuesday 15:00" index="6" temperature="21" weather_code="3" wind_direction="SW" wind_speed="17" /> <data display="Tuesday 18:00" index="7" temperature="20" weather_code="1" wind_direction="W" wind_speed="1 3" /> <data display="Tuesday 21:00" index="8" temperature="16" weather_code="2" wind_direction="W" wind_speed="10" /> <data display="Wednesday 00:00" index="9" temperature="14" weather_code="0" wind_direction="W" wind_speed="9" /> <data display="Wednesday" index="10" temperature="20" weather_code="3" wind_direction="NW" wind_speed="6" /> <data display="Wednesday Night" index="11" temperature="14" weather_code="12" wind_direction="E" wind_speed="6" /> <data display="Thursday" index="12" temperature="18" weather_code="12" wind_direction="NE" wind_speed="7" /> <data display="Thursday Night" index="13" temperature="11" weather_code="12" wind_direction="NW" wind_speed="7" /> <data display="Friday" index="14" temperature="20" weather_code="3" wind_direction="NW" wind_speed="11" /> <data display="Friday Night" index="15" temperature="12" weather_code="2" wind_direction="S" wind_speed="7" /> </view> </site> </region> <region region_name="Grampian"> <site site_name="Fraserburgh" xpos="180" ypos="35"> <view type="map"> <data display="Monday 21:00" index="0" temperature="14" weather_code="2" wind_direction="W" wind_speed="2" /> <data display="Tuesday 00:00" index="1" temperature="13" weather_code="7" wind_direction="S" wind_speed="3" / > <data display="Tuesday 03:00" index="2" temperature="12" weather_code="7" wind_direction="S" wind_speed="4" /> <data display="Tuesday 06:00" index="3" temperature="12" weather_code="3" wind_direction="SE" wind_speed="7" /> <data display="Tuesday 09:00" index="4" temperature="14" weather_code="7" wind_direction="SE" wind_speed="10" /> <data display="Tuesday 12:00" index="5" temperature="14" weather_code="7" wind_direction="SE" wind_speed="13" /> <data display="Tuesday 15:00" index="6" temperature="14" weather_code="12" wind_direction="SE" wind_speed="14" /> <data display="Tuesday 18:00" index="7" temperature="13" weather_code="12" wind_direction="E" wind_speed="11" /> <data display="Tuesday 21:00" index="8" temperature="13" weather_code="11" wind_direction="E" wind_speed="10" /> <data display="Wednesday 00:00" index="9" temperature="13" weather_code="12" wind_direction="E" wind_speed="9" /> <data display="Wednesday" index="10" temperature="14" weather_code="12" wind_direction="NW" wind_speed="14" /> <data display="Wednesday Night" index="11" temperature="11" weather_code="2" wind_direction="NW" wind_speed="4" /> <data display="Thursday" index="12" temperature="14" weather_code="7" wind_direction="E" wind_speed="4" /> <data display="Thursday Night" index="13" temperature="12" weather_code="9" wind_direction="N" wind_speed="6" /> <data display="Friday" index="14" temperature="14" weather_code="10" wind_direction="NW" wind_speed="10" /> <data display="Friday Night" index="15" temperature="12" weather_code="7" wind_direction="SE" wind_sp eed="13" /> </view> </site> </region> <region region_name="Highlands & Eilean S"> <site site_name="Fort William" xpos="110" ypos="39"> <view type="map"> <data display="Monday 21:00" index="0" temperature="13" weather_code="2" wind_direction="SE" wind_speed="3" /> <data display="Tuesday 00:00" index="1" temperature="12" weather_code="2" wind_direction="NE" wind_speed="3" /> <data display="Tuesday 03:00" index="2" temperature="12" weather_code="12" wind_direction="NE" wind_speed="4" /> <data display="Tuesday 06:00" index="3" temperature="12" weather_code="15" wind_direction="N" wind_speed="5" /> <data display="Tuesday 09:00" index="4" temperature="13" weather_code="15" wind_direction="NE" wind_speed="5" /> <data display="Tuesday 12:00" index="5" temperature="13" weather_code="15" wind_direction="N" wind_speed="3" /> <data display="Tuesday 15:00" index="6" temperature="13" weather_code="15" wind_direction="W" wind_speed="4" /> <data display="Tuesday 18:00" index="7" temperature="13" weather_code="15" wind_direction="W" wind_speed="12" /> <data display="Tuesday 21:00" index="8" temperature="12" weather_code="7" wind_direction="SW" wind_speed="9" /> <data display="Wednesday 00:00" index="9" temperature="12" weather_code="7" wind_direction="SW" wind_speed="8" /> <data display="Wednesday" index="10" temperature="16" weather_code="3" wind_direction="NW" wind_speed="9" /> <data display="Wednesday Night" index="11" temperature="10" weather_code="2" wind_direction="N" wind_speed="2" /> <data display="Thursday" index="12" temperature="14" weather_code="10" wind_direction="N" wind_speed="7" /> <data display="Thursday Night" index="13" temperature="10" weather_code="2" wind_direction="NW" wind_speed="5" /> <data display="Friday" index="14" temperature="16" weather_code="12" wind_direction="SW" wind_speed="9" /> <data display="Friday Night" index="15" temperature="13" weather_code="13" wind_direction="S" wind_speed="16" /> </view> </site> </region> <region region_name="North East England"> <site site_name="Newcastle International" xpos="197" ypos="119"> <view type="map"> <data display="Monday 21:00" index="0" temperature="15" weather_code="0" wind_direction="SW" wind_speed="5" /> <data display="Tuesday 00:00" index="1" temperature="14" weather_code="7" wind_direction="S" wind_speed="6" /> <data display="Tuesday 03:00" index="2" temperature="12" weather_code="12" wind_direction="S" wind_speed="6" /> <data display="Tuesday 06:00" index="3" temperature="12" weather_code="12" wind_direction="SE" wind_speed="7" /> <data display="Tuesday 09:00" index="4" temperature="13" weather_code="15" wind_direction="S" wind_speed="9" /> <data display="Tuesday 12:00" index="5" temperature="15" weather_code="7" wind_direction="S" wind_speed="9" /> <data display="Tuesday 15:00" index="6" temperature="19" weather_code="3" wind_direction="SW" wind_speed="10" /> <data display="Tuesday 18:00" index="7" temperature="16" weather_code="1" wind_direction="W" wind_speed="14" /> <data display="Tuesday 21:00" index="8" temperature="13" weather_code="0" wind_direction="W" wind_speed="13" /> <data display="Wednesday 00:00" index="9" temperature="12" weather_code="0" wind_direction="W" wind_speed="13" /> <data display="Wednesday" index="10" temperature="16" weather_code="7" wind_direction="N" wind_speed="8" /> <data display="Wednesday Night" index="11" temperature="11" weather_code="7" wind_direction="NW" wind_speed="3" /> <data display="Thursday" index="12" temperature="15" weather_code="10" wind_direction="SE" wind_speed="5" /> <data display="Thursday Night" index="13" temperature="9" weather_code="0" wind_direction="W" wind_speed="8" /> <data display="Friday" index="14" temperature="18" weather_code="1" wind_direction="NW" wind_speed="10" /> <data display="Friday Night" index="15" temperature="12" weather_code="7" wind_direction="SW" wind_speed="8" /> </view> </site> </region> <region region_name="Northern Ireland"> <site site_name="Belfast" xpos="89" ypos="134"> <view type="map"> <data display="Monday 21:00" index="0" temperature="14" weather_code="15" wind_direction="SE" wind_speed="5" /> <data display="Tuesday 00:00" index="1" temperature="14" weather_code="9" wind_direction="S" wind_speed="8" /> <data display="Tuesday 03:00" index="2" temperature="14" weather_code="7" wind_direction="S" wind_speed="6" /> <data display="Tuesday 06:00" index="3" temperature="14" weather_code="11" wind_direction="S" wind_speed="5" /> <data display="Tuesday 09:00" index="4" temperature="15" weather_code="11" wind_direction="SW" wind_speed="10" /> <data display="Tuesday 12:00" index="5" temperature="16" weather_code="3" wind_direction="W" wind_speed="16" /> <data display="Tuesday 15:00" index="6" temperature="17" weather_code="1" wind_direction="NW" wind_speed="16" /> <data display="Tuesday 18:00" index="7" temperature="15" weather_code="1" wind_direction="NW" wind_speed="14" /> <data display="Tuesday 21:00" index="8" temperature="13" weather_code="0" wind_direction="NW" wind_speed="9" /> <data display="Wednesday 00:00" index="9" temperature="11" weather_code="2" wind_direction="W" wind_speed="6" /> <data display="Wednesday" index="10" temperature="17" weather_code="10" wind_direction="NW" wind_speed="5" /> <data display="Wednesday Night" index="11" temperature="11" weather_code="7" wind_direction="N" wind_speed="2" /> <data display="Thursday" index="12" temperature="15" weather_code="10" wind_direction="NW" wind_speed="4" /> <data display="Thursday Night" index="13" temperature="9" weather_code="0" wind_direction="W" wind_speed="5" /> <data display="Friday" index="14" temperature="19" weather_code="10" wind_direction="SW" wind_speed="9" /> <data display="Friday Night" index="15" temperature="13" weather_code="13" wind_direction="S" wind_speed="16" /> </view> </site> </region> <region region_name="North West England"> <site site_name="Blackpool" xpos="161" ypos="157"> <view type="map" > <data display="Monday 21:00" index="0" temperature="15" weather_code="9" wind_direction="SW" wind_speed="11" /> <data display="Tuesday 00:00" index="1" temperature="14" weather_code="15" wind_direction="S" wind_speed="11" /> <data display="Tuesday 03:00" index="2" temperature="14" weather_code="15" wind_direction="SE" wind_speed="13" /> <data display="Tuesday 06:00" index="3" temperature="13" weather_code="15" wind_direction="SE" wind_speed="18" /> <data display="Tuesday 09:00" index="4" temperature="15" weather_code="15" wind_direction="S" wind_speed="16" /> <data display="Tuesday 12:00" index="5" temperature="16" weather_code="11" wind_direction="SW" wind_speed="20" /> <data display="Tuesday 15:00" index="6" temperature="16" weather_code="3" wind_direction="W" wind_speed="21" /> <data display="Tuesday 18:00" index="7" temperature="16" weather_code="7" wind_direction="NW" wind_speed="17" /> <data display="Tuesday 21:00" index="8" temperature="15" weather_code="2" wind_direction="NW" wind_speed="18" /> <data display="Wednesday 00:00" index="9" temperature="14" weather_code="2" wind_direction="NW" wind_speed="17" /> <data display="Wednesday" index="10" temperature="16" weather_code="7" wind_direction="NW" wind_speed="11" /> <data display="Wednesday Night" index="11" temperature="12" weather_code="7" wind_direction="N" wind_speed="4" /> <data display="Thursday" index="12" temperature="16" weather_code="3" wind_direction="NW" wind_speed="8" /> <data display="Thursday Night" index="13" temperature="13" weather_code="0" wind_direction="NW" wind_speed="12" /> <data display="Friday" index="14" temperature="16" weather_code="1" wind_direction="W" wind_speed="11" /> <data display="Friday Night" index="15" temperature="13" weather_code="12" wind_direction="SW" wind_speed="14" /> </view> </site> </region> <region region_name="Orkney & Shetland"> <site site_name="Lerwick" xpos="247" ypos="25"> <view type="map"> <data display="Monday 21:00" index="0" temperature="12" weather_code="2" wind_direction="SW" wind_speed="9" /> <data display="Tuesday 00:00" index="1" temperature="11" weather_code="2" wind_direction="SW" wind_speed="9" /> <data display="Tuesday 03:00" index="2" temperature="11" weather_code="7" wind_direction="SW" wind_speed="8" /> <data display="Tuesday 06:00" index="3" temperature="11" weather_code="7" wind_direction="S" wind_speed="4" /> <data display="Tuesday 09:00" index="4" temperature="13" weather_code="3" wind_direction="SE" wind_speed="9" /> <data display="Tuesday 12:00" index="5" temperature="14" weather_code="3" wind_direction="SE" wind_speed="11" /> <data display="Tuesday 15:00" index="6" temperature="14" weather_code="3" wind_direction="SE" wind_speed="10" /> <data display="Tuesday 18:00" index="7" temperature="13" weather_code="3" wind_direction="E" wind_speed="9" /> <data display="Tuesday 21:00" index="8" temperature="12" weather_code="2" wind_direction="E" wind_speed="7" /> <data display="Wednesday 00:00" index="9" temperature="12" weather_code="2" wind_direction="E" wind_speed="6" /> <data display="Wednesday" index="10" temperature="15" weather_code="10" wind_direction="NE" wind_speed="8" /> <data display="Wednesday Night" index="11" temperature="10" weather_code="2" wind_direction="W" wind_speed="3" /> <data display="Thursday" index="12" temperature="13" weather_code="10" wind_direction="NW" wind_speed="7" /> <data display="Thursday Night" index="13" temperature="9" weather_code="7" wind_direction="N" wind_speed="6" /> <data display="Friday" index="14" temperature="14" weather_code="3" wind_direction="NW" wind_speed="13" /> <data display="Friday Night" index="15" temperature="7" weather_code="2" wind_direction="SE" wind_speed="9" /> </view> </site> </region> <region region_name="South East England"> <site site_name="London" xpos="219" ypos="250"> <view type="map"> <data display="Monday 21:00" index="0" temperature="18" weather_code="12" wind_direction="W" wind_speed="10" /> <data display="Tuesday 00:00" index="1" temperature="16" weather_code="7" wind_di rection="SW" wind_speed="7" /> <data display="Tuesday 03:00" index="2" temperature="15" weather_code="2" wind_direction="SW" wind_speed="7" /> <data display="Tuesday 06:00" index="3" temperature="15" weather_code="7" wind_direction="SW" wind_speed="7" /> <data display="Tuesday 09:00" index="4" temperature="16" weather_code="8" wind_direction="SW" wind_speed="9" /> <data display="Tuesday 12:00" index="5" temperature="18" weather_code="8" wind_direction="SW" wind_speed="10" /> <data display="Tuesday 15:00" index="6" temperature="19" weather_code="8" wind_direction="SW" wind_speed="11" /> <data display="Tuesday 18:00" index="7" temperature="19" weather_code="7" wind_direction="SW" wind_speed="10" /> <data display="Tuesday 21:00" index="8" temperature="18" weather_code="2" wind_direction="SW" wind_speed="6" /> <data display="Wednesday 00:00" index="9" temperature="16" weather_code="2" wind_direction="W" wind_speed="5" /> <data display="Wednesday" index="10" temperature="22" weather_code="3" wind_direction="NE" wind_speed="3" /> <data display="Wednesday Night" index="11" temperature="14" weather_code="7" wind_direction="E" wind_speed="6" /> <data display="Thursday" index="12" temperature="17" weather_code="14" wind_direction="NE" wind_speed="7" /> <data display="Thursday Night" index="13" temperature="12" weather_code="9" wind_direction="NW" wind_speed="5" /> <data display="Friday" index="14" temperature="21" weather_code="1" wind_direction="NW" wind_speed="8" /> <data display="Friday Night" index="15" temperature="13" weather_code="0" wind_direction="SW" wind_speed="5" /> </view> </site> </region> <region region_name="Strathclyde"> <site site_name="Glasgow International" xpos="116" ypos="99"> <view type="map"> <data display="Monday 21:00" index="0" temperature="14" weather_code="2" wind_direction="E" wind_speed="3" /> <data display="Tuesday 00:00" index="1" temperature="14" weather_code="7" wind_direction="SE" wind_speed="4" /> <data display="Tuesday 03:00" index="2" temperature="13" weather_code="15" wind_direction="E" wind_speed="5" /> <data display="Tuesday 06:00" index="3" temperature="12" weather_code="15" wind_direction="E" wind_speed="7" /> <data display="Tuesday 09:00" index="4" temperature="13" weather_code="15" wind_direction="E" wind_speed="7" /> <data display="Tuesday 12:00" index="5" temperature="14" weather_code="15" wind_direction="E" wind_speed="5" /> <data display="Tuesday 15:00" index="6" temperature="15" weather_code="10" wind_direction="W" wind_speed="11" /> <data display="Tuesday 18:00" index="7" temperature="14" weather_code="8" wind_direction="W" wind_speed="13" /> <data display="Tuesday 21:00" index="8" temperature="13" weather_code="2" wind_direction="W" wind_speed="12" /> <data display="Wednesday 00:00" index="9" temperature="12" weather_code="0" wind_direction="W" wind_speed="11" /> <data display="Wednesday" index="10" temperature="18" weather_code="3" wind_direction="NW" wind_speed="7" /> <data display="Wednesday Night" index="11" temperature="10" weather_code="2" wind_direction="NW" wind_speed="3" /> <data display="Thursday" index="12" temperature="16" weather_code="3" wind_direction="W" wind_speed="7" /> <data display="Thursday Night" index="13" temperature="9" weather_code="2" wind_direction="W" wind_speed="6" /> <data display="Friday" index="14" temperature="17" weather_code="3" wind_direction="W" wind_speed="10" /> <data display="Friday Night" index="15" temperature="12" weather_code="9" wind_direction="S" wind_speed="10" /> </view> </site> </region> <region region_name="South West England"> <site site_name="Exeter" xpos="157" ypos="266"> <view type="map"> <data display="Monday 21:00" index="0" temperature="15" weather_code="7" wind_direction="S" wind_speed="5" /> <data display="Tuesday 00:00" index="1" temperature="14" weather_code="7" wind_direction="S" wind_speed="8" /> <data display="Tuesday 03:00" index="2" temperature="14" weather_code="8" wind_direction="S" wind_speed="8" /> <data display="Tuesday 06:00" index="3" temperature="15" weather_code="7" wind_direction="SW" wind_speed="9" /> <data display="Tuesday 09:00" index="4" temperature="17" weather_code="7" wind_direction="SW" wind_speed="10" /> <data display="Tuesday 12:00" index="5" temperature="20" weather_code="3" wind_direction="SW" wind_speed="10" /> <data display="Tuesday 15:00" index="6" temperature="21" weather_code="7" wind_direction="W" wind_speed="11" /> <data display="Tuesday 18:00" index="7" temperature="19" weather_code="1" wind_direction="NW" wind_speed="10" /> <data display="Tuesday 21:00" index="8" temperature="15" weather_code="0" wind_direction="NW" wind_speed="6" /> <data display="Wednesday 00:00" index="9" temperature="14" weather_code="2" wind_direction="NW" wind_speed="5" /> <data display="Wednesday" index="10" temperature="18" weather_code="7" wind_direction="E" wind_speed="8" /> <data display="Wednesday Night" index="11" temperature="13" weather_code="9" wind_direction="NE" wind_speed="9" /> <data display="Thursday" index="12" temperature="18" weather_code="3" wind_direction="NE" wind_speed="10" /> <data display="Thursday Night" index="13" temperature="11" weather_code="2" wind_direction="NW" wind_speed="8" /> <data display="Friday" index="14" temperature="21" weather_code="1" wind_direction="W" wind_speed="4" /> <data display="Friday Night" index="15" temperature="12" weather_code="0" wind_direction="SW" wind_speed="6" /> </view> </site> </region> <region region_name="Central, Tayside & F"> <site site_name="Perth" xpos="154" ypos="70"> <view type="map"> <data display="Monday 21:00" index="0" temperature="14" weather_code="2" wind_direction="SW" wind_speed="7" /> <data display="Tuesday 00:00" index="1" temperature="12" weather_code="7" wind_direction="E" wind_speed="2" /> <data display="Tuesday 03:00" index="2" temperature="12" weather_code="7" wind_direction="E" wind_speed="4" /> <data display="Tuesday 06:00" index=" 3" temperature="12" weather_code="7" wind_direction="E" wind_speed="6" /> <data display="Tuesday 09:00" index="4" temperature="13" weather_code="7" wind_direction="E" wind_speed="8" /> <data display="Tuesday 12:00" index="5" temperature="14" weather_code="15" wind_direction="E" wind_speed="7" /> <data display="Tuesday 15:00" index="6" temperature="14" weather_code="12" wind_direction="NE" wind_speed="4" /> <data display="Tuesday 18:00" index="7" temperature="14" weather_code="7" wind_direction="W" wind_speed="7" /> <data display="Tuesday 21:00" index="8" temperature="13" weather_code="2" wind_direction="W" wind_speed="9" /> <data display="Wednesday 00:00" index="9" temperature="12" weather_code="2" wind_direction="W" wind_speed="8" /> <data display="Wednesday" index="10" temperature="18" weather_code="3" wind_direction="NW" wind_speed="5" /> <data display="Wednesday Night" index="11" temperature="11" weather_code="2" wind_direction="E" wind_speed="4" /> <data display="Thursday" index="12" temperature="14" weather_code="14" wind_direction="SE" wind_speed="7" /> <data display="Thursday Night" index="13" temperature="10" weather_code="2" wind_direction="W" wind_speed="4" /> <data display="Friday" index="14" temperature="17" weather_code="3" wind_direction="W" wind_speed="8" /> <data display="Friday Night" index="15" temperature="12" weather_code="9" wind_direction="S" wind_speed="8" /> </view> </site> </region> <region region_name="Wales"> <site site_name="Carmarthen" xpos="137" ypos="217"> <view type="map"> <data display="Monday 21:00" index="0" temperature="14" weather_code="13" wind_direction="SW" wind_speed="10" /> <data display="Tuesday 00:00" index="1" temperature="15" weather_code="12" wind_direction="S" wind_speed="13" /> <data display="Tuesday 03:00" index="2" temperature="15" weather_code="15" wind_direction="S" wind_speed="16" /> <data display="Tuesday 06:00" index="3" temperature="16" weather_code="12" wind_direction="SW" wind_speed="13" /> <data display="Tuesday 09:00" index="4" temperature="16" weather_code="7" wind_direction="SW" wind_speed="10" /> <data display="Tuesday 12:00" index="5" temperature="17" weather_code="8" wind_direction="SW" wind_speed="13" /> <data display="Tuesday 15:00" index="6" temperature="18" weather_code="7" wind_direction="NW" wind_speed="11" /> <data display="Tuesday 18:00" index="7" temperature="17" weather_code="3" wind_direction="N" wind_speed="8" /> <data display="Tuesday 21:00" index="8" temperature="14" weather_code="2" wind_direction="W" wind_speed="5" /> <data display="Wednesday 00:00" index="9" temperature="12" weather_code="0" wind_direction="NE" wind_speed="3" /> <data display="Wednesday" index="10" temperature="17" weather_code="7" wind_direction="NE" wind_speed="4" /> <data display="Wednesday Night" inde x="11" temperature="12" weather_code="7" wind_direction="NE" wind_speed="5" /> <data display="Thursday" index="12" temperature="17" weather_code="10" wind_direction="N" wind_speed="6" /> <data display="Thursday Night" index="13" temperature="9" weather_code="0" wind_direction="NW" wind_speed="6" /> <data display="Friday" index="14" temperature="18" weather_code="1" wind_direction="SW" wind_speed="8" /> <data display="Friday Night" index="15" temperature="15" weather_code="2" wind_direction="SW" wind_speed="14" /> </view> </site> </region> <region region_name="West Midlands"> <site site_name="Birmingham" xpos="182" ypos="210"> <view type="map"> <data display="Monday 21:00" index="0" temperature="15" weather_code="9" wind_direction="SW" wind_speed="7" /> <data display="Tuesday 00:00" index="1" temperature="14" weather_code="9" wind_direction="S" wind_speed="7" /> <data display="Tuesday 03:00" index="2" temperature="13" weather_code="7" wind_direction="SW" wind_speed="8" /> <data display="Tuesday 06:00" index="3" temperature="13" weather_code="7" wind_direction="S" wind_speed="10" /> <data display="Tuesday 09:00" index="4" temperature="15" weather_code="7" wind_direction="SW" wind_speed="12" /> <data display="Tuesday 12:00" ind ex="5" temperature="19" weather_code="3" wind_direction="SW" wind_speed="14" /> <data display="Tuesday 15:00" index="6" temperature="20" weather_code="3" wind_direction="SW" wind_speed="14" /> <data display="Tuesday 18:00" index="7" temperature="19" weather_code="3" wind_direction="W" wind_speed="12" /> <data display="Tuesday 21:00" index="8" temperature="16" weather_code="2" wind_direction="NW" wind_speed="9" /> <data display="Wednesday 00:00" index="9" temperature="13" weather_code="0" wind_direction="NW" wind_speed="6" /> <data display="Wednesday" index="10" temperature="18" weather_code="7" wind_direction="N" wind_speed="6" /> <data display="Wednesday Night" index="11" temperature="12" weather_code="12" wind_direction="N" wind_speed="6" /> <data display="Thursday" index="12" temperature="17" weather_code="12" wind_direction="N" wind_speed="4" /> <data display="Thursday Night" index="13" temperature="10" weather_code="2" wind_direction="NW" wind_speed="7" /> <data display="Friday" index="14" temperature="20" weather_code="1" wind_direction="W" wind_speed="8" /> <data display="Friday Night" index="15" temperature="13" weather_code="2" wind_direction="SW" wind_speed="6" /> </view> </site> </region> <region region_name="Yorkshire & Humber"> <site site_name="York" xpos="209" ypos="154"> <view type="map"> <data display="Monday 21:00" index="0" temperature="15" weather_code="2" wind_direction="NW" wind_speed="3" /> <data display="Tuesday 00:00" index="1" temperature="14" weather_code="12" wind_direction="SE" wind_speed="3" /> <data display="Tuesday 03:00" index="2" temperature="13" weather_code="15" wind_direction="SE" wind_speed="5" /> <data display="Tuesday 06:00" index="3" temperature="14" weather_code="14" wind_direction="S" wind_speed="8" /> <data display="Tuesday 09:00" index="4" temperature="14" weather_code="12" wind_direction="S" wind_speed="12" /> <data display="Tuesday 12:00" index="5" temperature="16" weather_code="11" wind_direction="S" wind_speed="12" /> <data display="Tuesday 15:00" index="6" temperature="19" weather_code="3" wind_direction="SW" wind_speed="13" /> <data display="Tuesday 18:00" index="7" temperature="17" weather_code="1" wind_direction="W" wind_speed="15" /> <data display="Tuesday 21:00" index="8" temperature="14" weather_code="0" wind_direction="W" wind_speed="12" /> <data display="Wednesday 00:00" index="9" temperature="12" weather_code="0" wind_direction="W" wind_speed="10" /> <data display="Wednesday" index="10" temperature= "19" weather_code="3" wind_direction="NW" wind_speed="7" /> <data display="Wednesday Night" index="11" temperature="13" weather_code="7" wind_direction="NW" wind_speed="4" /> <data display="Thursday" index="12" temperature="17" weather_code="12" wind_direction="S" wind_speed="4" /> <data display="Thursday Night" index="13" temperature="10" weather_code="9" wind_direction="W" wind_speed="6" /> <data display="Friday" index="14" temperature="19" weather_code="1" wind_direction="W" wind_speed="11" /> <data display="Friday Night" index="15" temperature="13" weather_code="7" wind_direction="SW" wind_speed="5" /> </view> </site> </region> </xml>
Data
The data page shows either a radar image or a satellite image and shows the last 2 hours worth of data in 4 half hour images. The images can be animated to be shown as an animation when the play icon is pressed, or you can swipe left or right to alternate between the radar and satellite views.
Behind the scenes a query is sent to http://metip.g-box.tv/data. There is no query string as this is for the whole of the country not just a specific area.
The returned XML shows the images are all date and time stamped, so there is a possibility of a lot of historical weather images being stored in an machine accessible way. Indeed, by changing the value of the month in the image filename, it would appear that at least 6 months worth of images have been stored. The format appears to be either UKRadarYYYYMMDDHHmm.jpg for radar images, or EuropeSatYYYYMMDDHHmm.jpg for satellite images. For example, http://image.metip.g-box.tv:80/UKRadar201108151600.jpg
GET /data HTTP/1.1 Host: metip.g-box.tv User-Agent: Gorillabox/2011031601.1.3 CFNetwork/485.13.9 Darwin/11.0.0 Accept: */* Accept-Language: en-us Accept-Encoding: gzip, deflate Connection: keep-alive HTTP/1.1 200 OK Date: Mon, 15 Aug 2011 18:43:29 GMT Server: Apache/2.2.12 (Ubuntu) Content-Length: 1006 X-Catalyst: 5.80031 X-PageCache: Catalyst Connection: close Content-Type: application/xml <?xml version="1.0" encoding="UTF-8"?> <xml last_updated="15/08/2011 18:00"> <radar> <image display="Monday 17:00" index="0" url="http://image.metip.g-box.tv:80/UKRadar201108151600.jpg" /> <image display="Monday 17:30" index="1" url="http://image.metip.g-box.tv:80/UKRadar201108151630.jpg" /> <image display="Monday 18:00" index="2" url="http://image.metip.g-box.tv:80/UKRadar201108151700.jpg" /> <image display="Monday 18:30" index="3" url="http://image.metip.g-box.tv:80/UKRadar201108151730.jpg" /> </radar> <satellite> <image display="Monday 17:00" index="0" url="http://image.metip.g-box.tv:80/EuropeSat201108151600.jpg" /> <image display="Monday 17:30" index="1" url="http://image.metip.g-box.tv:80/EuropeSat201108151630.jpg" /> <image display="Monday 18:00" index="2" url="http:// image.metip.g-box.tv:80/EuropeSat201108151700.jpg" /> <image display="Monday 18:30" index="3" url="http://image.metip.g-box.tv:80/EuropeSat201108151730.jpg" /> </satellite> </xml>
Search
The final screen allows you to change the latitude and longitude you want the weather data for by searching for different areas.
Summary
This is a very well thought out app. The majority of the work is handled by the web service with app just handling the display. The web service appears to be custom written by Gorillabox, and is served from a server with their domain name. There doesn’t seem to be any authentication so this API is open to anyone, however the app’s terms and conditions would seem to imply this shouldn’t be the case.
This post applies to version 1.3 of the Met Office iPhone app.