data mining the twitter api: 2012 alao annual conference
TRANSCRIPT
DATA MINING THE TWITTER API2012 ALAO Annual Conference
Friday, October 26, 12
THE AGE OF BIG DATAPhotograph by Max Dannenbaum/Getty Images
Friday, October 26, 12
“It’s a revolution... We’re just getting under way. But the march of quantification, made possible by enormous new sources of data, will sweep through academia, business and government. There is no area that is going to be untouched.”
Gary King, DirectorInstitute for Quantitative Social Science, Harvard University
Friday, October 26, 12
Industrial Equipment
Automobiles
Water MetersElectric Meters
Household Appliances
Traffic
Weather
Government Data
Search Traffic
Wordpress posts
Tumblr posts
Instagrams
Tweets
Friday, October 26, 12
Why do we want these Tweets?
Discover & respond to user needs proactivelyCreate social rapport with users
Build social capitalAdd followers
Gain unique insight into Zeitgeist of user baseCapture as an additional data point
Vertical scroll
Friday, October 26, 12
Friday, October 26, 12
DATA ACCESSThe Neighbor’s Garage Analogy
Open Source: take whatever you want, use however you want
Proprietary: pay for each tool in the garage, use them as designed
API: utilize the services of the garage, if you have authorization and ask the right way
Friday, October 26, 12
High-Level OverviewBuild URL request with keywords and other parameters
Submit URL requestConvert returned JSON data
Insert non-duplicative data into MySQL table
Display data by pulling out of MySQL table
<?php ?>
<?php mysql ?>
<?php mysql html css ?>Friday, October 26, 12
DISPLAY DATA BY PULLING OUT OF MYSQL TABLE
<?php
echo '<head>';
echo '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';
echo '<link rel="stylesheet" href="style.css" type="text/css" />';
echo '</head>';
echo '<body>';
mysql_connect("localhost", "user", "pass") or die(mysql_error());
mysql_select_db("database") or die(mysql_error());
$tweet_archive = mysql_query("SELECT * FROM twindicators where loc NOT LIKE '%Beach%' ORDER BY id DESC");
echo '<div class="content">';
while ($row = mysql_fetch_array($tweet_archive)) {
$decoded_text = urldecode($row["text"]);
echo '<p><span class="user">' . $row[user] . '</span> | <span class="date">' . $row[date] . '</span> <br /><br /> <span class="text"><a href="https://twitter.com/#!/' . $row[user] . '/status/' . $row[twid] . '">' . $decoded_text . echo '<hr />';
}
echo '</div>';
echo '</body>';
?>
Friday, October 26, 12
NOTABLE INTERACTIONS
70 followers
Friday, October 26, 12
Future Developments
Develop a deeper set of keywordsDevelop a richer interface for librarians
Incorporate SMS notifications to subject specific librarians when relevent tweet is recorded
Analyze data for user satisfaction / areas for improvement
Friday, October 26, 12
SHAMELESS PLUGWeb Service APIs and Libraries. ALA Editions
Friday, October 26, 12
DETAILS & SUCH
Jason Paul [email protected]@jpmichel
Code:Query and store: https://gist.github.com/3846007Display: https://gist.github.com/3846055
Friday, October 26, 12