Weather observed from the Spanish National Meteorology Agency (AEMET) is exposed through NGSIv2. The Weather observed is provided by weather stations owned by AEMET and by the IPMA (Portuguese Institute for Sea and Atmosphere).
This folder contains the following scripts:
weather_observed.py
.- Contains all the logic to expose the weather observed as an NGSIv2 data model (outdated).spain_weather_observed_harvest.py
.- Performs data harvesting using AEMET's data site as origin and Orion Context Broker as destination.portugal_weather_observed_harvest.py
.- Performs data harvesting using IPMA's data site as origin and Orion Context Broker as destination.
Please check data licenses at the original data sources before using this data in an application.
To get access to a public instance offering weather observed data please have a look at the GSMA's API Directory.
The instance described here has been set up by the FIWARE Community.
Note: JSON Schemas only capture the NGSI simplified representation, this means that to test the JSON schema examples with
a FIWARE NGSI version 2 API implementation, you need to use the keyValues
mode (options=keyValues
).
What was the weather observed today at 07:00 UTC in Valladolid (Spain)?
curl -H 'fiware-service:weather' -H 'fiware-servicepath:/Spain' -H 'x-auth-token:<my_token>' "http://130.206.118.244:1027/v2/entities?type=WeatherObserved&q=dateObserved:2016-11-30T07:00;address.addressLocality:Valladolid&options=keyValues"
[
{
"id": "Spain-WeatherObserved-2422-2016-11-30T08:00:00",
"type": "WeatherObserved",
"address":
{
"addressLocality": "Valladolid",
"addressCountry": "ES"
},
"atmosfericPressure": 938.9,
"dataProvider": "TEF",
"dateObserved": "2016-11-30T07:00:00.00Z",
"location":
{
"type": "Point",
"coordinates":
[
-4.754444444,
41.640833333
]
},
"precipitation": 0,
"pressureTendency": 0.5,
"relativeHumidity": 1,
"source": "http://www.aemet.es",
"stationCode": "2422",
"stationName": "Valladolid",
"temperature": 3.3,
"windDirection": -45,
"windSpeed": 2
}
]