This article shows the necessary steps to quickly and easily load weather forecast data for any location of the world into the cloud solution ‘Information Builders ibi WebFOCUS’ for further analysis. The tutorial shows step-by-step how to construct the query in the Visual Crossing Weather web interface, how to access the automatically generated connection string and then create a data connection for the weather forecast results to analyze it in connection with your business data in your WebFOCUS App.
If you are interesting in how to import historical weather data into WebFOCUS , be sure to check out or weather history API.
Step 1 – open Visual Crossing Weather Data Services
Open the Visual Crossing Weather Data Services log-in page and sign into your Visual Crossing Weather account. If you don’t already have an account, you can sign up for a free trial on the same page. Signing up for a free trial account will give you immediate access to a full 15-day weather forecast for any location.
Step 2 – specify your locations
The first page will prompt you to add the locations to retrieve the weather forecast for. There are two options in the web interface to manually add locations. As direct entry of either the physical address in clear text or as bulk entry in form of a file upload. The following steps refer to the manual entry option for more details please see the Visual Crossing Weather Data Tutorial section. So you can simply enter the location you want to retrieve the weather forecast data for in the corresponding field and hit the ‘Choose forecast or historical data’ button.
Step 3 – Request Weather Forecast Data
On the next page you can select the type of data you want to download.
The options are forecast, weather history queries, historical data summary reports, and hourly data. This tutorial will continue with the daily forecast option. Please see those or reach out to us if you need more information on the other options or browse our tutorial and video section for more details.
Select the forecast option and click the ‘Request Weather Data’ button.
Step 4 – review the weather forecast data
The default view for the query results is the weather calendar. This view provides a simple overview of the result data. Note the location you filled in showing with more detail to make sure the address lookup picked the correct location.
Step 5 – Generate the Query string
To automatically generate a query string for your locations click the ‘Query API’ button
Step 6 – Select query options and copy the string
The query can retrieve data using GET, POST or ODATA. WebFOCUS supports all three variants for our tutorial we go with the GET option.
The ‘Content Type’ section allows to chose between CSV and JSON data format. The WebFOCUS REST interface support both formats. the default Format is JSON so in our scenario we select the JSON option. For JSON you can specify the ‘Location Output Mode’ as well. Please select the optin ‘Lookup’. Further information about the JSON structure is available under Weather API JSON result structure
Besides the unit group drop down (US, Metric, UK) you have additional option in the ‘More query options’ section. For the details please see our ‘Getting Started Guide’. To copy the query string to the clipboard click the ‘Copy full query’ button.
Step 7 – Copy the resulting query string
You can either select the query string and copy it manually or simply hit the ‘Copy full query’ button making sure you don’t miss a section. You can paste the string into a note pad or similar tool. in the next steps we need to copy it in to the WebFOCUS application.
Step 8 – Log in to WebFOCUS and define your data source
Login to WebFOCUS and hit the ‘GetData’ button
From the Server files list select the ‘REST’ option.
In the ‘Configure Connections’ editor hit the ‘New connection’ button and fill in the parameters:
‘Connection Name’ ( NOTE: do not use special characters or SPACE in the naming)
Base URL : copy the first part of your query string specifying the server to hit http://weather.visualcrossing.com/
The connection can be reused later on for example to define a datasource for historical weather or the average weather for your location.
Hit the ‘Test’ button to verify your settings and save your new connection by hitting the ‘configure’ button.
Step 9 – create a Synonym instance for your connection
To specify the details of your weather data request you need to create a synonym for the just defined REST connection.
Select the newly configured connection and hit the ‘Select’ button
The ‘Create Synonym for REST’ dialogue allows to fill in the details for this specific request.
Make sure the ‘Select REST’ Operation’ drop down is set to the GET option and fill in the rest of your query string (everything after http://weather.visualcrossing.com/ ……) in the ‘Service URL Extension’ section.
All other settings are optional except the ‘Synonym Name’ field at the bottom. Once that is filled hit the ‘Add’ button.
Step 10 – Start visualizing analyzing and connecting your data
WebFOCUS will automatically open the Designer web interface allowing immediate start of your analysis. You can start with visualizations or directly join in your business data to gain more insight of the dependency of your revenues or processes on weather information.
Questions or need help?
If you have a question or need help, please post on our actively monitored forum for the fastest replies. You can also contact us via our support site or drop us an email at firstname.lastname@example.org.