Code Monkey home page Code Monkey logo

twinfluence's Introduction

#Influence

#Influence is a web app for visualizing major influencers on Twitter. Users may enter a hashtag query to generate models of popular tweets with that hashtag. Read more about #Influence on Medium.

Usage

#Influence is currently deployed on Amazon Elastic Compute Cloud. It can be accessed here.

To use #Influence, enter a popular hashtag into the search bar and press the "Go!" button. After a brief moment, you will be redirected to a result page bearing a stunning visualization of the top 5 most popular tweets with that hashtag. Clicking on any of them will reveal the top retweeters of that tweet, selected and sized by relative number of followers.

Future Work

Should you want to continue developing #Influence, here is some information to guide you:

Download and Installation

  1. Download the source code.
  2. Extract the code to your desired directory.
  3. Open the command line in the same directory and run:
    npm install --save
  4. You will be able to start the server locally by running: node bin/www
    from the same directory. Press Control-C to stop the server.
  5. You will be able to reach #Influence by pointing your browser at: localhost:3000

Code Tour

  • public/index.html: App homepage with initial search bar.
  • public/result.html: Result page displaying D3.js visualization.
  • public/javascripts/: Currently contains JavaScript for D3.js visualization. Add new JavaScripts here.
  • public/stylesheets/: Currently contains CSS for index.html and result.html. Add new StyleSheets here.
  • bin/www: Run this file with node to open an HTTP server on port 3000.
  • routes/index.js: Express router that handles page requests, Twitter API OAuth, and queries to the Twitter API.

Known Issues/Missing Features

  • #Influence currently supports only 1 user at a time due to resource contention over the twitter_data.json file. To support multiple simultaneous users, Twitter data would need to be returned to the frontend as a response from the Express router. It would need to be added to result.js, perhaps using Angluar.js.
  • The backend currently calls multiple queries to the Twitter API iteratively, causing the termination of all callbacks to complete at an indeterminate time. The current solution is to wait a fixed amount of time before redirecting the page. A better solution would be to call the Twitter queries in order, recursively.
  • #Influence could be more more useful by displaying more information about each Twitter user. It could derive this information by parsing Twitter account descriptions and classifying users by their predicted areas of expertise.
  • The current visualization packs retweeter circles into the entire tweet circle (upon clicking to expand a tweet). A more intuitive display might pack retweeter circles into the lower portion of the original tweet circle, reserving the upper portion for information about the original tweet/tweeter and links to relevant pages on Twitter. One solution in development involves packing the retweeter circles into a zoomable rectangular canvas contained in the lower portions of the original tweet circles.

Credits

Code Referenced

From mbostock

Wrapping Long Labels
Zoomable Circle Packing
Circle Packing in a Rectangle
Labeled Force Layout
Donut Multiples
Pie Multiples

From Dashing D3.js

SVG Group Elements and D3.js

Packages Used

Node.js
Express
D3.js
twit
jsonfile

About

Authors: Neal Kfoury, Neha Rathi, Yasu Saito, Jia You
Northwestern University
EECS 395/JOUR 490: Collaborative Innovation in Journalism, Media & Technology
Professors Zach Wise & Larry Birnbaum

twinfluence's People

Contributors

jiayou-jy avatar n-rathi avatar nakfoury avatar yasufumisaito 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.