Hello,
I've recently been trying to pull weather data from the UK Met office API, whilst I can get some values in, things get complicated (for me any way!) when you start trying to look at the forecast weather as T for temperature occurs many times throughout the output.
Would it be possible to have a Data source built in to Mango, as with the Environment Canada data source, when you simply select your weather station ID, and then whether you would like today's values, tomorrows or the day after etc (free API gives a 3 day forecast)
If this isn't possible, could I get some advice on how to read the values please?
Here is a sample of the data received in XML (JSON also available)
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<SiteRep>
<Wx>
<Param name="F" units="C">Feels Like Temperature</Param>
<Param name="G" units="mph">Wind Gust</Param>
<Param name="H" units="%">Screen Relative Humidity</Param>
<Param name="T" units="C">Temperature</Param>
<Param name="V" units="">Visibility</Param>
<Param name="D" units="compass">Wind Direction</Param>
<Param name="S" units="mph">Wind Speed</Param>
<Param name="U" units="">Max UV Index</Param>
<Param name="W" units="">Weather Type</Param>
<Param name="Pp" units="%">Precipitation Probability</Param>
</Wx>
<DV dataDate="2017-11-05T09:00:00Z" type="Forecast">
<Location i="310006" lat="52.4065" lon="-1.5182" name="COVENTRY" country="ENGLAND" continent="EUROPE" elevation="79.0">
<Period type="Day" value="2017-11-05Z">
<Rep D="W" F="2" G="20" H="90" Pp="53" S="4" T="4" V="GO" W="9" U="0">360</Rep>
<Rep D="WSW" F="3" G="16" H="93" Pp="34" S="4" T="4" V="GO" W="10" U="1">540</Rep>
<Rep D="WNW" F="4" G="18" H="81" Pp="5" S="11" T="7" V="VG" W="7" U="1">720</Rep>
<Rep D="NW" F="5" G="18" H="74" Pp="0" S="11" T="8" V="VG" W="1" U="1">900</Rep>
<Rep D="NW" F="4" G="20" H="84" Pp="0" S="7" T="6" V="GO" W="0" U="0">1080</Rep>
<Rep D="NW" F="2" G="16" H="87" Pp="0" S="7" T="5" V="GO" W="0" U="0">1260</Rep>
</Period>
<Period type="Day" value="2017-11-06Z">
<Rep D="WNW" F="1" G="9" H="92" Pp="0" S="4" T="3" V="GO" W="0" U="0">0</Rep>
<Rep D="WSW" F="1" G="9" H="94" Pp="0" S="4" T="2" V="GO" W="0" U="0">180</Rep>
<Rep D="SW" F="0" G="9" H="94" Pp="1" S="4" T="2" V="GO" W="0" U="0">360</Rep>
<Rep D="SSW" F="2" G="13" H="90" Pp="0" S="4" T="4" V="GO" W="1" U="1">540</Rep>
<Rep D="SSW" F="7" G="13" H="76" Pp="1" S="7" T="9" V="VG" W="1" U="1">720</Rep>
<Rep D="SSW" F="8" G="16" H="70" Pp="5" S="9" T="9" V="VG" W="7" U="1">900</Rep>
<Rep D="S" F="6" G="20" H="79" Pp="5" S="9" T="8" V="VG" W="7" U="0">1080</Rep>
<Rep D="S" F="5" G="20" H="79" Pp="8" S="11" T="8" V="VG" W="7" U="0">1260</Rep>
</Period>
<Period type="Day" value="2017-11-07Z">
<Rep D="S" F="6" G="25" H="80" Pp="11" S="11" T="9" V="VG" W="8" U="0">0</Rep>
<Rep D="S" F="6" G="27" H="82" Pp="16" S="13" T="9" V="VG" W="8" U="0">180</Rep>
<Rep D="S" F="7" G="29" H="85" Pp="22" S="16" T="10" V="VG" W="8" U="0">360</Rep>
<Rep D="S" F="7" G="29" H="84" Pp="86" S="16" T="10" V="GO" W="15" U="1">540</Rep>
<Rep D="SSW" F="7" G="25" H="85" Pp="62" S="13" T="10" V="MO" W="12" U="1">720</Rep>
<Rep D="NW" F="5" G="25" H="85" Pp="39" S="13" T="8" V="MO" W="10" U="1">900</Rep>
<Rep D="WNW" F="4" G="16" H="84" Pp="12" S="9" T="7" V="VG" W="7" U="0">1080</Rep>
<Rep D="WNW" F="3" G="16" H="89" Pp="2" S="7" T="5" V="VG" W="0" U="0">1260</Rep>
</Period>
<Period type="Day" value="2017-11-08Z">
<Rep D="WNW" F="1" G="11" H="89" Pp="0" S="7" T="4" V="VG" W="0" U="0">0</Rep>
<Rep D="WNW" F="0" G="11" H="90" Pp="0" S="7" T="3" V="VG" W="0" U="0">180</Rep>
<Rep D="WNW" F="0" G="11" H="90" Pp="0" S="7" T="2" V="VG" W="0" U="0">360</Rep>
<Rep D="WNW" F="1" G="13" H="88" Pp="0" S="7" T="4" V="VG" W="1" U="1">540</Rep>
<Rep D="WNW" F="6" G="13" H="77" Pp="0" S="7" T="8" V="VG" W="1" U="1">720</Rep>
<Rep D="W" F="7" G="13" H="72" Pp="0" S="7" T="9" V="VG" W="1" U="1">900</Rep>
<Rep D="WSW" F="3" G="11" H="86" Pp="4" S="7" T="6" V="VG" W="7" U="0">1080</Rep>
<Rep D="SW" F="3" G="16" H="86" Pp="6" S="9" T="5" V="VG" W="7" U="0">1260</Rep>
</Period>
<Period type="Day" value="2017-11-09Z">
<Rep D="SW" F="4" G="20" H="87" Pp="14" S="11" T="7" V="GO" W="7" U="0">0</Rep>
<Rep D="WSW" F="5" G="22" H="92" Pp="16" S="13" T="8" V="GO" W="8" U="0">180</Rep>
<Rep D="WNW" F="6" G="22" H="87" Pp="28" S="13" T="9" V="VG" W="9" U="0">360</Rep>
<Rep D="WNW" F="5" G="25" H="78" Pp="5" S="13" T="8" V="VG" W="7" U="1">540</Rep>
<Rep D="WNW" F="7" G="31" H="70" Pp="7" S="16" T="10" V="VG" W="3" U="1">720</Rep>
<Rep D="WNW" F="6" G="29" H="69" Pp="6" S="16" T="9" V="VG" W="3" U="1">900</Rep>
<Rep D="WNW" F="5" G="22" H="77" Pp="2" S="11" T="8" V="VG" W="2" U="0">1080</Rep>
<Rep D="W" F="4" G="20" H="82" Pp="2" S="11" T="7" V="VG" W="2" U="0">1260</Rep>
</Period>
</Location>
</DV>
</SiteRep>```
//
Many Thanks,
Chris