Visualizing Real Time Stream Data using Node-RED

Visualizing Real Time Stream Data using Node-RED

Overview

Real-time analytics and visualization of stream data have become more vital to transform live data into actionable and valuable insights and to help users focus on their real data needs. Many modern technologies have emerged to manage volume and velocity of big data.

Node-RED dashboard provides real-time stream data visualization and data streaming analytics. In this blog, let us discuss about visualizing and analyzing random car speed data generated by Node-RED function programming. It is used to monitor the speed of the leading car via Node-RED dashboard data analytics.

Let us learn about creating random data generation for multiple objects, using multiple charts, sharing the results via social medias such as Twitter, and providing notification for speed ranges based on random data generated.

Pre-requisites

Download the following from the provided links:

Getting Started with Node-RED

To start Node-RED, perform the following:

  • Open your command prompt.
  • Start the Node-RED by using below command:
select

Note: For more details about installing Node-RED, refer our previous blog – Node-RED on Windows.

  • Browse your Node-RED local host IP with port number to view Node-RED workspace panel as shown in the below diagram:

select

Creating Node-RED Flow

To create a Node-RED flow, perform the following steps:

  • From the left panel, drag the required nodes from node palate and drop it into the workspace.
  • Connect all the nodes one by one as shown in the below diagram:

select

In this use case, the following nodes are used:

    • Inject node (time stamp) – To set time intervals
    • Function node – To pass each message
    • Debug node (Message payload) – To display payload of the message or entire message
    • Chart node – To create different type of charts
    • Notification node – To notify leading speed of the car
    • Twitter node – To tweet speed of a particular car in Twitter

Note: Drag and drop multiple chart nodes as this use case involves multiple charts.

  • Open inject node (timestamp) to set time intervals as shown in the below diagram:
    For example: If the time interval is set as 5 seconds, new data required for visualization and other processes will be uploaded every 5 seconds.

select

  • Open the main function node to create simple random data generator code as shown in the below diagram:

select

  • Open the chart nodes and create different chart types for different nodes as shown in the below diagram:

select

  • Click the notification node and set the time interval to notify current leading cars and its speed ranges as shown below:

select

Deploying Flow and Debugging

On successfully creating the flow, deploy the flow by clicking on Deploy on the top right corner.

On successfully deploying the flow, debug the flow as shown in the below diagram:

select

Viewing Results in Twitter

On successfully completing deploy and debug, speed range of that particular car will be tweeted in Twitter as shown in the below diagram:

select

Similarly, the results can be shared via Email and social networks on using the respective nodes.

Performing Data Stream Analytics

The speed ranges of the cars can be monitored in Node-RED dashboard. Multiple charts and multiple values can be displayed in the dashboard as shown in the below diagram for performing data analytics:

select

Conclusion

In this blog, we have discussed about random data generator function programming, multiple chart creation, dashboard analytics, notification, and posting results on Twitter. In our next blog, let us discuss some complex use cases with real time data stream analytics. To create IoT applications on Bluemix with Node-RED, refer our blog on IBM Bluemix with Node-RED IoT.

References

4144 Views 2 Views Today