A minimal Python library to pull basic weather data from the FMI open data service.
I wanted a simple way to pull the temperature, pressure etc. data from selected cities. Could not find a suitable solution so I decided to write my own :)
Get a personal API key from FMI to gain access to the FMI open data.
import fmiopendata
fmiod = fmiopendata.FMIOpenData()
fmidata = fmiod.get_data("Helsinki", "temperature")
import fmiopendata
fmiod = fmiopendata.FMIOpenData()
fmidata = fmiod.get_data("Espoo", "temperature,pressure,visibility", "2017-08-29T07:00:00Z")
The data is currently returned as a list of custom objects (NamedTimeSeries). To print the data on the console:
for d in fmidata:
print d.name, 'at', location
for t, val in zip(d.t, d.data):
print t.strftime("%Y-%m-%d %H:%M:%S"), val
This project is licensed under the MIT License - see the license.md file for details
