Steve has junk in the trunk

Calling Scrabbled programmers

I’ve got a coding inquiry for you..

So I’m on the data team at the Star-Ledger and part of what I’m supposed to be doing here is creating data viz apps for the web. I’ve got a project I could use some help with, if y’all could lend your collective expertise…

Since snow stories tend to be king for web traffic, I wanted to create an interactive map for snowstorms.

I want to fashion it off of what this guy did: http://uksnowmap.com/

Here’s it in action: http://www.youtube.com/watch?v=Q2RKqfGve_0

What I’m wondering is how you would set up a script (presumbly in Java) to pull in live tweet data. Is that something you’ve ever worked with?

There’s more to it than that, such as having icons disappear after a certain time period and factoring in the intensity to how the icon displays, but I’m just trying to start with the basics. I’ll likely tweak his idea and make it my own anyways. Any thoughts on those aspects are welcome too.

I’m very much still a novice at all this, but I want to give myself a project that’s more ambitious than my current skill set.

Ideally, I’d be able to do this in Google Maps (as he has) and iFrame it into our site. Any thoughts?

Bookmark and Share

Comments

On 11/09/11 at 11:30 AM, John is hungry was all:
John is hungry

Java is most certainly not the way to go. Most likely you’d be building this entirely with javascript (which, despite the name similarity, is a completely different language in every respect). You’d poll twitter’s API every however many seconds (the video you linked is likely too fast and you’ll get blocked by twitter right quick) via JS and have another part of the JS update the DOM — either via an overlay on top of the map block, or within the map block itself (I believe maps has its own API for interacting with it).

This is definitely not beginner stuff, though. I’d start with simply reading up on how to access the Twitter API via javascript AJAX calls and try writing a small script that simply spits out tweets. From there, try adding in tweet filtering (e.g., looking for the word “snow”). Seperately, I’d build another little page to start playing with the Google maps API and using JS to interact with the map and edit it in real time. Then it’s on you to figure out how to get those pages working together.

Also, you may want to look into jQuery as there’s a good chance these APIs have been cleaned up a bit for use with the framework. Makes writing javascript a little easier and a little more cross-browser compatible.

On 11/09/11 at 11:40 AM, Steve has junk in the trunk was all:
Steve has junk in the trunk

Thanks Hutch. I know I’m in way over my head, but want to start playing around with this stuff. I typically need a project or a goal to work towards to learn what I need. Thankfully, I’ve got several months to do it.

On 11/09/11 at 12:14 PM, John is hungry was all:
John is hungry

Sure! You should send me some stuff as you progress.

On 11/09/11 at 01:21 PM, Steve has junk in the trunk was all:
Steve has junk in the trunk

Absolutely. I’ll be working with the rest of my team on this, so I’m not in the woods alone.

But yeah, certainly a lot of individual issues to address. I think we’re going to put it on bitbucket to collab privately and maybe open source it on github once we’re closer. I’ll pass along any troubleshooting or tangible progress as we go.

On 11/12/11 at 12:06 PM, Paris On Rails was all:
Paris On Rails

My first thought was jQuery. The new HTML5 has that tag for programmable drawing. I’m sure someone out there made a map. There are tutorials/answers for so much on the Internet.

Most of these articles though, are full of sample code. So it may look like a lot to handle at first glance, and it is. I’m trying to learn jQuery myself.

On 01/27/12 at 05:45 PM, Steve has junk in the trunk was all:
Steve has junk in the trunk

In case you guys are interested.. Slowly but surely, we’re actually getting this done.

It’s almost certainly not the best or smartest way to accomplish this, but here’s what we’ve done so far

- We used a Python script to scrape Twitter under a certain hashtag and parse the data from the Tweet we needed
- That gets dumped into a PostGres database
- We used PHP to pull out the data and display it on a map.
- Developed a search function to display all Tweets from a certain zip on a side rail.

Here’s what it looks like (mind the aesthetics)
http://imgur.com/7RXKk

In the next week we’re hoping to add:

- map key, explainer
- a click listener so if you click on an icon it automatically displays all the Tweets in the side rail.
a graph that shows the average intensity of precipitation, as stated by Tweeters, throughout a given storm.

A work in progress to be sure, but at least one that IS progressing. Thanks for your guidance when i was clueless.

Activity

Where Who How Long Ago
AV Undercover 2012 Paris 3 days

Wisdom

I’m over here trying to help him out and he’s all “I’ma write my name in dots!”

-a kid in my afternoon math class

#1765

Site Search

Popular Topics

View more topics

About The Scrabbled

The Scrabbled is a group of people blogging about and linking to all manner of things. Usually we argue and make fun of each other. Everybody knows everybody through somebody so there are no strangers here. Most of us have even met in real life! If you happen to personally know someone here and would like to start arguing with and/or making fun of someone, shoot John an email and ask to sign up. Otherwise, you're just going to have to read in relative silence. Sorry.

Meta

theScrabbled.com
This work is licensed under a Creative Commons License permitting non-commercial sharing with attribution.
XHTMLCSSRSS / XML
Developed and Designed by John Hutchinson