Weather Forecast API

weather-iconsThe aim of this challenge is to write a computer program to display a 5-day weather forecast for a specific location chosen by the end-user.

You program will:

  • retrieve the city from the end user (input),
  • Use the Open Weather Map API to retrieve an up-to-date weather forecast for this city,
  • parse the retrieved information,
  • display the 5-day weather forecast for the selected location. (output)

In order to do so you will use the Open Weather Map API: https://openweathermap.org/api

You will need to sign in to get an API key.

Then you will be able to make the relevant API calls such as the one described in the tabs below.

JSON or XML?


JSON and XML are two widely used choices for open data interchange.

Initially, XML (eXtensible Markup Language) was the only choice for open data interchange. But over the years the world of open data sharing has evolved a lot. The more lightweight JSON (JavaScript Object Notation) has become a popular alternative to XML for various reasons, one of the main reason being that JSON is more compact, faster and lighter (in terms of memory requirements) to process/parse.

The Open Weather Map API let you choose the format of the data to be retrieved using either the JSON format or XML format. (See examples provided below). So you will have to decide which format to use.

You can read and complete the following two challenges which demonstrate how to use a JSON API using Python code. These challenges will help you find out how to make an API call and how to parse a basic JSON data set.

Open Weather Map API


Here are a few examples of how to use the Open Weather Map API to retrieve JSON or XML data sets.

Current Weather - JSONCurrent Weather - XML5 Day Weather Forecast - JSON5 Day Weather Forecast - XML
API Call

https://api.openweathermap.org/data/2.5/weather?q=London&appid=...

Output

{
"coord":{"lon":-0.13,"lat":51.51},
"weather":[{"id":300,"main":"Drizzle","description":"light intensity drizzle","icon":"09d"}],
"base":"stations",
"main":{"temp":280.32,"pressure":1012,"humidity":81,"temp_min":279.15,"temp_max":281.15},
"visibility":10000,
"wind":{"speed":4.1,"deg":80},
"clouds":{"all":90},
"dt":1485789600,
"sys":{"type":1,"id":5091,"message":0.0103,"country":"GB","sunrise":1485762037,"sunset":1485794875},
"id":2643743,
"name":"London",
"cod":200
}

Find out more about date and time format using a UNIX Timestamp.

API Call

https://api.openweathermap.org/data/2.5/weather?q=London&mode=xml&appid=...

Output

<current>
<city id="2643743" name="London">
<coord lon="-0.13" lat="51.51"/>
<country>GB</country>
<sun rise="2017-01-30T07:40:36" set="2017-01-30T16:47:56"/>
</city>
<temperature value="280.15" min="278.15" max="281.15" unit="kelvin"/>
<humidity value="81" unit="%"/>
<pressure value="1012" unit="hPa"/>
<wind>
<speed value="4.6" name="Gentle Breeze"/>
<gusts/>
<direction value="90" code="E" name="East"/>
</wind>
<clouds value="90" name="overcast clouds"/>
<visibility value="10000"/>
<precipitation mode="no"/>
<weather number="701" value="mist" icon="50d"/>
<lastupdate value="2017-01-30T15:50:00"/>
</current>

Find out more about date and time format using a UNIX Timestamp.

This API generates the a weather forecast report for the next 5 days with a 3 hour interval.
API Call

https://api.openweathermap.org/data/2.5/forecast?q=Moscow&appid=...

Output

