Git Product home page Git Product logo

tweetmigration's Introduction

Tweet Migration

A WebGL visualization of global Twitter activity

Running

  1. Create a config.json file as described below, then run the following commands:

  2. Install dependencies

    npm install
    
  3. Start the server

    node server.js
    

Configuration

A config.json must be provided in the root of the project.

Required configuration parameters

consumer_key (String)

Your Twitter consumer key.

consumer_secret (String)

Your Twitter consumer secret.

access_token_secret (String)

Your Twitter access token secret.

Optional configuration parameters

debug (Boolean) = false

Show debug information. Logs every tweet to the console.

port (Number) = 3000

The port to run the server on. Overridden by the PORT environment variable.

Sample config.json

{
	"consumer_key": "fsq4YbjfXuQWJRs01XatGR",
	"consumer_secret": "lzXoLOGzxGYeItJ327BGSLcNmZcmPft62x0tHuZYmad",
	"access_token_key": "35870660-0250Io0UYm5NHG6QgM7bq7h9aChvA30FIBYV0j1q,",
	"access_token_secret": "RFabG3sgMgg9DlwoWRZrQRIizQZultYvo2Ek9C0Xp",
	"debug": false,
	"port": 8080
}

Credits

  • Concept, globe, and initial code by Aysegul Yonet
  • Heatmap and streaming server by Larry Davis
  • Earth textures by James Hastings-Trew

Technology

License

BSD license, Copyright © 2013 Aysegul Yonet

tweetmigration's People

Contributors

lazd avatar yonet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

tweetmigration's Issues

Client for historical tweet streaming API

Should be capable of changing parameters, establishing connection, and emitting events.

Will update simulation and heatmap:

  • Sun moves according to selected date
  • Tweets stream given the selected date

Reconnect after admin_logout

After over 1 million tweets, the steam will sometimes return:

{
   disconnect:{
      code:7,
      stream_name:'tevgende-statuses228512',
      reason:'admin logout'
   }
}

The server should reconnect and continue streaming when this happens.

This seems to happen when running locally.

Implement historical tweet streaming API

The API should return a stream from the start date until real time.

  • Start streaming tweets after startDate that match filter
  • Streams in simulated real-time
  • Streams tweets as they would have came in
  • Can be fast-forwarded up to real-time and rewound to start of history

Configuration Parameters

startDate

UTC time in milliseconds. Must be in the past. Defaults to real time.

locations

A comma-separated list of longitude,latitude pairs specifying a set of bounding boxes to filter Tweets by as defined by the Twitter streaming API.

track

A comma-separated list of phrases which will be used to determine what Tweets will be delivered on the stream as defined by the Twitter streaming API.

Return a stream from the start date until real time.

Respond to socket events

setStartDate

Set the date to stream from in milliseconds. Send -1 for real-time streaming.

setTrack

Set the track option with the provided track string.

setLocations

Set the locations option with the provided locations string.

setSpeed

Set the playback speed multiplier to speed up or slow down the stream

Graph for volume of tweets per minute

Frontend

A stock market like graph should trace the timeline indicating tweets per minute since the start time and updated in real time.

Backend

Calculate tweets per minute for minutes since start date using Mongo aggregator

Technology

Consider Smoothie Charts

Timeline control in UI to historical streaming API start date

Exposes the following UI controls

  • date - Text input of type date to specify stream date
  • time - Input of type range to specify stream time. Moves according to playback
  • speed - Select menu for playback speed

When any parameters change

  • Update stream to reflect changed parameters

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.