Note: This pattern is part of a composite pattern. These are code patterns that can be stand-alone applications or might be a continuation of another code pattern. This composite pattern consists of:
- Take corrective actions at the edge based on predictive analytics of IoT sensor data
- Detect change points in IoT sensor data (this pattern)
- Predict equipment failure using IoT sensor data
In statistical analysis, time series data consists of a sequence of data points that you can monitor and analyze over time: stock market closing values, daily high and low temperatures, social media posts. This developer journey shows you how to use IoT sensor data, IBM Watson Studio, and R software for statistical computing to analyze the data and detect change points.
The world is awash in data. More and more devices are now connected, whether for social interactions or remote monitoring and management. Auto manufacturing, weather forecasting, power grids – no aspect of our lives remains untouched by the Internet of Things. Gone are the days when a technician needed to inspect a rooftop air conditioning unit onsite to physically identify issues. No longer does a manufacturer have to wait for a finished part to manually pass a quality test to find defects.
But how do we predict failing equipment in a remote store thousands of miles away? Can we predict equipment failure and initiate a corrective action before any breakdowns occur? And can we provide those proactive responses in real time? Can we overcome the challenges of geographic distribution to improve our work and personal lives? The answer, of course, is yes.
Developers need to know how to find that kind of insight in data. This code pattern shows you how to detect when a change point occurs in time series data from an IoT sensor. You will compute statistical parameters from time series data, comparing a data set for a previous time range with a current time range. The statistical comparison between these two data sets enables you to detect any change points. You’ll use the R statistical analysis project and sample sensor data that you will load into the IBM Watson Studio cloud.
When you complete this pattern, you will understand how to:
- Read sensor data for a single sensor.
- Extract two time series data sets (one in the past and another in the present).
- Compress the data sets by translating them into statistics that accurately describe their characteristics.
- Compare the statistics, quantify them, and analyze the comparisons to detect change points in the data.
- Sign up for IBM Watson Studio.
- Create IBM Cloud services.
- Create a Node-RED app and inject IoT data.
- Create the Jupyter notebook.
- Add the data and configuration files.
- Update the Jupyter notebook with service credentials.
- Run the notebook.
- Download the results.
Ready to put this code pattern to use? Complete details on how to get started running and using this application are in the README.
- Log into IBM Cloud and create IBM Cloud services.
- Create Node-RED Application to load IoT data into DB2 table.
- Read IoT data from the sample csv file.
- Import the sample data into a DB2 table using the Node-RED flow.
- Configure the parameters in .json dsx configuration file.
- In R notebook flow, update credentials to read relevant Sensor data subset from the DB2 table.
- In Watson Studio, R runs on Spark engine to ensure scalability and performance.
- Store the configuration file in Object storage.