How to add Weather Data to SAS Visual Data Mining & Machine Learning

Weather data plays an important role in Data Mining and machine learning . For one it enables discovery of correlations between business metrics and weather measures which then can be used to predict your business based on the weather forecast. On the other hand weather data provides great datasets to train and verify your models.

This article will show how to utilize the Visual Crossing Weather Data within the SAS Viya Data Studio and the SAS Viya Model Studio to build a simple weather based model.

Step 1 – Create a suitable weather data set on

Follow the steps to load a bulk weather data set as outlined in the How to load weather data into SAS Visual Analytics or SAS Visual Statistics tutorial or load it directly into a CASLib using Cloud Analytic Services (CAS) actions via REST API .

Step 2 – Log into SAS Viya and build a model

In the SAS Data Studio select the ‘Build Model’ entry from the ‘Analytics Life Cycle’ menu.

This will take you to the SAS Model manager where you can select an existing or create a new project by hitting the corresponding button.

In the ‘New Project’ editor fill the ‘Name’ field, select the ‘Model Function’ from the drop down and hit the ‘Save’ button.

Within the new or existing project you can now set create your model. To do so hit the ‘New Model’ button in the top right corner of your project view

Step 3 – Add variables and data to your model

Go to the variables tab, click the ‘Add Variable’ button and select ‘Data table’ from the drop down.

In the ‘Choose Data’ editor select the uploaded or linked weather data set and hit the ‘OK’ button.

Now select the ‘Variable Type’ and variables of interest from the ‘Available Items’ list and hit OK again.

Step 4 – Start using your model for example in a descision

Navigate to the ‘SAS Intelligent Decisioning’ and open the ‘Decision Flow’ tab in the decision that has weather implications.

In the flow builder open the ‘Add’ menu and select your weather model from the opening selection dialogue when selecting the ‘Model’ entry.

Thank you very much and please let us know if you have any question regarding the use of Visual Crossing Weather in the context of the SAS Viya environment.

Scroll to Top