All Projects → IBM → node-red-dsx-workflow

IBM / node-red-dsx-workflow

Licence: Apache-2.0 license
This journey helps to build a complete end-to-end analytics solution using IBM Watson Studio. This repository contains instructions to create a custom web interface to trigger the execution of Python code in Jupyter Notebook and visualise the response from Jupyter Notebook on IBM Watson Studio.

Programming Languages

Jupyter Notebook
11667 projects

Projects that are alternatives of or similar to node-red-dsx-workflow

detect-timeseriesdata-change
WARNING: This repository is no longer maintained ⚠️ This repository will not be updated. The repository will be kept available in read-only mode.
Stars: ✭ 21 (-19.23%)
Mutual labels:  node-red, bluemix, ibm-developer-technology-cloud, ibmcode
visualize-data-with-python
A Jupyter notebook using some standard techniques for data science and data engineering to analyze data for the 2017 flooding in Houston, TX.
Stars: ✭ 60 (+130.77%)
Mutual labels:  bluemix, dsx, ibmcode
ibm-cloud-functions-serverless-ocr-openchecks
Serverless bank check deposit processing with object storage and optical character recognition using Apache OpenWhisk powered by IBM Cloud Functions. See the Tech Talk replay for a demo.
Stars: ✭ 40 (+53.85%)
Mutual labels:  bluemix, ibm-developer-technology-cloud, ibmcode
banking-digitalization-using-hybrid-cloud-with-mainframes
The following journey will introduce the available Banking APIs published on IBM Cloud with logical business programs running on the IBM Z Mainframe through a simulated retail bank called MPLbank.
Stars: ✭ 21 (-19.23%)
Mutual labels:  bluemix, ibm-developer-technology-cloud, ibmcode
Cognitive Social Crm
An application that monitors a Twitter feed and determines customer sentiment using IBM Watson Assistant, Tone Analyzer, Natural Language Understanding, as well as CloudantDB
Stars: ✭ 71 (+173.08%)
Mutual labels:  bluemix, ibmcode
ibm-cloud-functions-rest-api-trigger
IBM Cloud Functions building block - HTTP REST Trigger - This project provides a starting point for handling events from REST API calls with IBM Cloud Functions powered by Apache OpenWhisk.
Stars: ✭ 17 (-34.62%)
Mutual labels:  bluemix, ibm-developer-technology-cloud
Gameon Java Microservices On Kubernetes
This code demonstrates deployment of a Microservices based application Game On! on to Kubernetes cluster. Game On! is a throwback text-based adventure built to help you explore microservice architectures and related concepts.
Stars: ✭ 88 (+238.46%)
Mutual labels:  bluemix, ibmcode
Serverless Home Automation
WARNING: This repository is no longer maintained ⚠️ This repository will not be updated. The repository will be kept available in read-only mode.
Stars: ✭ 38 (+46.15%)
Mutual labels:  bluemix, ibmcode
watson-multimedia-analyzer
WARNING: This repository is no longer maintained ⚠️ This repository will not be updated. The repository will be kept available in read-only mode. A Node app that use Watson Visual Recognition, Speech to Text, Natural Language Understanding, and Tone Analyzer to enrich media files.
Stars: ✭ 23 (-11.54%)
Mutual labels:  bluemix, ibmcode
Scalable Cassandra Deployment On Kubernetes
In this code we provide a full roadmap the deployment of a multi-node scalable Cassandra cluster on Kubernetes. Cassandra understands that it is running within a cluster manager, and uses this cluster management infrastructure to help implement the application. Kubernetes concepts like Replication Controller, StatefulSets etc. are leveraged to deploy either non-persistent or persistent Cassandra clusters on Kubernetes cluster.
Stars: ✭ 184 (+607.69%)
Mutual labels:  bluemix, ibmcode
Scalable Wordpress Deployment On Kubernetes
This code showcases the full power of Kubernetes clusters and shows how can we deploy the world's most popular website framework on top of world's most popular container orchestration platform.
Stars: ✭ 173 (+565.38%)
Mutual labels:  bluemix, ibmcode
Kubernetes Container Service Gitlab Sample
This code shows how a common multi-component GitLab can be deployed on Kubernetes cluster. Each component (NGINX, Ruby on Rails, Redis, PostgreSQL, and more) runs in a separate container or group of containers.
Stars: ✭ 240 (+823.08%)
Mutual labels:  bluemix, ibmcode
watson-document-classifier
Augment IBM Watson Natural Language Understanding APIs with a configurable mechanism for text classification, uses Watson Studio.
Stars: ✭ 41 (+57.69%)
Mutual labels:  dsx, ibmcode
Cognitiveconcierge
WARNING: This repository is no longer maintained ⚠️ This repository will not be updated. The repository will be kept available in read-only mode.
Stars: ✭ 100 (+284.62%)
Mutual labels:  bluemix, ibmcode
node-red-bluemix-nodes
A collection of node-red nodes for the IBM Bluemix platform
Stars: ✭ 32 (+23.08%)
Mutual labels:  node-red, bluemix
Java-MicroProfile-on-Kubernetes
This application demonstrates the deployment of a Java based microservices application using Microprofile on Kubernetes Cluster. MicroProfile is a baseline platform definition that optimizes Enterprise Java for a microservices architecture and delivers application portability across multiple MicroProfile runtimes
Stars: ✭ 76 (+192.31%)
Mutual labels:  ibm-developer-technology-cloud, ibmcode
Node Red
Low-code programming for event-driven applications
Stars: ✭ 13,609 (+52242.31%)
Mutual labels:  node-red
node-red-contrib-discord
Node-red nodes that allow you to interact with Discord.
Stars: ✭ 15 (-42.31%)
Mutual labels:  node-red
node-red-contrib-nora
Node Red Google Home integration
Stars: ✭ 77 (+196.15%)
Mutual labels:  node-red
node-red-contrib-homematic
🏠 Control your Homematic devices using Node-Red
Stars: ✭ 18 (-30.77%)
Mutual labels:  node-red

Orchestrate data science workflows using Node-RED

Create a web interface using Node-RED to trigger an IBM Watson Studio analytics workflow

Data Science Experience is now Watson Studio. Although some images in this code pattern may show the service as Data Science Experience, the steps and processes will still work.

IBM Watson Studio can be used to analyze data using Jupyter notebooks. There is no mechanism exposed by Watson Studio to trigger execution of the notebook cells from outside. If this capability is added, we can build a complete end to end analytics solution using IBM Watson Studio.

The below two requirements are addressed by this journey to help build a complete analytics solution with IBM Watson Studio.

  • Trigger the execution of Python code in a Jupyter Notebook on IBM Watson Studio from a custom web user interface
  • Visualize the response from the Python code execution in a Jupyter Notebook on IBM Watson Studio on the custom web user interface

We will use Node-RED to invoke the analytics workflows in Jupyter notebooks on IBM Watson Studio and also to render a custom web user-interface with minimal programming.

What is Node-RED?

Node-RED is a tool for wiring together APIs and online services on IBM Cloud. The APIs and online services are configured as nodes that can be wired to orchestrate a workflow. It is also a web server where the UI solution can be deployed. It has nodes that support integration with many database services, watson services and analytics services.

Node-RED reduces a lot of development effort. It is easy to improve the solution using other services with Node-RED. It opens a world of possibilities for developers.

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

  • Create and run a Jupyter notebook in Watson Studio.
  • Use Object Storage to access data files.
  • Use Python Pandas to derive insights on the data.
  • Develop a custom web user interface using Node-RED.
  • Triggering an analytics workflow on Watson Studio from the UI using Node-RED.

The intended audience for this journey are developers who want to develop a complete analytics solution on Watson Studio with a custom web user interface.

  1. The Object storage stores the data.
  2. Data is utilized as csv files.
  3. The Jupyter notebook processes the data and generates insights.
  4. The Jupyter notebook is powered by Spark.
  5. The Node-RED hosts a websocket server that is a medium of communication between the Jupyter notebook on IBM Watson Studio and Web UI.
  6. The Node-RED hosts a web server that renders the Web UI.

Included components

  • Node-RED: Node-RED is a programming tool for wiring together APIs and online services.

  • IBM Watson Studio: Analyze data using RStudio, Jupyter, and Python in a configured, collaborative environment that includes IBM value-adds, such as managed Spark.

  • IBM Cloud Object Storage: An IBM Cloud service that provides an unstructured cloud data store to build and deliver cost effective apps and services with high reliability and fast speed to market.

  • Jupyter Notebooks: An open-source web application that allows you to create and share documents that contain live code, equations, visualizations and explanatory text.

Featured technologies

  • Data Science: Systems and scientific methods to analyze structured and unstructured data in order to extract knowledge and insights.

Watch the Video

Steps

Follow these steps to setup and run this developer journey. The steps are described in detail below.

  1. Sign up for Watson Studio
  2. Create IBM Cloud services
  3. Import the Node-RED flow
  4. Note the websocket URL
  5. Update the websocket URL in HTML code
  6. Create the notebook
  7. Add the data
  8. Update the notebook with service credentials and websocket URL
  9. Run the notebook
  10. Analyze the results

1. Sign up for Watson Studio

Sign up for IBM's Watson Studio. By signing up for Watson Studio, an Object Storage service will be created in your IBM Cloud account.

2. Create IBM Cloud services

  • Create the Node-RED Starter application.

  • Choose an appropriate name for the Node-RED application - App name:.

  • Click on Create.

    • On the newly created Node-RED application page, Click on Visit App URL to launch the Node-RED editor once the application is in Running state.
    • On the Welcome to your new Node-RED instance on IBM Cloud screen, Click on Next.
    • On the Secure your Node-RED editor screen, enter a username and password to secure the Node-RED editor and click on Next.
    • On the Browse available IBM Cloud nodes screen, click on Next.
    • On the Finish the install screen, click on Finish.
    • Click on Go to your Node-RED flow editor.

3. Import the Node-RED flow

  • Clone this repo.
  • Navigate to the orchestrate_dsx_workflow.json.
  • Open the file with a text editor and copy the contents to Clipboard.
  • On the Node-RED flow editor, click the Menu and select Import -> Clipboard and paste the contents.



Deploy the Node-RED flow by clicking on the Deploy button

4. Note the websocket URL

The websocket URL is ws://<NODERED_BASE_URL>/ws/orchestrate where the NODERED_BASE_URL is the marked portion of the URL in the above image.

Note:

An example websocket URL for a Node-RED app with name myApp is ws://myApp.mybluemix.net/ws/orchestrate, where myApp.mybluemix.net is the NODERED_BASE_URL.

The NODERED_BASE_URL may have additional region information i.e. eu-gb for the UK region. In this case NODERED_BASE_URL would be: myApp.eu-gb.mybluemix.net.

5. Update the websocket URL in HTML code

Click on the node named HTML.

Click on the HTML area and search for ws: to locate the line where the websocket URL is specified. Update the websocket URL with the base URL that was noted in the Section 4:

var websocketURL = "ws://NODERED_BASE_URL/ws/orchestrate";

Click on Done and re-deploy the flow.

6. Create the notebook

7. Add the data

Add the data to the notebook

  • Please download the files - summer.csv and dictionary.csv from: https://www.kaggle.com/the-guardian/olympic-games.
  • Rename the file summer.csv to olympics.csv
  • From your project page in Watson Studio, click Find and Add Data (look for the 10/01 icon) and its Files tab.
  • Click browse and navigate to where you downloaded olympics.csv and dictionary.csv on your computer.
  • Add the files to Object storage.

8. Update the notebook with service credentials and websocket URL

Add the Object Storage credentials to the notebook

  • Select the cell below 2.1 Add your service credentials for Object Storage section in the notebook to update the credentials for Object Store.
  • Use Find and Add Data (look for the 10/01 icon) and its Files tab. You should see the file names uploaded earlier. Make sure your active cell is the empty one created earlier.
  • Select Insert to code below olympics.csv.
  • Click Insert Crendentials from the drop down menu.
  • If the credentials are written as credential_2 change them to credentials_1.

Update the websocket URL in the notebook

  • In the cell below 6. Expose integration point with a websocket client, update the websocket url noted in section 4 in the start_websocket_listener function.

9. Run the notebook

When a notebook is executed, what is actually happening is that each code cell in the notebook is executed, in order, from top to bottom.

Each code cell is selectable and is preceded by a tag in the left margin. The tag format is In [x]:. Depending on the state of the notebook, the x can be:

  • A blank, this indicates that the cell has never been executed.
  • A number, this number represents the relative order this code step was executed.
  • A *, this indicates that the cell is currently executing.

There are several ways to execute the code cells in your notebook:

  • One cell at a time.
    • Select the cell, and then press the Play button in the toolbar.
  • Batch mode, in sequential order.
    • From the Cell menu bar, there are several options available. For example, you can Run All cells in your notebook, or you can Run All Below, that will start executing from the first cell under the currently selected cell, and then continue executing all cells that follow.
  • At a scheduled time.
    • Press the Schedule button located in the top right section of your notebook panel. Here you can schedule your notebook to be executed once at some future time, or repeatedly at your specified interval.

For this Notebook, you can simply Run All cells. The websocket client will be started when you run the cell under 7. Start websocket client. This will start the communication between the UI and the Notebook.

10. Analyze the results

The UI can be accessed at the URL: http://<NODERED_BASE_URL>/dsxinsights. The <NODERED_BASE_URL> is the base URL noted in section Note the websocket URL.

Troubleshooting

See DEBUGGING.md.

License

This code pattern is licensed under the Apache Software License, Version 2. Separate third party code objects invoked within this code pattern are licensed by their respective providers pursuant to their own separate licenses. Contributions are subject to the Developer Certificate of Origin, Version 1.1 (DCO) and the Apache Software License, Version 2.

Apache Software License (ASL) FAQ

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].