Using IBM Watson Analytics to visualize data from Watson IoT Platform

Repeat the process to add more columns and then hide the data tray.

After simulating the real sensor data, skip to the Export a Cloudant database to csv section.

How do the sensor values of two devices compare over time?

How does the number of Rows compare by deviceId?

The device data is now being stored in Cloudant® NoSQL DB.

If you do not have over time as one of the options available, select any other similar visualization, such as over Year(timestamp), and modify the x-axis as shown in the image above.

Compare the number of devices per device type that reported during the interval to determine if devices from all device types report as expected.

Summarize the numerical parameters reported by all devices in a device type into a table to learn about the range of values sensed in the environment and gain a broad perspective of the sensed data.

Average/Min/Max of all reported sensor values

The simulator will pump real weather sensor data, from 17 weather stations located in the Haifa area, into your WIoTP organization. It will follow a simulated publishing interval in such a way that will reproduce real data collected by the real sensors during the period of a day.

deviceType dt1, dventType et1, data Key1 Val1

Example of how to build the visualization manually

Right-click on the new columns title and select an aggregation type (min/max/average).

How many deviceId are there?

What is the correlation between two sensors?

In the multiplier box select the deviceId parameter and select the relevant devices to display

Can I view a histogram of a sensor output

Copy the following link to a browser and follow it

How does the number of reports sent compare by device?

What is the trend of TEMP over time by deviceId?  Or

Use the link below to download the CSV file

When using a Cloudant NoSQL DB to store device data, three databases are automatically created by the connector. One database is created for the current bucket interval, one for the upcoming interval, and one configuration database. Design documents can be added to the configuration database and are copied to new databases as they are created. When the end of an interval is reached, device data is stored in the bucket database for the new interval, and a new database is created for the following interval.

and select all of the calculations that you added.

Note If popup windows are blocked by the browser, you might not see theConfirm Authorization. In that case, enable pop-ups in the browser and try again.

There is no question for this visualization. It must be built manually as described below.

Answer questions related to the device population, such as

Click time and set the desired interval.

property, click on it and select the relevant device id.

Select the Cloudant NoSQL DB service that you want to connect.

Click on your data asset and scroll down to the Create your own visualization section.

The CSV file is built by observing the JSON keys of the first 1000 Cloudant documents in the database (the first 1000 IoT events collected). If additional keys are used, they are ignored and not present in the CSV file.

Learn about correlations in the environment by comparing the measurements from two device sensors across all devices of the device type.

Summarize the numerical parameters reported by a specific device into a table to learn, for example, about the range of values sensed in the environment or about the sensors malfunctions.

In the Color section, select Measures and then select the desired properties.

Repeat the process to add more columns and then hide the data tray.

Mutually visualize the trend of two device sensors to gain more insight into the environment changes over time.

On the New Discovery Set tab, check the Create your own visualization section, and then select Summary.

There is no question for this visualization. It must be built manually as described below.

What is the Average/Min/Max of all reported sensor values?

What is the relationship between

WA enables filtering by both deviceId and time

1 comment onUsing IBM Watson Analytics to visualize data from Watson IoT Platform

Use theMultiplierbox, below the chart, and choose deviceId to present the charts side by side as shown below.

Breakdown of the devices per device type

Ask a question about your datais a natural language text field where you can enter text and get visualization suggestions from Watson Analytics.

/_design/csv/_list/cloudant.csv/cloudant.csv?include_docs=true

Name the new column, select the column for this calculation from the Columns drop down box, and click

Click on the plus sign near the Measures and select deviceId. Unselect all of the  irrelevant deviceIds.

The parameters can be changed manually, by clicking on the parameter name in the blue title of the chart. The drop-down list shows parameters that can be selected.

All available Cloudant NoSQL DB services within the same Bluemix space as the Watson IoT Platform service are listed in the Configure historical data storage section.

Create data asset in Watson Analytics.

In x-axis select d1_HaifaSensorTopic_NOX, in y-axis select d1_HaifaSensorTopic_NO2, and in points select _id.

Compare between two values of the same device over time

How does a specific device sensor value change over time?

After importing the data into Watson Analytics, the user can complete the following tasks

In the x-axis, select d1_HaifaSensorTopic_NOX, in the y-axis select d1_HaifaSensorTopic_NO2, and in points select _id.

Right-click on the new columns title and select an aggregation type (min/max/average).

In the resulting CSV file, all keys are appended with

What is the Average/Min/Max reported value?

In case you dont get a correct suggestion with the filter, try the question without the filter. Open the relevant diagram, click the Multiplier box below the diagram and select the deviceId parameter from the list. Uncheck all the irrelevant deviceIds.

The field names do not have to be written fully, as WA will try to guess the full field name, but the filter values (eg. 10101010) do have to be spelled fully and correctly.

You must belogged into post a comment.

If you want to analyze data from your own IoT devices, skip to the Export a Cloudant database to csv section. Otherwise, if you need to simulate data to learn about how the Watson IoT Platform device data can be analyzed using Watson Analytics, use one of the following two options below

How do the sensor values of the same device compare over time?

The resulting colored diagram includes only a limited subset of the devices as shown below

Note Only IoT events in JSON format are supported by this recipe.

In the bottom row below the chart, find the

Note TheCloudant service IDanddbNamemust be changed according to yourCloudant service IDand the selected database name. The cloudant service ID can be copied from the Cloudant management dashboard URL. The link downloads a file namedcloudant.csvthat includes the data.

What is the correlation between two sensors of a device?

Correlation between two sensors of a device

By using Watson Analytics, business users and developers can quickly unlock the value of the data generated by devices connected to the Watson IoT Platform.

For simulating real sensor data events against your WIoTP organizations, download the node.js device simulator script and follow the usage instructions

Here we evaluate the behavior of a specific device sensor, identifying the distribution of values sensed in the environment. We can use such visualization to learn about the environment sensed by the sensor as well as about potential malfunctions in the sensor.

Save the visualization for future use.

Click create new column plus sign button at the bottom right, and select

Constructing this diagram manually

Alternatively, the diagram can be built manually

Click the create new column plus sign button at the bottom right, and select

To view a pie chart, click onVisualizationon the left, and selectPie

Can I see a histogram of a sensors output?

Answer questions related to a device type summarizing sensor data from all devices of the device type, such as

What is the trend of TEMP over time by deviceId?  filtered by deviceId 10101010, 30303030

If the required diagram is not suggested automatically by Watson Analytics

Answer questions related to a specific sensor of a specific device, such as

Compare the trends of sensor readings of different devices, identifying relationships between the devices to detect anomalies, device malfunctions, and so on.

To sort the bars, right-click ondeviceIdin theBarsbox below the chart and selectSort-Descending by value.

Overwrite the default with the text from the followingdesign doc linkand click Create Document.

Alternatively, the diagram can be built manually

How does the number of deviceId compare by deviceType?

Recipes are community-created content. They are neither monitored nor endorsed by IBM. If you find inappropriate content, please useReport Abuseto let us know. For more information on community content, please refer to ourTerms of Use.

Select the visualization suggestion that best matches the request and open it. If it is not exactly what is needed, changes can be made manually.

Learn about correlations in the environment by comparing the measurements from two device sensors.

Counting the number of a reports made by a device to detect network conditions and other device-related issues.

How to build the visualization manually

and select all the calculations that you added.

Histogram of a device sensors output

section, select the bubble visualization.

Name the new column, select the column for this calculation from the

What is the Average/Min/Max reported value?

Save the visualization for future use.

What is the correlation between two sensors?

Another option to achieve the same result is to click on the parameter name at the bottom of the chart. Multiple lines are drawn (one per deviceId). The relevant deviceIds can be selected from the list.

Here we evaluate the behavior of a sensor across all devices in a device type, identifying the distribution of values sensed in the environment. We can use such visualization to learn about the environment sensed by the sensors as well as about limitations in the sensors.

You can use this recipe to analyze data from your own IoT devices, or to view ways to simulate real device data and use it for the analysis.

to duplicate the column. The new column is added at the right end of the data tray.

How do the sensor values of two devices compare over time?

As part of this recipe, we will create a Cloudant design document that implements a list function that will help us export the data into CSV format. This design document only supports transforming data collected from IoT devices in a JSON format.

In this view, only a number of devices can be displayed at once the resulting graph does not include all of the data.

This recipe is intended to business users and solution developers seeking to visualize and get insights from the data sent out by their organization IOT devices.

Note If you are not interested in simulating devices in your own WIoTP organization, download the pre-made CSV sample data that you can directly import in your Watson Analytics account. The CSV sample contains similar data to what would be produced by simulating real sensor data in your environment.

The .csv for importing directly into Watson Analytics cant be imported. Still trying to figure out why.

The IoT device data that is sent to the IBM® Watson™ IoT Platform can be collected and stored in Bluemix® using the IBM® Cloudant® NoSQL DB service. Here, we show how to connect the IoT Platform to the Cloudant service. Once the data is collected, we will show how to export the data into a CSV file that is then uploaded to Watson Analytics, enabling visualization and initial analysis of the device data. Device data is stored in Cloudant daily, weekly, or monthly databases, depending on selected bucket interval configured.

The (blank) column events that didnt specify the temperature can be removed by right-clicking on the column and selectingExclude, or by clicking the variable name of the columns below the chart, and unselecting the (blank) value.

When the desired visualization is achieved, it can be saved for later use, using the Save icon on the top panel.

Compare the number of reports sent by each device

On top of metadata, the CSV list function includes all sensor data that is sent by the device. The sensor data appears in the Cloudant document under the data key. For example

What is the correlation between two sensors of a device?

What is the Average/Min/Max of all reported sensor values?

Can I see a histogram of a device sensors output?

How do two sensor values of one device compare over time?

In the example above, the CSV file will include

over time by deviceId?  filtered by

Log in to Watson Analytics at m.

How does a specific device sensor value change over time?

Can I view a histogram of a device sensors output?

to duplicate the column. The new column is added at the right end of the data tray.

In case you dont get a correct suggestion with the filter, click theShow Nextlink at the right side of the page or try the question How many rows are there. Then, open the diagram, click on theMultiplierbox below the diagram and select the deviceId parameter from the list. Uncheck all the irrelevant deviceIds.

What is the relationship between

Configure Cloudant NoSQL DB as Historian Data Storage for IBM Watson IoT.

How does the number of Rows compare by

Count the number of devices that reported during the interval to detect whether devices report as expected.

How many reports did a device have?

Save the visualization for future use.

In this section we study the summary of sensor data reported by all devices of a device type, answering questions such as

Compare between the sensor values of devices over time

The CSV list function adds a separate Time and Date fields based on the Metadata Timestamp.

In this section we study specific parameters reported by a specific device, answering the following questions

After downloading the sample file, go to the Import the data into the Watson Analytics section.

Learn how the readings of a specific sensor of a specific device change over time, reflecting the changes in the environment over time. This can help with planning and problem detection.

Select the bubble visualization, in the

The Cloudant document and the resulting CSV file both include metadata about the device event, such as

If the required diagram is not suggested automatically by Watson Analytics, the most relevant diagram can be selected and then modified.

How many rows are there? filtered bydeviceId 10101010

deviceType_eventType_  such

Compare the activity level of devices based on the number of reports that each device has sent during the inspected interval.

In this section we will see how to learn about the population of IoT devices and answer questions such as

How a specific device sensor value changes over time

To build the visualization manually

Another way to view the data is to color dots per deviceID, as follows

The bottom row of the screen includes all of the data fields. Click deviceId and select the relevant deviceId.

What is the breakdown of the devices per device type?

This recipe is intended for business users and solution developers who want to visualize and get insights from the data that is sent out by their organization-controlled IoT devices. The recipe explains how to visualize and learn about the data sent out by IoT devices that are connected to the IBM Watson IoT Platform, by using the visualization tool Watson Analytics (WA). The recipe includes two main parts

With successful completion of configuring the Cloudant NoSQL DB to be used as the historian service for Watson IoT, the Historical Data Storage status shows as configured

Leave a Reply