Waxy.org
Waxy.org is the sandbox of Andy Baio. I run XOXO, built Playfic and Supercut, helped build Kickstarter, founded Upcoming, made an album, and some other stuff too.

Contact Me: Email, AOL IM, or follow me on Twitter.

ThinkBack, Playing with ThinkUp's New API

Posted May 3, 2011

The newest beta of ThinkUp adds an API to the app for the first time, allowing developers to easily build apps on top of data coming from ThinkUp.

The JSON API was created by Sam Rose, a 20-year-old student from Wales and an active contributor in the ThinkUp community. His 7,000 line contribution -- composed of 40% new tests and 40% documentation -- earned him first place in the ThinkUp bounty contest and a brand new iPad 2. Congrats, Sam!

I thought it'd be fun to try building a hack with his new API, so I made a simple visualization of your entire Twitter archives in ThinkUp — ThinkBack, a ThinkUp-powered time capsule. Take a look at my history, or on the @whitehouse account to get the gist.



ThinkBack analyzes your entire Twitter history, extracts entities from the text, and colors them based on category. Grouped by month, it also gives you a quick glimpse at your posting activity over time.



For the entity extraction, I used an excellent free web service called AlchemyAPI to extract people, places, events, product names and other keywords from everything I've ever posted. They provide a category for each, which I assigned a color.

I also tested two other free web services that offer entity extraction, text-processing.com and Zemanta. Finding and categorizing keywords from short status updates is no small feat, but AlchemyAPI does a remarkable job. (If you'd like to play around with all three, support for both Zemanta and text-processing.com is commented out in the source code, but easily swappable with AlchemyAPI.)

ThinkBack also uses four typefaces from Google Web Fonts, my first time using them and dead simple to implement. For free fonts, the quality's surprisingly great, with several faces commissioned by Google itself. For a quick, free hack, it's a great alternative to Typekit.

I also used a very simple PHP templating language called RainTPL, which I chose as a lightweight alternative to Smarty. In practice, I found it too simple. Its handling of complex data structures and loops required me to jump through hoops that shouldn't be necessary. (I'll stick with Smarty next time.)


Anyway, you can download the code here, it only requires PHP and access to a recent version of ThinkUp. Feel free to fork it and submit a pull request for anything you add!

1 Comments (Add Yours)

Jun 28, 2012
10:21 AM  
Jakes wrote:

Great use of the API, I've tried on on about 10 of our accounts in the last 20min and it's visually stunning. I was wondering, do you know of other examples of the API being used. I've been googling but haven't really found anything. We've got two devs but they're pretty useless in the imagination department so I'd love to throw some examples at them to get their juices flowing.


 

Leave a comment





Waxy Links
Ads via The Deck
June 17, 2013
Battle for the planet of the APIs — "If those services don't trust me enough to give me an RSS feed, why should I trust them with my data?"
Edward Snowden live Q&A — Cosmo asks the tough questions
June 15, 2013
Instant Server — intantly spin up an Ubuntu server with a built-in terminal for 35 free minutes (via)
June 14, 2013
Google's Project Loon — high-altitude balloons with Internet access for rural and remote areas (via)
Matt Haughey on Gmail's Organized Inbox — just enabled it, and it's instantly useful
The Internet of Actual Things — "Your light bulbs will narrate their agonizing deaths."
Sci-Fi Corridor Archive — so many octagons (via)
We See In Every Direction — Jonas Lund built a massively-multiplayer web browser (via)
Filmmaker sues to prove Happy Birthday To You is public domain — and, best of all, they want Warner to pay back millions in undeserved licensing fees
NYT on how Yahoo tried to fight PRISM in court — related: the story of one CEO that defied NSA wiretap orders
June 13, 2013
Profile of NYC teen who speaks 20 languages — part of THNKR's prodigy series (via)
Apple's short film on the personal impact of four iOS apps — helps to explain why this app can cost $220 and still have four stars
Wemoji — reenact emoji icons with your webcam; more unlock as photos are added
Foursquare Time Machine — don't miss the infographic it generates in the "Share My Stats" section
Stamen's Map Stack — powerful photo filters for map design
Venus Patrol's Horizon press conference — stunning lineup of upcoming artful indie games, an antidote to E3 ego and bluster
Jony Ive Redesigns Things — apparently, I started a meme
George Lucas and Steven Spielberg on the future of film — "out of that chaos will come some really amazing things... because all the gatekeepers have been killed!"
John Martz ends Drawn — don't know how I missed this, but I'm sad to see it go
June 12, 2013
Kyle McDonald's Caricature — automatically generating caricatures based on motion
Geek vs. Nerd — analyzing 68k tweets to see how the terms are used
June 11, 2013
Author Hugh Howey on the future of self-publishing — widely applicable across all indie art and tech
ScummVM ported to Javascript — ported with Emscripten, audio's Firefox-only for now
Frank Chimero on the iOS 7 redesign and perspective — also, Leo Drapeau's quick icon redesign
In Defense of Art Games — fantastic Ignite talk by Owen Goss; links to the cited games
June 10, 2013
The Pirate Cinema — turning film torrents into a cut-up art installation
Dan Sinker on getting his phone tapped in 1999 — not a great feeling
Apple's major WWDC announcements — new iOS and OS X, free ad-supported Pandora competitor
Edward Snowden, NSA whistleblower, outs himself — don't miss the video
June 6, 2013
Why phone call metadata matters — who you call is often as significant as what you say

Andy Baio lives here. Some rights reserved, for your pleasure.