The SASERAIN Interface Engine
Overview: SASERAIN Interface Engine
The SASERAIN interface engine enables SAS users to retrieve weather data from the World Weather Online website. This website offers access to time series of weather data such as temperature, precipitation (rainfall), weather description, weather icon, and wind speed. These time series are updated at intervals that the user selects. The weather time series on the World Weather Online website contain observation or measurement periods that are associated with data values.
The SASERAIN interface engine uses the LIBNAME statement to enable you to download World Weather Online data and to specify which weather data time series you want to retrieve based on location. You can then use the SAS DATA step to perform further subsetting and to store the resulting time series in a SAS data set.
There are two types of major weather application interfaces (APIs) that return World Weather Online data for the SASERAIN engine. The first type is a local weather API that returns forecasting data and current conditions data, which usually start with today and end with tomorrow’s forecast. You can request up to 15 days of premium local weather forecast data. The SASERAIN engine supports only the premium local weather API because World Weather Online has discontinued the nonpremium API. The default range for the SASERAIN engine is 2 days. You can use the premium local weather forecast API if you subscribe to the premium service and also specify your premium API key. The premium API key provides a maximum date range of 15 days.
The second type of API is a historical weather API that returns past weather. When you have a premium subscription, you can use a range that starts as early as July 1, 2008.
When no dates are specified, the default type of data that the SASERAIN interface engine returns is the local forecast weather data. Note: The SASERAIN interface uses the past weather API whenever a range of dates is specified by a start date and an end date.
You can choose to retrieve the following types of data for a single location or multiple locations:
current conditions only
local weather forecast only
both current conditions and the local weather forecast
24-hour weather forecast only (the frequency is auto-set to 3 hours over one 24-hour period)
historical (past) weather for a specified date range
The SASERAIN interface engine supports Linux X64 (LAX) and Windows. Although the SASERAIN engine uses the World Weather Online API, it is not endorsed or certified by World Weather Online. By using the SASERAIN interface engine, you are agreeing to comply with the World Weather Online terms of use, which are described on the web page at the following URL:
https://www.worldweatheronline.com/terms-and-conditions.aspx