The document discusses data mining the Twitter API. It provides an overview of how to build a URL request to submit to the Twitter API to retrieve tweets, convert the returned JSON data, insert non-duplicative tweets into a MySQL database, and then display the tweets by pulling them from the MySQL table. It also discusses potential future developments, such as developing additional keywords and notifications.
AWS를 통한 데이터 분석 및 처리의 새로운 혁신 기법 - 김윤건, AWS사업개발 담당:: AWS Summit Online Korea 2020
Data Mining the Twitter API for Academic Libraries
1. DATA MINING THE TWITTER API
2012 ALAO Annual Conference
Friday, October 26, 12
2. Photograph by Max Dannenbaum/Getty Images
THE AGE OF BIG DATA
Friday, October 26, 12
3. “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, Director
Institute for Quantitative Social Science, Harvard University
Friday, October 26, 12
4. Wordpress posts
Industrial Equipment
Household Appliances
Weather Instagrams
Electric Meters Tweets Water Meters
Government Data
Traffic
Tumblr posts
Search Traffic Automobiles
Friday, October 26, 12
5. Why do we want these Tweets?
Vertical scroll
Discover & respond to user needs proactively
Create social rapport with users
Build social capital
Add followers
Gain unique insight into Zeitgeist of user base
Capture as an additional data point
Friday, October 26, 12
7. 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
DATA ACCESS
The Neighbor’s Garage Analogy
Friday, October 26, 12
8. High-Level Overview
Build URL request with keywords and other parameters
Submit URL request
Convert returned JSON data
<?php ?>
Insert non-duplicative data into MySQL table
<?php mysql ?>
Display data by pulling out of MySQL table
<?php mysql html css ?>
Friday, October 26, 12
9. <?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>';
?>
DISPLAY DATA BY PULLING OUT OF MYSQL TABLE
Friday, October 26, 12
10. 70 followers
NOTABLE INTERACTIONS
Friday, October 26, 12
11. Future Developments
Develop a deeper set of keywords
Develop 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
12. SHAMELESS PLUG
Web Service APIs and Libraries. ALA Editions
Friday, October 26, 12
13. Jason Paul Michel
micheljp@muohio.edu
@jpmichel
Code:
Query and store: https://gist.github.com/3846007
Display: https://gist.github.com/3846055
DETAILS & SUCH
Friday, October 26, 12