Weather File Feed in Detail
Foreca Weather Feed, providing all the same weather parameters as Foreca Weather API, is available as XML and delimited ASCII.
Foreca provides raw weather data in an easy to use format for customers who want to design their own graphics, or who just need raw weather data for other purposes. Readymade Global or National packages are available - both with two different levels of service: Standard and Premium. For special purposes custom feeds are also available upon request. Depending on the package chosen the feeds contain weather forecasts for up to 14 days, and current conditions data from relevant local weather stations.
The data is updated on a continual basis. With a Foreca Weather Feed your weather data will always be up to date.
Pricing is based on the package chosen and the end usage of the data. Any customer requested tailoring is charged separately. Graphical symbol sets are available for visualizing the weather data.
A Foreca Weather Feed can contain weather information for up to 80.000 locations world-wide. Please note that the actual number of locations and pricing is subject to negotiations.
The Weather Feed is based on customer using HTTP polling to monitor forecast and observation files, which update at different intervals. Location meta data, such as coordinates and names in various languages, is provided in a separate static file. The files are either XML or delimited ASCII raw data, which is language independent. We recommend that larger batch files be gzipped delimited ASCII, since typically the delimited ASCII files are faster and easier to parse and gzip compression greatly reduces transfer times. For convenience (intended for smaller files) we can also provide the data as uncompressed XML, or RSS. Foreca reserves the option to limit traffic to only predefined IP adresses.
The exact update time may vary slightly from day to day, and there can be extra updates. To optimize data freshness and to create a robust system, please adhere to the following polling method:
- For each XML data file, get the HEAD every 10 minutes. If the file on our server is fresher than your local copy, then download entire file.
- For each image XML meta file (which describes the images in an animation), get the HEAD every 10 minutes. If the file on our server is fresher than local copy, then download entire file, and all the images referenced by the meta file.
- For warning files, get the HEAD every minute. If the file on our server is fresher than local copy, then download entire file
The HEAD of a file is typically only hundreds of bytes and creates negligible traffic. For reference regarding the HEAD request, see http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html section 9.4, HEAD. Foreca does not endorse any particular tools, but simply running wget in mirroring mode accomplishes the above.
Global and National packages can be combined. For instance, Standard Global package with 20.000 location including 352 UK locations UK Standard package with 2300 UK locations (all the locations included in the Global package and over 1800 additional locations). This combination provides complete coverage of the UK and all major locations globally.
Weather data provided
The service is delivered in up to four separate files, which are detailed below.
Foreca provides graphical icons for visualizing the weather codes, which are (C) Foreca but can be freely used to visualize Foreca's weather data.
Daily overview forecasts
This file contains summary-level weather parameters which are applicable for the entire day, such as the day's maximum temperature. Forecasts are updated at least four times per day.
Hourly and 6-hourly forecasts
This file contains snapshot-like weather parameters for the times specified, such as temperature, wind speed, etc. This data could for instance be used to plot a graph of a weather parameter as a function of time. Forecasts are updated at least four times per day.
For each location, this file contains data from the closest relevant weather station at the time, if available. The file is updated at least every 15 minutes, but the update frequency of any given observation station's data depends on the transmitting frequency of the station, which typically varies between 30 minutes and 3 hours, but there are also some manual stations which do not take measurements during the night. When we choose which stations to use we try to ensure that the weather conditions are as close as possible to the ones at the location they are used to represent. To do this, we weigh the following factors:
- distance to the station
- altitude difference between station and forecast location
- how recent the data is
- estimated time of next update based on historical update frequency
- how rich data the station provides (e.g. some stations do not provide cloudiness, which is needed for graphics)
Due the above factors, a more close-by or recent observation might not be used, if it only contains temperature. We might opt for a slightly older observation from another station, if it contains more weather parameters. This process is dynamic, so it is possible for the weather station chosen for a given location to change, as new data becomes available. One example situation where a station can change frequently happens when a close-by station transmits rich data during day time but ceases transmitting during the night, which is typical for smaller air ports. In such a case a different station would be selected for night time.
Please note that in some parts of the world the observation network is really sparse, such as in Africa, parts of Middle East, and South America, and especially during night time. The closest weather station with fresh data can at times be over 500 km away. In such cases it is possible that the current conditions will be completely missing from the feed.
While the forecast data will always be there, please be prepared to handle missing current conditions (observations) information, since missing instrumentation or instrument malfunctions may affect data. Any of the parameter values can be missing/empty, and even the entire obs tag (in XML) can be missing. In delimited ASCII empty data is denoted by an empty string between the delimiters. In case of missing data it is recommended to simply adapt lay-out so that white space is shown instead. Texts like "No data" are NOT RECOMMENDED, as they are often interpreted by end-users as a service malfunction, which is not the case.