Skip to content
alandipert edited this page Jul 15, 2011 · 15 revisions

Demo Application

Dynamic Twitter Application

Goal: Show off ClojureScript. Pull in tweets on a certain hashtag and organizing them in a meaningful way by discovering things about the tweets based on the content.

Features:

  • Build a network of people who tweet on a certain topic
    • Each node could be the twitter avatar
    • Nodes could be related (draw a line between?) if there is a mention or a retweet
    • Nodes could grow in size based on number of connections?
  • Sidebar with most popular tweets
    • Show the five most popular tweets based on retweets/mentions
  • Show history of the data
    • Display a timeline along the bottom
    • Scrub the timeline backwards to show each tweet as it is added

Example twitter data - passed to visualization callback

Tweets are a vector of maps. Vector will probably most likely maybe not never be not empty.

[{:from_user_id_str "386967"
  :profile_image_url "http://a2.twimg.com/profile_images/53769404/spiral_normal.jpg"
  :created_at "Fri, 15 Jul 2011 20:18:02 +0000"
  :from_user "ajlopez"
  :id_str "91964762916790272"
  :metadata {"result_type" "recent"}
  :to_user_id nil
  :text "The Clojure Daily is out! http://bit.ly/hZ7PWT \u25b8 Top stories today via @berngp @jneira @rrjanbiah @kazu_yamamoto @leontalbot"
  :id 91964762916790272
  :from_user_id 386967
  :geo nil
  :iso_language_code "en"
  :to_user_id_str nil
  :source "<a href="http://paper.li" rel="nofollow">Paper.li</a>"}
 {:from_user_id_str "94383535"
  :profile_image_url "http://a0.twimg.com/profile_images/672298480/6491_528444835196_4500150_31295637_2251323_n_normal.jpg"
  :created_at "Fri, 15 Jul 2011 19:37:37 +0000"
  :from_user "ahillelt"
  :id_str "91954592115462144"
  :metadata {"result_type" "recent"}
  :to_user_id nil
  :text "For all you Ruby fans out there, Matz has joined Heroku, a Ruby Cloud Hosting Company. Plus Heroku now supports Clojure apps in it's cloud."
  :id 91954592115462144
  :from_user_id 94383535
  :geo nil
  :iso_language_code "en"
  :to_user_id_str nil
  :source "<a href="http://twitter.com/">web</a>"}]

Open Questions

  • How to pull in tweets?
    • goog.net.Jsonp
    • We pull in tweets, remember the last one we saw, and call somebody's function with data if we see anything new
      • agents would be nice for this
        • timeline?
          • atom + our own timeline data structure
          • tweet consumer/plugin responsibility to store historical data?

Comments

Clone this wiki locally