{
"cod":"200",
"message":0.0036,
"cnt":40,
"list":[{"dt":1485799200,"main":{"temp":261.45,"temp_min":259.086,"temp_max":261.45,"pressure":1023.48,"sea_level":1045.39,"grnd_level":1023.48,"humidity":79,"temp_kf":2.37},"weather":[{"id":800,"main":"Clear","description":"clear sky","icon":"02n"}],"clouds":{"all":8},"wind":{"speed":4.77,"deg":232.505},"snow":{},"sys":{"pod":"n"},"dt_txt":"2017-01-30 18:00:00"},
{"dt":1485810000,"main":{"temp":261.41,"temp_min":259.638,"temp_max":261.41,"pressure":1022.41,"sea_level":1044.35,"grnd_level":1022.41,"humidity":76,"temp_kf":1.78},"weather":[{"id":800,"main":"Clear","description":"clear sky","icon":"01n"}],"clouds":{"all":32},"wind":{"speed":4.76,"deg":240.503},"snow":{"3h":0.011},"sys":{"pod":"n"},"dt_txt":"2017-01-30 21:00:00"},
{"dt":1485820800,"main":{"temp":261.76,"temp_min":260.571,"temp_max":261.76,"pressure":1021.34,"sea_level":1043.21,"grnd_level":1021.34,"humidity":84,"temp_kf":1.18},"weather":[{"id":600,"main":"Snow","description":"light snow","icon":"13n"}],"clouds":{"all":68},"wind":{"speed":4.71,"deg":243},"snow":{"3h":0.058},"sys":{"pod":"n"},"dt_txt":"2017-01-31 00:00:00"},
{"dt":1485831600,"main":{"temp":261.46,"temp_min":260.865,"temp_max":261.46,"pressure":1019.95,"sea_level":1041.79,"grnd_level":1019.95,"humidity":82,"temp_kf":0.59},"weather":[{"id":600,"main":"Snow","description":"light snow","icon":"13n"}],"clouds":{"all":68},"wind":{"speed":4.46,"deg":244.5},"snow":{"3h":0.05225},"sys":{"pod":"n"},"dt_txt":"2017-01-31 03:00:00"},
{"dt":1485842400,"main":{"temp":260.981,"temp_min":260.981,"temp_max":260.981,"pressure":1018.96,"sea_level":1040.84,"grnd_level":1018.96,"humidity":81,"temp_kf":0},"weather":[{"id":600,"main":"Snow","description":"light snow","icon":"13d"}],"clouds":{"all":80},"wind":{"speed":4.21,"deg":245.005},"snow":{"3h":0.19625},"sys":{"pod":"d"},"dt_txt":"2017-01-31 06:00:00"},
{"dt":1485853200,"main":{"temp":262.308,"temp_min":262.308,"temp_max":262.308,"pressure":1018.1,"sea_level":1039.77,"grnd_level":1018.1,"humidity":91,"temp_kf":0},"weather":[{"id":600,"main":"Snow","description":"light snow","icon":"13d"}],"clouds":{"all":88},"wind":{"speed":4.1,"deg":249.006},"snow":{"3h":0.535},"sys":{"pod":"d"},"dt_txt":"2017-01-31 09:00:00"},
{"dt":1485864000,"main":{"temp":263.76,"temp_min":263.76,"temp_max":263.76,"pressure":1016.86,"sea_level":1038.4,"grnd_level":1016.86,"humidity":87,"temp_kf":0},"weather":[{"id":600,"main":"Snow","description":"light snow","icon":"13d"}],"clouds":{"all":68},"wind":{"speed":3.87,"deg":254.5},"snow":{"3h":0.21},"sys":{"pod":"d"},"dt_txt":"2017-01-31 12:00:00"},
{"dt":1485874800,"main":{"temp":264.182,"temp_min":264.182,"temp_max":264.182,"pressure":1016.19,"sea_level":1037.77,"grnd_level":1016.19,"humidity":89,"temp_kf":0},"weather":[{"id":600,"main":"Snow","description":"light snow","icon":"13n"}],"clouds":{"all":76},"wind":{"speed":3.67,"deg":257.001},"snow":{"3h":0.1375},"sys":{"pod":"n"},"dt_txt":"2017-01-31 15:00:00"},
{"dt":1485885600,"main":{"temp":264.67,"temp_min":264.67,"temp_max":264.67,"pressure":1015.32,"sea_level":1036.94,"grnd_level":1015.32,"humidity":86,"temp_kf":0},"weather":[{"id":600,"main":"Snow","description":"light snow","icon":"13n"}],"clouds":{"all":88},"wind":{"speed":3.61,"deg":262.503},"snow":{"3h":0.1425},"sys":{"pod":"n"},"dt_txt":"2017-01-31 18:00:00"},
{"dt":1485896400,"main":{"temp":265.436,"temp_min":265.436,"temp_max":265.436,"pressure":1014.27,"sea_level":1035.76,"grnd_level":1014.27,"humidity":90,"temp_kf":0},"weather":[{"id":600,"main":"Snow","description":"light snow","icon":"13n"}],"clouds":{"all":80},"wind":{"speed":3.67,"deg":266.5},"snow":{"3h":0.1625},"sys":{"pod":"n"},"dt_txt":"2017-01-31 21:00:00"},
{"dt":1485907200,"main":{"temp":266.104,"temp_min":266.104,"temp_max":266.104,"pressure":1013.1,"sea_level":1034.62,"grnd_level":1013.1,"humidity":90,"temp_kf":0},"weather":[{"id":600,"main":"Snow","description":"light snow","icon":"13n"}],"clouds":{"all":80},"wind":{"speed":3.81,"deg":269.004},"snow":{"3h":0.1025},"sys":{"pod":"n"},"dt_txt":"2017-02-01 00:00:00"},
{"dt":1485918000,"main":{"temp":266.904,"temp_min":266.904,"temp_max":266.904,"pressure":1011.96,"sea_level":1033.47,"grnd_level":1011.96,"humidity":89,"temp_kf":0},"weather":[{"id":600,"main":"Snow","description":"light snow","icon":"13n"}],"clouds":{"all":76},"wind":{"speed":4.26,"deg":274.002},"snow":{"3h":0.12},"sys":{"pod":"n"},"dt_txt":"2017-02-01 03:00:00"},
{"dt":1485928800,"main":{"temp":268.102,"temp_min":268.102,"temp_max":268.102,"pressure":1011.23,"sea_level":1032.62,"grnd_level":1011.23,"humidity":89,"temp_kf":0},"weather":[{"id":600,"main":"Snow","description":"light snow","icon":"13d"}],"clouds":{"all":76},"wind":{"speed":4.4,"deg":283.501},"snow":{"3h":0.13},"sys":{"pod":"d"},"dt_txt":"2017-02-01 06:00:00"},
{"dt":1485939600,"main":{"temp":270.269,"temp_min":270.269,"temp_max":270.269,"pressure":1010.85,"sea_level":1032.1,"grnd_level":1010.85,"humidity":92,"temp_kf":0},"weather":[{"id":600,"main":"Snow","description":"light snow","icon":"13d"}],"clouds":{"all":64},"wind":{"speed":4.53,"deg":297.5},"snow":{"3h":0.1875},"sys":{"pod":"d"},"dt_txt":"2017-02-01 09:00:00"},
{"dt":1485950400,"main":{"temp":270.585,"temp_min":270.585,"temp_max":270.585,"pressure":1010.49,"sea_level":1031.65,"grnd_level":1010.49,"humidity":89,"temp_kf":0},"weather":[{"id":600,"main":"Snow","description":"light snow","icon":"13d"}],"clouds":{"all":76},"wind":{"speed":4.31,"deg":302.004},"snow":{"3h":0.065},"sys":{"pod":"d"},"dt_txt":"2017-02-01 12:00:00"},
{"dt":1485961200,"main":{"temp":269.661,"temp_min":269.661,"temp_max":269.661,"pressure":1010.22,"sea_level":1031.49,"grnd_level":1010.22,"humidity":89,"temp_kf":0},"weather":[{"id":600,"main":"Snow","description":"light snow","icon":"13n"}],"clouds":{"all":68},"wind":{"speed":4.91,"deg":296.5},"snow":{"3h":0.0825},"sys":{"pod":"n"},"dt_txt":"2017-02-01 15:00:00"},
{"dt":1485972000,"main":{"temp":269.155,"temp_min":269.155,"temp_max":269.155,"pressure":1009.95,"sea_level":1031.3,"grnd_level":1009.95,"humidity":89,"temp_kf":0},"weather":[{"id":600,"main":"Snow","description":"light snow","icon":"13n"}],"clouds":{"all":80},"wind":{"speed":5.7,"deg":310.501},"snow":{"3h":0.11},"sys":{"pod":"n"},"dt_txt":"2017-02-01 18:00:00"},
{"dt":1485982800,"main":{"temp":268.056,"temp_min":268.056,"temp_max":268.056,"pressure":1011.21,"sea_level":1032.49,"grnd_level":1011.21,"humidity":89,"temp_kf":0},"weather":[{"id":600,"main":"Snow","description":"light snow","icon":"13n"}],"clouds":{"all":68},"wind":{"speed":5.56,"deg":333},"snow":{"3h":0.225},"sys":{"pod":"n"},"dt_txt":"2017-02-01 21:00:00"},
{"dt":1485993600,"main":{"temp":265.803,"temp_min":265.803,"temp_max":265.803,"pressure":1013.79,"sea_level":1035.06,"grnd_level":1013.79,"humidity":83,"temp_kf":0},"weather":[{"id":600,"main":"Snow","description":"light snow","icon":"13n"}],"clouds":{"all":8},"wind":{"speed":4.8,"deg":355.004},"snow":{"3h":0.03},"sys":{"pod":"n"},"dt_txt":"2017-02-02 00:00:00"},
{"dt":1486004400,"main":{"temp":263.381,"temp_min":263.381,"temp_max":263.381,"pressure":1015.66,"sea_level":1037.16,"grnd_level":1015.66,"humidity":84,"temp_kf":0},"weather":[{"id":800,"main":"Clear","description":"clear sky","icon":"01n"}],"clouds":{"all":0},"wind":{"speed":4.2,"deg":348.503},"snow":{},"sys":{"pod":"n"},"dt_txt":"2017-02-02 03:00:00"},
{"dt":1486015200,"main":{"temp":261.85,"temp_min":261.85,"temp_max":261.85,"pressure":1017.63,"sea_level":1039.22,"grnd_level":1017.63,"humidity":76,"temp_kf":0},"weather":[{"id":800,"main":"Clear","description":"clear sky","icon":"01d"}],"clouds":{"all":0},"wind":{"speed":3.81,"deg":345.502},"snow":{},"sys":{"pod":"d"},"dt_txt":"2017-02-02 06:00:00"},
{"dt":1486026000,"main":{"temp":263.455,"temp_min":263.455,"temp_max":263.455,"pressure":1019.32,"sea_level":1040.84,"grnd_level":1019.32,"humidity":84,"temp_kf":0},"weather":[{"id":800,"main":"Clear","description":"clear sky","icon":"01d"}],"clouds":{"all":0},"wind":{"speed":3.06,"deg":344.004},"snow":{},"sys":{"pod":"d"},"dt_txt":"2017-02-02 09:00:00"},
{"dt":1486036800,"main":{"temp":264.015,"temp_min":264.015,"temp_max":264.015,"pressure":1020.41,"sea_level":1041.88,"grnd_level":1020.41,"humidity":85,"temp_kf":0},"weather":[{"id":800,"main":"Clear","description":"clear sky","icon":"01d"}],"clouds":{"all":0},"wind":{"speed":2.52,"deg":334.501},"snow":{},"sys":{"pod":"d"},"dt_txt":"2017-02-02 12:00:00"},
{"dt":1486047600,"main":{"temp":259.684,"temp_min":259.684,"temp_max":259.684,"pressure":1021.52,"sea_level":1043.21,"grnd_level":1021.52,"humidity":76,"temp_kf":0},"weather":[{"id":800,"main":"Clear","description":"clear sky","icon":"01n"}],"clouds":{"all":0},"wind":{"speed":2.48,"deg":320.501},"snow":{"3h":0.0024999999999999},"sys":{"pod":"n"},"dt_txt":"2017-02-02 15:00:00"},
{"dt":1486058400,"main":{"temp":255.188,"temp_min":255.188,"temp_max":255.188,"pressure":1022.09,"sea_level":1044.09,"grnd_level":1022.09,"humidity":66,"temp_kf":0},"weather":[{"id":801,"main":"Clouds","description":"few clouds","icon":"02n"}],"clouds":{"all":24},"wind":{"speed":1.23,"deg":283.003},"snow":{},"sys":{"pod":"n"},"dt_txt":"2017-02-02 18:00:00"},
{"dt":1486069200,"main":{"temp":255.594,"temp_min":255.594,"temp_max":255.594,"pressure":1022.03,"sea_level":1044.12,"grnd_level":1022.03,"humidity":64,"temp_kf":0},"weather":[{"id":802,"main":"Clouds","description":"scattered clouds","icon":"03n"}],"clouds":{"all":48},"wind":{"speed":1.22,"deg":244.502},"snow":{},"sys":{"pod":"n"},"dt_txt":"2017-02-02 21:00:00"},
{"dt":1486080000,"main":{"temp":256.96,"temp_min":256.96,"temp_max":256.96,"pressure":1021.8,"sea_level":1043.77,"grnd_level":1021.8,"humidity":66,"temp_kf":0},"weather":[{"id":802,"main":"Clouds","description":"scattered clouds","icon":"03n"}],"clouds":{"all":44},"wind":{"speed":1.23,"deg":237.506},"snow":{},"sys":{"pod":"n"},"dt_txt":"2017-02-03 00:00:00"},
{"dt":1486090800,"main":{"temp":258.109,"temp_min":258.109,"temp_max":258.109,"pressure":1020.97,"sea_level":1042.99,"grnd_level":1020.97,"humidity":77,"temp_kf":0},"weather":[{"id":803,"main":"Clouds","description":"broken clouds","icon":"04n"}],"clouds":{"all":80},"wind":{"speed":1.21,"deg":234.502},"snow":{},"sys":{"pod":"n"},"dt_txt":"2017-02-03 03:00:00"},
{"dt":1486101600,"main":{"temp":259.533,"temp_min":259.533,"temp_max":259.533,"pressure":1020.56,"sea_level":1042.53,"grnd_level":1020.56,"humidity":76,"temp_kf":0},"weather":[{"id":803,"main":"Clouds","description":"broken clouds","icon":"04d"}],"clouds":{"all":68},"wind":{"speed":1.21,"deg":229.509},"snow":{},"sys":{"pod":"d"},"dt_txt":"2017-02-03 06:00:00"},
{"dt":1486112400,"main":{"temp":263.438,"temp_min":263.438,"temp_max":263.438,"pressure":1020.46,"sea_level":1042.15,"grnd_level":1020.46,"humidity":84,"temp_kf":0},"weather":[{"id":803,"main":"Clouds","description":"broken clouds","icon":"04d"}],"clouds":{"all":56},"wind":{"speed":1.51,"deg":242.503},"snow":{},"sys":{"pod":"d"},"dt_txt":"2017-02-03 09:00:00"},
{"dt":1486123200,"main":{"temp":264.228,"temp_min":264.228,"temp_max":264.228,"pressure":1019.58,"sea_level":1041.24,"grnd_level":1019.58,"humidity":89,"temp_kf":0},"weather":[{"id":803,"main":"Clouds","description":"broken clouds","icon":"04d"}],"clouds":{"all":56},"wind":{"speed":1.58,"deg":242.503},"snow":{},"sys":{"pod":"d"},"dt_txt":"2017-02-03 12:00:00"},
{"dt":1486134000,"main":{"temp":261.153,"temp_min":261.153,"temp_max":261.153,"pressure":1019.63,"sea_level":1041.42,"grnd_level":1019.63,"humidity":80,"temp_kf":0},"weather":[{"id":800,"main":"Clear","description":"clear sky","icon":"01n"}],"clouds":{"all":76},"wind":{"speed":1.21,"deg":198.501},"snow":{"3h":0.0049999999999999},"sys":{"pod":"n"},"dt_txt":"2017-02-03 15:00:00"},
{"dt":1486144800,"main":{"temp":258.818,"temp_min":258.818,"temp_max":258.818,"pressure":1020.18,"sea_level":1042.03,"grnd_level":1020.18,"humidity":73,"temp_kf":0},"weather":[{"id":803,"main":"Clouds","description":"broken clouds","icon":"04n"}],"clouds":{"all":64},"wind":{"speed":1.21,"deg":209.002},"snow":{},"sys":{"pod":"n"},"dt_txt":"2017-02-03 18:00:00"},
{"dt":1486155600,"main":{"temp":257.218,"temp_min":257.218,"temp_max":257.218,"pressure":1020.43,"sea_level":1042.38,"grnd_level":1020.43,"humidity":65,"temp_kf":0},"weather":[{"id":802,"main":"Clouds","description":"scattered clouds","icon":"03n"}],"clouds":{"all":44},"wind":{"speed":1.17,"deg":194.501},"snow":{},"sys":{"pod":"n"},"dt_txt":"2017-02-03 21:00:00"},
{"dt":1486166400,"main":{"temp":255.782,"temp_min":255.782,"temp_max":255.782,"pressure":1020.57,"sea_level":1042.75,"grnd_level":1020.57,"humidity":73,"temp_kf":0},"weather":[{"id":803,"main":"Clouds","description":"broken clouds","icon":"04n"}],"clouds":{"all":56},"wind":{"speed":1.21,"deg":175.001},"snow":{},"sys":{"pod":"n"},"dt_txt":"2017-02-04 00:00:00"},
{"dt":1486177200,"main":{"temp":254.819,"temp_min":254.819,"temp_max":254.819,"pressure":1020.99,"sea_level":1043.11,"grnd_level":1020.99,"humidity":68,"temp_kf":0},"weather":[{"id":800,"main":"Clear","description":"clear sky","icon":"01n"}],"clouds":{"all":44},"wind":{"speed":1.22,"deg":122.001},"snow":{"3h":0.0049999999999999},"sys":{"pod":"n"},"dt_txt":"2017-02-04 03:00:00"},
{"dt":1486188000,"main":{"temp":257.488,"temp_min":257.488,"temp_max":257.488,"pressure":1021.31,"sea_level":1043.48,"grnd_level":1021.31,"humidity":63,"temp_kf":0},"weather":[{"id":600,"main":"Snow","description":"light snow","icon":"13d"}],"clouds":{"all":68},"wind":{"speed":2.13,"deg":155.501},"snow":{"3h":0.04},"sys":{"pod":"d"},"dt_txt":"2017-02-04 06:00:00"},
{"dt":1486198800,"main":{"temp":259.827,"temp_min":259.827,"temp_max":259.827,"pressure":1021.81,"sea_level":1043.67,"grnd_level":1021.81,"humidity":90,"temp_kf":0},"weather":[{"id":600,"main":"Snow","description":"light snow","icon":"13d"}],"clouds":{"all":68},"wind":{"speed":2.07,"deg":170.005},"snow":{"3h":0.03},"sys":{"pod":"d"},"dt_txt":"2017-02-04 09:00:00"},
{"dt":1486209600,"main":{"temp":261.256,"temp_min":261.256,"temp_max":261.256,"pressure":1021.31,"sea_level":1043.05,"grnd_level":1021.31,"humidity":86,"temp_kf":0},"weather":[{"id":800,"main":"Clear","description":"clear sky","icon":"01d"}],"clouds":{"all":76},"wind":{"speed":2.32,"deg":175.001},"snow":{"3h":0.0049999999999999},"sys":{"pod":"d"},"dt_txt":"2017-02-04 12:00:00"},
{"dt":1486220400,"main":{"temp":260.26,"temp_min":260.26,"temp_max":260.26,"pressure":1021,"sea_level":1042.96,"grnd_level":1021,"humidity":86,"temp_kf":0},"weather":[{"id":803,"main":"Clouds","description":"broken clouds","icon":"04n"}],"clouds":{"all":56},"wind":{"speed":2.47,"deg":180.501},"snow":{},"sys":{"pod":"n"},"dt_txt":"2017-02-04 15:00:00"}],"city":{"id":524901,"name":"Moscow","coord":{"lat":55.7522,"lon":37.6156},"country":"none"}}

Find out more about date and time format using a UNIX Timestamp.

This API generates the a weather forecast report for the next 5 days with a 3 hour interval.
API Call

https://api.openweathermap.org/data/2.5/forecast?q=Moscow&mode=xml&appid=...

Output

<weatherdata>
<location>
<name>London</name>
<type/>
<country>US</country>
<timezone/>
<location altitude="0" latitude="39.8865" longitude="-83.4483" geobase="geonames" geobaseid="4517009"/>
</location>
<credit/>
<meta>
<lastupdate/>
<calctime>0.0028</calctime>
<nextupdate/>
</meta>
<sun rise="2017-03-03T12:03:03" set="2017-03-03T23:28:37"/>
<forecast>
<time from="2017-03-03T06:00:00" to="2017-03-03T09:00:00">
<symbol number="600" name="light snow" var="13n"/>
<precipitation unit="3h" value="0.03125" type="snow"/>
<windDirection deg="303.004" code="WNW" name="West-northwest"/>
<windSpeed mps="2.29" name="Light breeze"/>
<temperature unit="kelvin" value="269.91" min="269.91" max="270.877"/>
<pressure unit="hPa" value="1005.61"/>
<humidity value="93" unit="%"/>
<clouds value="scattered clouds" all="32" unit="%"/>
</time>
<time from="2017-03-03T09:00:00" to="2017-03-03T12:00:00">
<symbol number="800" name="clear sky" var="01n"/>
<precipitation unit="3h" value="0.0225" type="snow"/>
<windDirection deg="293.503" code="WNW" name="West-northwest"/>
<windSpeed mps="3.55" name="Gentle Breeze"/>
<temperature unit="kelvin" value="269.23" min="269.23" max="269.957"/>
<pressure unit="hPa" value="1007.39"/>
<humidity value="90" unit="%"/>
<clouds value="scattered clouds" all="36" unit="%"/>
</time>
<time from="2017-03-03T12:00:00" to="2017-03-03T15:00:00">
<symbol number="800" name="clear sky" var="01d"/>
<precipitation unit="3h" value="0.0125" type="snow"/>
<windDirection deg="301.5" code="WNW" name="West-northwest"/>
<windSpeed mps="6.26" name="Moderate breeze"/>
<temperature unit="kelvin" value="270.93" min="270.93" max="271.416"/>
<pressure unit="hPa" value="1009.81"/>
<humidity value="100" unit="%"/>
<clouds value="few clouds" all="24" unit="%"/>
</time>
<time from="2017-03-03T15:00:00" to="2017-03-03T18:00:00">
<symbol number="800" name="clear sky" var="01d"/>
<precipitation unit="3h" value="0.0025" type="snow"/>
<windDirection deg="302.005" code="WNW" name="West-northwest"/>
<windSpeed mps="7.31" name="Moderate breeze"/>
<temperature unit="kelvin" value="272.25" min="272.25" max="272.491"/>
<pressure unit="hPa" value="1011.51"/>
<humidity value="92" unit="%"/>
<clouds value="scattered clouds" all="32" unit="%"/>
</time>
<time from="2017-03-03T18:00:00" to="2017-03-03T21:00:00">
<symbol number="800" name="clear sky" var="02d"/>
<precipitation/>
<windDirection deg="298.5" code="WNW" name="West-northwest"/>
<windSpeed mps="6.61" name="Moderate breeze"/>
<temperature unit="kelvin" value="272.817" min="272.817" max="272.817"/>
<pressure unit="hPa" value="1012.1"/>
<humidity value="79" unit="%"/>
<clouds value="clear sky" all="8" unit="%"/>
</time>
<time from="2017-03-03T21:00:00" to="2017-03-04T00:00:00">
<symbol number="800" name="clear sky" var="01n"/>
<precipitation/>
<windDirection deg="294.502" code="WNW" name="West-northwest"/>
<windSpeed mps="4.26" name="Gentle Breeze"/>
<temperature unit="kelvin" value="270.438" min="270.438" max="270.438"/>
<pressure unit="hPa" value="1012.92"/>
<humidity value="65" unit="%"/>
<clouds value="clear sky" all="0" unit="%"/>
</time>
<time from="2017-03-04T00:00:00" to="2017-03-04T03:00:00">
<symbol number="800" name="clear sky" var="01n"/>
<precipitation/>
<windDirection deg="292" code="WNW" name="West-northwest"/>
<windSpeed mps="2.66" name="Light breeze"/>
<temperature unit="kelvin" value="268.016" min="268.016" max="268.016"/>
<pressure unit="hPa" value="1013.34"/>
<humidity value="66" unit="%"/>
<clouds value="clear sky" all="0" unit="%"/>
</time>
<time from="2017-03-04T03:00:00" to="2017-03-04T06:00:00">
<symbol number="801" name="few clouds" var="02n"/>
<precipitation/>
<windDirection deg="290.001" code="WNW" name="West-northwest"/>
<windSpeed mps="1.42" name="Calm"/>
<temperature unit="kelvin" value="267.082" min="267.082" max="267.082"/>
<pressure unit="hPa" value="1013.88"/>
<humidity value="71" unit="%"/>
<clouds value="few clouds" all="20" unit="%"/>
</time>
<time from="2017-03-04T06:00:00" to="2017-03-04T09:00:00">
<symbol number="802" name="scattered clouds" var="03n"/>
<precipitation/>
<windDirection deg="344.003" code="NNW" name="North-northeast"/>
<windSpeed mps="1.32" name="Calm"/>
<temperature unit="kelvin" value="268.057" min="268.057" max="268.057"/>
<pressure unit="hPa" value="1013.66"/>
<humidity value="70" unit="%"/>
<clouds value="scattered clouds" all="44" unit="%"/>
</time>
<time from="2017-03-04T09:00:00" to="2017-03-04T12:00:00">
<symbol number="600" name="light snow" var="13n"/>
<precipitation unit="3h" value="0.13" type="snow"/>
<windDirection deg="143.001" code="SE" name="SouthEast"/>
<windSpeed mps="1.91" name="Light breeze"/>
<temperature unit="kelvin" value="268.687" min="268.687" max="268.687"/>
<pressure unit="hPa" value="1014.24"/>
<humidity value="78" unit="%"/>
<clouds value="broken clouds" all="80" unit="%"/>
</time>
<time from="2017-03-04T12:00:00" to="2017-03-04T15:00:00">
<symbol number="804" name="overcast clouds" var="04d"/>
<precipitation/>
<windDirection deg="136.502" code="SE" name="SouthEast"/>
<windSpeed mps="3.16" name="Light breeze"/>
<temperature unit="kelvin" value="270.296" min="270.296" max="270.296"/>
<pressure unit="hPa" value="1014.65"/>
<humidity value="85" unit="%"/>
<clouds value="overcast clouds" all="92" unit="%"/>
</time>
<time from="2017-03-04T15:00:00" to="2017-03-04T18:00:00">
<symbol number="600" name="light snow" var="13d"/>
<precipitation unit="3h" value="0.835" type="snow"/>
<windDirection deg="130.504" code="SE" name="SouthEast"/>
<windSpeed mps="4.16" name="Gentle Breeze"/>
<temperature unit="kelvin" value="273.066" min="273.066" max="273.066"/>
<pressure unit="hPa" value="1012.99"/>
<humidity value="88" unit="%"/>
<clouds value="few clouds" all="20" unit="%"/>
</time>
<time from="2017-03-04T18:00:00" to="2017-03-04T21:00:00">
<symbol number="800" name="clear sky" var="01d"/>
<precipitation/>
<windDirection deg="143.5" code="SE" name="SouthEast"/>
<windSpeed mps="2.77" name="Light breeze"/>
<temperature unit="kelvin" value="276.767" min="276.767" max="276.767"/>
<pressure unit="hPa" value="1011.06"/>
<humidity value="84" unit="%"/>
<clouds value="clear sky" all="0" unit="%"/>
</time>
<time from="2017-03-04T21:00:00" to="2017-03-05T00:00:00">
<symbol number="800" name="clear sky" var="01n"/>
<precipitation/>
<windDirection deg="89.5023" code="E" name="East"/>
<windSpeed mps="3.73" name="Gentle Breeze"/>
<temperature unit="kelvin" value="274.492" min="274.492" max="274.492"/>
<pressure unit="hPa" value="1010.42"/>
<humidity value="70" unit="%"/>
<clouds value="clear sky" all="0" unit="%"/>
</time>
<time from="2017-03-05T00:00:00" to="2017-03-05T03:00:00">
<symbol number="800" name="clear sky" var="01n"/>
<precipitation/>
<windDirection deg="97.5005" code="E" name="East"/>
<windSpeed mps="4.97" name="Gentle Breeze"/>
<temperature unit="kelvin" value="271.485" min="271.485" max="271.485"/>
<pressure unit="hPa" value="1011.31"/>
<humidity value="72" unit="%"/>
<clouds value="clear sky" all="0" unit="%"/>
</time>
<time from="2017-03-05T03:00:00" to="2017-03-05T06:00:00">
<symbol number="800" name="clear sky" var="01n"/>
<precipitation/>
<windDirection deg="107.002" code="ESE" name="East-southeast"/>
<windSpeed mps="4.67" name="Gentle Breeze"/>
<temperature unit="kelvin" value="270.202" min="270.202" max="270.202"/>
<pressure unit="hPa" value="1011.33"/>
<humidity value="72" unit="%"/>
<clouds value="clear sky" all="0" unit="%"/>
</time>
<time from="2017-03-05T06:00:00" to="2017-03-05T09:00:00">
<symbol number="800" name="clear sky" var="01n"/>
<precipitation/>
<windDirection deg="116.504" code="ESE" name="East-southeast"/>
<windSpeed mps="4.57" name="Gentle Breeze"/>
<temperature unit="kelvin" value="270.002" min="270.002" max="270.002"/>
<pressure unit="hPa" value="1010.53"/>
<humidity value="77" unit="%"/>
<clouds value="clear sky" all="0" unit="%"/>
</time>
<time from="2017-03-05T09:00:00" to="2017-03-05T12:00:00">
<symbol number="800" name="clear sky" var="01d"/>
<precipitation/>
<windDirection deg="127.003" code="SE" name="SouthEast"/>
<windSpeed mps="4.56" name="Gentle Breeze"/>
<temperature unit="kelvin" value="270.017" min="270.017" max="270.017"/>
<pressure unit="hPa" value="1010.21"/>
<humidity value="73" unit="%"/>
<clouds value="clear sky" all="0" unit="%"/>
</time>
<time from="2017-03-05T12:00:00" to="2017-03-05T15:00:00">
<symbol number="800" name="clear sky" var="01d"/>
<precipitation/>
<windDirection deg="148.002" code="SSE" name="South-southeast"/>
<windSpeed mps="4.68" name="Gentle Breeze"/>
<temperature unit="kelvin" value="276.199" min="276.199" max="276.199"/>
<pressure unit="hPa" value="1010.18"/>
<humidity value="81" unit="%"/>
<clouds value="clear sky" all="0" unit="%"/>
</time>
<time from="2017-03-05T15:00:00" to="2017-03-05T18:00:00">
<symbol number="800" name="clear sky" var="01d"/>
<precipitation/>
<windDirection deg="174.5" code="S" name="South"/>
<windSpeed mps="4.72" name="Gentle Breeze"/>
<temperature unit="kelvin" value="284.031" min="284.031" max="284.031"/>
<pressure unit="hPa" value="1008.28"/>
<humidity value="80" unit="%"/>
<clouds value="clear sky" all="0" unit="%"/>
</time>
<time from="2017-03-05T18:00:00" to="2017-03-05T21:00:00">
<symbol number="802" name="scattered clouds" var="03d"/>
<precipitation/>
<windDirection deg="207.501" code="SSW" name="South-southwest"/>
<windSpeed mps="5.02" name="Gentle Breeze"/>
<temperature unit="kelvin" value="286.276" min="286.276" max="286.276"/>
<pressure unit="hPa" value="1005.92"/>
<humidity value="71" unit="%"/>
<clouds value="scattered clouds" all="32" unit="%"/>
</time>
<time from="2017-03-05T21:00:00" to="2017-03-06T00:00:00">
<symbol number="802" name="scattered clouds" var="03n"/>
<precipitation/>
<windDirection deg="200.003" code="SSW" name="South-southwest"/>
<windSpeed mps="4.81" name="Gentle Breeze"/>
<temperature unit="kelvin" value="282.168" min="282.168" max="282.168"/>
<pressure unit="hPa" value="1005.45"/>
<humidity value="64" unit="%"/>
<clouds value="scattered clouds" all="44" unit="%"/>
</time>
<time from="2017-03-06T00:00:00" to="2017-03-06T03:00:00">
<symbol number="800" name="clear sky" var="01n"/>
<precipitation/>
<windDirection deg="201.001" code="SSW" name="South-southwest"/>
<windSpeed mps="5.37" name="Gentle Breeze"/>
<temperature unit="kelvin" value="279.202" min="279.202" max="279.202"/>
<pressure unit="hPa" value="1005.45"/>
<humidity value="68" unit="%"/>
<clouds value="clear sky" all="0" unit="%"/>
</time>
<time from="2017-03-06T03:00:00" to="2017-03-06T06:00:00">
<symbol number="802" name="scattered clouds" var="03n"/>
<precipitation/>
<windDirection deg="201.001" code="SSW" name="South-southwest"/>
<windSpeed mps="5.21" name="Gentle Breeze"/>
<temperature unit="kelvin" value="278.025" min="278.025" max="278.025"/>
<pressure unit="hPa" value="1005.18"/>
<humidity value="72" unit="%"/>
<clouds value="scattered clouds" all="44" unit="%"/>
</time>
<time from="2017-03-06T06:00:00" to="2017-03-06T09:00:00">
<symbol number="803" name="broken clouds" var="04n"/>
<precipitation/>
<windDirection deg="203.503" code="SSW" name="South-southwest"/>
<windSpeed mps="5.42" name=""/>
<temperature unit="kelvin" value="278.123" min="278.123" max="278.123"/>
<pressure unit="hPa" value="1004.75"/>
<humidity value="74" unit="%"/>
<clouds value="broken clouds" all="76" unit="%"/>
</time>
<time from="2017-03-06T09:00:00" to="2017-03-06T12:00:00">
<symbol number="804" name="overcast clouds" var="04d"/>
<precipitation/>
<windDirection deg="202.003" code="SSW" name="South-southwest"/>
<windSpeed mps="5.41" name=""/>
<temperature unit="kelvin" value="278.704" min="278.704" max="278.704"/>
<pressure unit="hPa" value="1004.96"/>
<humidity value="74" unit="%"/>
<clouds value="overcast clouds" all="92" unit="%"/>
</time>
<time from="2017-03-06T12:00:00" to="2017-03-06T15:00:00">
<symbol number="802" name="scattered clouds" var="03d"/>
<precipitation/>
<windDirection deg="193.502" code="SSW" name="South-southwest"/>
<windSpeed mps="6.01" name="Moderate breeze"/>
<temperature unit="kelvin" value="282.402" min="282.402" max="282.402"/>
<pressure unit="hPa" value="1004.49"/>
<humidity value="74" unit="%"/>
<clouds value="scattered clouds" all="48" unit="%"/>
</time>
<time from="2017-03-06T15:00:00" to="2017-03-06T18:00:00">
<symbol number="500" name="light rain" var="10d"/>
<precipitation unit="3h" value="0.02" type="rain"/>
<windDirection deg="203" code="SSW" name="South-southwest"/>
<windSpeed mps="9.16" name="Fresh Breeze"/>
<temperature unit="kelvin" value="287.36" min="287.36" max="287.36"/>
<pressure unit="hPa" value="1002.21"/>
<humidity value="76" unit="%"/>
<clouds value="few clouds" all="24" unit="%"/>
</time>
<time from="2017-03-06T18:00:00" to="2017-03-06T21:00:00">
<symbol number="804" name="overcast clouds" var="04d"/>
<precipitation/>
<windDirection deg="202.501" code="SSW" name="South-southwest"/>
<windSpeed mps="8.72" name="Fresh Breeze"/>
<temperature unit="kelvin" value="288.081" min="288.081" max="288.081"/>
<pressure unit="hPa" value="1000.08"/>
<humidity value="74" unit="%"/>
<clouds value="overcast clouds" all="88" unit="%"/>
</time>
<time from="2017-03-06T21:00:00" to="2017-03-07T00:00:00">
<symbol number="500" name="light rain" var="10n"/>
<precipitation unit="3h" value="0.51" type="rain"/>
<windDirection deg="187.001" code="S" name="South"/>
<windSpeed mps="7.01" name="Moderate breeze"/>
<temperature unit="kelvin" value="286.823" min="286.823" max="286.823"/>
<pressure unit="hPa" value="999.09"/>
<humidity value="76" unit="%"/>
<clouds value="overcast clouds" all="92" unit="%"/>
</time>
<time from="2017-03-07T00:00:00" to="2017-03-07T03:00:00">
<symbol number="804" name="overcast clouds" var="04n"/>
<precipitation/>
<windDirection deg="192" code="SSW" name="South-southwest"/>
<windSpeed mps="9.06" name="Fresh Breeze"/>
<temperature unit="kelvin" value="286.627" min="286.627" max="286.627"/>
<pressure unit="hPa" value="998.08"/>
<humidity value="72" unit="%"/>
<clouds value="overcast clouds" all="92" unit="%"/>
</time>
<time from="2017-03-07T03:00:00" to="2017-03-07T06:00:00">
<symbol number="804" name="overcast clouds" var="04n"/>
<precipitation/>
<windDirection deg="200.502" code="SSW" name="South-southwest"/>
<windSpeed mps="10.06" name="Fresh Breeze"/>
<temperature unit="kelvin" value="286.38" min="286.38" max="286.38"/>
<pressure unit="hPa" value="997.51"/>
<humidity value="76" unit="%"/>
<clouds value="overcast clouds" all="92" unit="%"/>
</time>
<time from="2017-03-07T06:00:00" to="2017-03-07T09:00:00">
<symbol number="804" name="overcast clouds" var="04n"/>
<precipitation/>
<windDirection deg="204.501" code="SSW" name="South-southwest"/>
<windSpeed mps="9.36" name="Fresh Breeze"/>
<temperature unit="kelvin" value="286.222" min="286.222" max="286.222"/>
<pressure unit="hPa" value="996.68"/>
<humidity value="88" unit="%"/>
<clouds value="overcast clouds" all="92" unit="%"/>
</time>
<time from="2017-03-07T09:00:00" to="2017-03-07T12:00:00">
<symbol number="501" name="moderate rain" var="10d"/>
<precipitation unit="3h" value="3.65" type="rain"/>
<windDirection deg="201.5" code="SSW" name="South-southwest"/>
<windSpeed mps="8.81" name="Fresh Breeze"/>
<temperature unit="kelvin" value="286.035" min="286.035" max="286.035"/>
<pressure unit="hPa" value="996.61"/>
<humidity value="95" unit="%"/>
<clouds value="overcast clouds" all="92" unit="%"/>
</time>
<time from="2017-03-07T12:00:00" to="2017-03-07T15:00:00">
<symbol number="804" name="overcast clouds" var="04d"/>
<precipitation/>
<windDirection deg="202.001" code="SSW" name="South-southwest"/>
<windSpeed mps="8.87" name="Fresh Breeze"/>
<temperature unit="kelvin" value="286.965" min="286.965" max="286.965"/>
<pressure unit="hPa" value="995.94"/>
<humidity value="96" unit="%"/>
<clouds value="overcast clouds" all="92" unit="%"/>
</time>
<time from="2017-03-07T15:00:00" to="2017-03-07T18:00:00">
<symbol number="804" name="overcast clouds" var="04d"/>
<precipitation/>
<windDirection deg="211.507" code="SSW" name="South-southwest"/>
<windSpeed mps="7.86" name="Moderate breeze"/>
<temperature unit="kelvin" value="288.163" min="288.163" max="288.163"/>
<pressure unit="hPa" value="994.32"/>
<humidity value="98" unit="%"/>
<clouds value="overcast clouds" all="92" unit="%"/>
</time>
<time from="2017-03-07T18:00:00" to="2017-03-07T21:00:00">
<symbol number="804" name="overcast clouds" var="04d"/>
<precipitation/>
<windDirection deg="229.5" code="SW" name="Southwest"/>
<windSpeed mps="7.46" name="Moderate breeze"/>
<temperature unit="kelvin" value="288.788" min="288.788" max="288.788"/>
<pressure unit="hPa" value="993.15"/>
<humidity value="100" unit="%"/>
<clouds value="overcast clouds" all="88" unit="%"/>
</time>
</forecast>
</weatherdata>

Find out more about date and time format using a UNIX Timestamp.

Did you like this challenge?

Click on a star to rate it!

Average rating 3.9 / 5. Vote count: 130

No votes so far! Be the first to rate this post.

As you found this challenge interesting...

Follow us on social media!

Tagged with: , ,