Skip to content
This repository has been archived by the owner on Apr 20, 2021. It is now read-only.

ibm-watson-data-lab/Spark-Twitter-Watson-Dashboard

Repository files navigation

Spark-Twitter-Watson-Dashboard

This sample Spark Streaming application collects Twitter data and run analytics in real-time that compute the top hashtags as well as a distribution of the emotional tones (provided by Watson Tone Analyzer). Then results show on a live dashboard web app featuring dynamic graphics that update continuously.

Architecture:

Spark+Watson+Twitter Part 2 Architecture

Real-time dashboard:

Running Realtime dashboard

You can follow a detailed tutorial here

Deploy to IBM Cloud

The fastest way to deploy this application to IBM Cloud is to click the Deploy to IBM Cloud button below. If you prefer instead to deploy manually to IBM Cloud skip ahead to the next section.

Deploy to IBM Cloud

Don't have an IBM Cloud account? If you haven't already, you'll be prompted to sign up for an IBM Cloud account when you click the button. Sign up, verify your email address, then return here and click the the Deploy to IBM Cloud button again. Your new credentials let you deploy to the platform and also to code online with IBM Cloud and Git. If you have questions about working in IBM Cloud, find answers in the IBM Cloud Docs.

Build and Deploy Locally

Configure Cloud Foundry

If you haven't already:

  1. Install the Cloud Foundry command line interface.
  2. Follow the instructions at the above link to connect to IBM Cloud.
  3. Follow the instructions at the above link to log in to IBM Cloud.

Build

Note: This section is optional and only applies if you make changes to the application

To build the application, you need to use the gulp framework. The build handles the following tasks:

  1. Collect and copy various artifacts to the build area, like fonts, styles, and imgs.
  2. Compile all the js and jsx files into a bundle that can also execute on the browser (uses browserify).
  3. Minify the code and deploy it into the build area.

To start the build manually, call gulp build

Deploy

To deploy to IBM Cloud, simply:

$ cf push

Note: You may notice that IBM Cloud assigns a URL to your application containing a random word. This is defined in the manifest.yml file where the random-route key set to the value of true. This ensures that multiple people deploying this application to IBM Cloud do not run into naming collisions. To specify your own route, remove the random-route line from the manifest.yml file and add a host key with the unique value you would like to use for the host name.

Privacy Notice

Refer to https://github.com/IBM/metrics-collector-client-node#privacy-notice

Disabling Deployment Tracking

Deployment tracking can be disabled by removing the following line from server.js:

require("metrics-tracker-client").track();

Once that line is removed, you may also uninstall the metrics-tracker-client npm package.

License

Copyright [2015] [IBM Cloud Data Services]

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

About

Real-time dashboard for Twitter Sentiment analysis using Spark Streaming and Watson Tone Analyzer

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages