Step 5: Twitter Code

1. To stay Consistent with our Arduino connector code we used python to get data from Twitter.
2. Get set up to pull data from twitter. We used the Python Twitter Library to simplify the Twitter connection process. In order to connect to Twitter and obtain data you need to register a Twitter application at http://dev.twitter.com/. This will give you ‘consumer’ and ‘access’ ‘keys’ and ‘tokens’ you need to successfully connect.
3. The next step is to collect the latitudes and longitudes of the cities that you want to collect data for. In our case we collected the locations for 10 Colorado metropolitan areas.
4. Decide what kind of information you want to display. In our case we decided that we would display the relative happiness for each location. To accomplish this we compiled a list of ‘happy’ an ‘unhappy’ words. We then perform two Twitter searches, using the api, for each location every 60 seconds. One for the happy and one for the unhappy words.
5. Its up to you to determine how this information will correlate to different colors for the LEDs on the map. In our case, there were a lot more happy results than unhappy results. So only a few unhappy results were required to make a location ‘unhappy. 

All of our code for this project can be found at: https://github.com/ianisborn/TTT/tree/master/sandbox
<p>Help I need a vector file for a topographic map, and the link in the text isn't working. </p>
Hi JodyP16, sorry the link isn't working! The vector file might be on my old computer, so I'll check there sometime this week.<br><br>If you need a vector file faster than that, you might want to just make your own. I was able to make mine in a couple hours by tracing the levels on a map.
Thank You!
<p>Hey, here's the updated link: <a href="https://drive.google.com/open?id=0B3lu9jVIssuPT1RkRXE3YmRvbUU" rel="nofollow">https://drive.google.com/open?id=0B3lu9jVIssuPT1Rk...</a></p><p>Each line in the file corresponds to a layer of the map</p>
<p>great post! thanks :-)</p>
WOW You have blown my mind with this idea, I just joined the site, browsed around didn't click on projects properly, then saw this and I had to check it out.<br><br>It's a brilliant concept and what a way to use the open source Arduino stuff. <br><br>Cool idea, good job!
Where did you download the Topo of your state? Please list a link.
I found it through Google Image search. I just added a link to a zipped folder of my images/vector files on the 'getting the map ready for cutting' step.
You can also download free topo maps from the usgs.gov website. <br>Excellent project!
Wow, and they said CU students just ride bikes, rock climb, drink in excess and burn furniture! Way to go guys, really KOOL project!

About This Instructable




More by ianisborn:TwitMap: Topographical Colorado Twitter Map 
Add instructable to: