Giter Club home page Giter Club logo

twitter-stream-globe's Introduction

tweet-stream-globe

A real-time 3D visualization of Tweets from around the world.

This web app attaches to the Twitter API stream/filter and runs rudimentary sentiment analysis on Tweets with geo data. Tweets are published via PubNub Websockets and plotted to a 3D globe.

Inspired by the Web GL Globe Chrome Experiment and the PubNub Real-Time WebGL Visualization.

![Screenshot](screenshot.png?raw=true =858x "Screenshot") Video Capture | Running Demo (Availability of this server may fluctuate)

Installing and Running

Install Node.js.

Clone GitHub repo:

https://github.com/twitterdev/twitter-stream-globe.git

Create a Twitter app and PubNub account:

Create a config.json file using config.sample.json as a template. Fill in your Twitter App API and PubNub keys.

Optionally, install the Compass Ruby Gem.

gem install compass

If you do not want Compass support, comment out this line in app.js

// app.use(require('node-compass')({mode: 'compress'}));

Install node module dependencies:

npm install

Run application:

npm start

Go to http://localhost:3000 in your browser.

Deploying

This application is ready to run on a free Cloud Foundry, OpenShift or Heroku account.

Heroku

You can deploy to Heroku via Git with the Heroku toolbelt.

Before deploying to Heroku, set your environment config vars to mirror config.json, and set NODE_ENV to "production."

image

Tip: Managing the Twitter stream is more appropriately accomplished with a worker or background job. See this gist for setting up a Twitter / PubNub worker on Heroku.

OpenShift

You can deploy to OpenShift with rhc, by adding your own keys to the following command:

rhc app create twglobe nodejs-0.10 \
  --from-code=http://github.com/twitterdev/twitter-stream-globe.git \
  NODE_ENV=production \
  TWITTER_CONSUMER_KEY=YOUR_TWITTER_CONSUMER_KEY \
  TWITTER_CONSUMER_SECRET=YOUR_TWITTER_CONSUMER_SECRET \
  TWITTER_ACCESS_TOKEN=YOUR_TWITTER_ACCESS_TOKEN \
  TWITTER_TOKEN_SECRET=YOUR_TWITTER_TOKEN_SECRET \
  PUBNUB_PUBLISH_KEY=YOUR_PUBNUB_PUBLISH_KEY \
  PUBNUB_SUBSCRIBE_KEY=YOUR_PUBNUB_SUBSCRIBE_KEY

Cloud Foundry

You can deploy to a Cloud Foundry instance with the cf command line tool.

Edit out the line for Compass support (see above) in app.js.

Copy manifest.sample.yml to manifest.yml, edit the application name, and then insert your Twitter and PubNub API keys.

Run cf push to deploy and start the app on Cloud Foundry.

Resources

twitter-stream-globe's People

Contributors

jcipriano avatar professorhantzen avatar andypiper avatar ryanj avatar

Watchers

 avatar

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.