Taxonomy Icon

IoT

Create a web app to analyze and visualize IoT device data

Get the code View the demo Get the app

Summary

IoT devices often create a lot of data in a short period of time. The IBM Watson IoT Platform offers great extensions for storing the data directly in a database on your IBM Cloud. After you stored your IoT data in a database, you can create an application to analyze and view your data through various plots or graphs.

In this code pattern, you set up a Cloudant database to receive IoT data and then create an application to view and analyze the data. The application uses a Python backend that reads and performs analysis on the data and sends the data to a JavaScript frontend where the application uses plotly.js to create interactive plots for the data. These plots include viewing raw data across days, viewing hourly stats and trends, comparing devices data, and viewing any correlation plots.

Description

Companies are continuously looking for ways to analyze the massive amounts of data generated by IoT devices. Stakeholders for IoT devices would like to view trends in the data to see the value increasing (or decreasing) over time. Additionally, stakeholders need to be able to view any patterns in the data like higher values on certain periods of time and to view any anomalies in data.

In this code pattern, you will create an application to view plots and trends of IoT device data. These plots can help the data scientist to decipher the IoT data and discover insights into the behavior of the IoT devices across time. The plots include viewing device data for a single day and across days, viewing hourly stats and trends, comparing device stats across days, and viewing correlations among device fields. The application uses plotly.js for creating interactive plots that can be enhanced, saved, and updated by the user.

When the reader has completed this code pattern, they will understand how to:

  • Store IoT data directly into a Cloudant database using Watson IoT Platform
  • Create an application to read and analyze the IoT data from the Cloudant database
  • Use plotly.js to create visualizations of the data

Flow

flow

  1. The IoT data is stored in Cloudant database as daily buckets.
  2. The data from Cloudant is used to create plotly.js visualizations.
  3. The plot is displayed through the web UI based on user requests.
  4. The user can view the plots and perform analysis on each plot through the web UI.

Instructions

Find the detailed steps for this pattern in the README. The steps show you how to:

  1. Create the IoT app on IBM Cloud.
  2. Register and simulate devices on IoT Platform.
  3. Create the Cloudant database on IBM Cloud.
  4. Configure the Cloudant DB as a data store for IoT device data.
  5. Run the web app.
  6. Deploy the app to IBM Cloud.