Git Product home page Git Product logo

spring-data-flow-twitter's Introduction

http://cloud.spring.io/spring-cloud-dataflow/

Installation

Launch local server

java -jar spring-cloud-dataflow-server-local-1.2.3.RELEASE.jar

Install kafka

brew install kafka

Launch kafka

zookeeper-server-start /usr/local/etc/kafka/zookeeper.properties & kafka-server-start /usr/local/etc/kafka/server.properties

Install Redis

Download https://redis.io/download

Compile

cd redis-XX/
make

Launch

./src/redis-server

Launch Dashboard

Dashboard link

http://localhost:9393/dashboard

Import applications (source/sink/processor)

Apps -> Bulk import http://bit.ly/Bacon-RELEASE-stream-applications-kafka-10-maven

Example project (Twitter analytics)

https://github.com/spring-cloud/spring-cloud-dataflow-samples/tree/master/analytics/twitter-analytics

Make twitter API keys and Token

https://apps.twitter.com

(1) dataflow:>stream create tweets --definition "twitterstream --consumerKey=<CONSUMER_KEY> --consumerSecret=<CONSUMER_SECRET> --accessToken=<ACCESS_TOKEN> --accessTokenSecret=<ACCESS_TOKEN_SECRET> | log"
Created new stream 'tweets'

(2) dataflow:>stream create tweetlang  --definition ":tweets.twitterstream > field-value-counter --fieldName=lang --name=language" --deploy
Created and deployed new stream 'tweetlang'

(3) dataflow:>stream create tagcount --definition ":tweets.twitterstream > field-value-counter --fieldName=entities.hashtags.text --name=hashtags" --deploy
Created and deployed new stream 'tagcount'

(4) dataflow:>stream deploy tweets
Deployed stream 'tweets'

Visualization

  • For real-time updates on language tags, select: Metric Type as Field-Value-Counters Stream as language Visualization as Bubble-Chart or Pie-Chart

  • For real-time updates on hashtags tags, select: Metric Type as Field-Value-Counters Stream as hashtags Visualization as Bubble-Chart or Pie-Chart

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.