I am currently building an internet based weather staiton to display the current weather information i.e. temperature, humidity ect. using the Darksky api and python forsastio.
The problem is that I can print the current weather summary and current text that I can use to display an appropriate icon which is really cool! and i can even print a list of temperatures, rainfall, ozone levels ect for the last hour but after hours of searching the web I just cant find anything workable that displays just a few simple elements, in fact except for a few brief examples any information on forecatio is pretty hard to come by.
this is my code, any help will be gratefully received.
Code: Select all
[import forecastio import time def main(): api_key = "-----------------------------" lat = 53.38 #lattidue lng = -1.22 #longditue forecast = forecastio.load_forecast(api_key,lat,lng) # send request? byHour = forecast.hourly() # store hourly data print print byHour.summary # print summary print byHour.icon # print icon text for hourlyData in byHour.data: print hourlyData.temperature # prints a list of about 30 temperatures from the last hour main() /code]