Linked Data & Semantic Web Technology Development of Twitter Applications Part 6. Trends Dr. Myungjin Lee.

Slides:



Advertisements
Similar presentations
11 Copyright © 2005, Oracle. All rights reserved. Using Arrays and Collections.
Advertisements

The Singleton Pattern II Recursive Linked Structures.
1 Generic Collections Chapter Objectives You will be able to Use generic collection classes available in the.NET framework.
Problem Solving 5 Using Java API for Searching and Sorting Applications ICS-201 Introduction to Computing II Semester 071.
Session 3 Algorithm. Algorithm Algorithm is a set of steps that are performed to solve a problem. The example below describes an algorithm Example Check.
1 Chapter 5 Threads 2 Contents  Overview  Benefits  User and Kernel Threads  Multithreading Models  Solaris 2 Threads  Java Threads.
Stacks. What is a stack? Last-in first-out data structure (LIFO) New objects are placed on top Removal restricted to top object Examples?
Stacks.
1 Searching Algorithms Overview  What is Searching?  Linear Search and its Implementation.  Brief Analysis of Linear Search.  Binary Search and its.
1 Introduction to Searching and Sorting Comparable Interface -Reading p Comparator Interface.
1 More on Arrays Arrays of objects Command line arguments The ArrayList class Javadoc Review Lecture 8 notes and L&L 7.1 – 7.2 Reading for this lecture:
12-Jul-15 Lists in Java Part of the Collections Framework.
Open Source XMPP for Cloud Services Matt Tucker, CTO Jive Software.
JICSIT/ITAIC 2011 Keynote 1 Yinong Chen (Ph.D.) Arizona State University, Tempe, Arizona Service-Oriented Computing.
Week 4-5 Java Programming. Loops What is a loop? Loop is code that repeats itself a certain number of times There are two types of loops: For loop Used.
Application Protocols: HTTP CSNB534 Semester 2, 2007/2008 Asma Shakil.
Examples of Using Servlets and JSP Representation and Management of Data on the Internet.
Programming Progamz pls. Importance VERY IMPORTANT.
1 UCN / IT Distributed Programming Web Services Purpose Examples of Web Services Architecture Web Services in.Net.
04/29/ Introduction to Vectors?... A vector is a dynamic array. - It can be expanded and shrunk as required - A Component of a vector can be accessed.
Serving the needs of the conservation community Global Biodiversity Information Facility.
The switch StatementtMyn1 The switch Statement Sometimes there can be a multiple-choice situation, in which you need to execute a particular set of statements.
Classes and Methods Computer Engineering Department Java Course Asst. Prof. Dr. Ahmet Sayar Kocaeli University - Fall 2014.
Computer Programming 12 Mr. Jean April 24, The plan: Video clip of the day Upcoming Quiz Sample arrays Using arrays More about arrays.
Server-side Programming The combination of –HTML –JavaScript –DOM is sometimes referred to as Dynamic HTML (DHTML) Web pages that include scripting are.
WEEK 2 Introduction to Java II CSE 252 Principles of Programming Languages LAB SECTION.
Liang, Introduction to Java Programming, Tenth Edition, (c) 2013 Pearson Education, Inc. All rights reserved. 1 Chapter 20 Lists, Stacks, Queues, and Priority.
Teach.NET Workshop Series Track 4: AP Computer Science with.NET and J#
Chapter 4 Generic Vector Class. Agenda A systemic problem with Vector of Object – Several approaches at a solution – Generic structures Converting classes.
FOR LOOP WALK THROUGH public class NestedFor { public static void main(String [] args) { for (int i = 1; i
CSC 2720 Building Web Applications Managing Users' States – Cookies, URL-Rewriting, Hidden Fields and Session Management APIs.
Lab - 11 Keerthi Nelaturu. Ordered Structure Using Doubly linked list All elements in the list are arranged in an order Implement the Ordered Structure.
Computer Science 320 A First Program in Parallel Java.
CS 180 Recitation 7 Arrays. Used to store similar values or objects. An array is an indexed collection of data values of the same type. Arrays are the.
©2003 Paula Matuszek GOOGLE API l Search requests: submit a query string and a set of parameters to the Google Web APIs service and receive in return a.
Array Size Arrays use static allocation of space. That is, when the array is created, we must specify the size of the array, e.g., int[] grades = new int[100];
SourceAnatomy1 Java Source Anatomy Barb Ericson Georgia Institute of Technology July 2008.
© 2010 Pearson Addison-Wesley. All rights reserved. Addison Wesley is an imprint of CHAPTER 15: Sets and Maps Java Software Structures: Designing and Using.
Methods.
DATA STRUCTURE Presented By: Mahmoud Rafeek Alfarra Using C# MINISTRY OF EDUCATION & HIGHER EDUCATION COLLEGE OF SCIENCE AND TECHNOLOGY KHANYOUNIS- PALESTINE.
Methods What is a method? Main Method the main method is where a stand alone Java program normally begins execution common compile error, trying.
Output Programs These slides will present a variety of small programs. Each program has a compound condition which uses the Boolean Logic that was introduced.
Java Collection Classes Com379PT
Linked Data & Semantic Web Technology Development of Twitter Applications Part 1. Overview Dr. Myungjin Lee.
Linked Data & Semantic Web Technology Development of Twitter Applications Part 4. Timeline and Tweet Dr. Myungjin Lee.
16BIT IITR Data Collection Module A web crawler (also known as a web spider or web robot) is a program or automated script which browses the World Wide.
Azure Active Directory is becoming one of, if not the, primary user identity management services for cloud applications. One of Azure Active Directory's.
Staples are our staple Building upon our solution.
Linked Data & Semantic Web Technology Development of Twitter Applications Part 2. Twitter for Websites Dr. Myungjin Lee.
Development of Twitter Applications Part 7. Search API
Crawling Twitter Data Konstantinos Semertzidis
using System; namespace Demo01 { class Program
Development of Twitter Applications Part 5. Users
Node.js Express Web Services
Interfaces and an Array List
Decision statements. - They can use logic to arrive at desired results
Computing Adjusted Quiz Total Score
TO COMPLETE THE FOLLOWING:
Servlet APIs Every servlet must implement javax.servlet.Servlet interface Most servlets implement the interface by extending one of these classes javax.servlet.GenericServlet.
Assignment 7 User Defined Classes Part 2
Code Animation Examples
Recursive GCD Demo public class Euclid {
References and Objects
class PrintOnetoTen { public static void main(String args[]) {
Data Visualizer for CommCare
Lecture 6: References and linked nodes reading: 16.1
Family Map Server: Design and Implementation Tips
Using Link Information to Enhance Web Page Classification
Development of Twitter Applications Part 3. OAuth
Plug-In Architecture Pattern
Presentation transcript:

Linked Data & Semantic Web Technology Development of Twitter Applications Part 6. Trends Dr. Myungjin Lee

Linked Data & Semantic Web Technology Trends API Trends REST API – to explore what's trending on Twitter – Trends are determined by an algorithm and are tailored for you based on who you follow and your location. 2

Linked Data & Semantic Web Technology REST API related to Trends 3 ResourceDescription GET trends/place Returns the top 10 trending topics for a specific WOEID, if trending information is available for it. The response is an array of "trend" objects that encode the name of the trending topic, the query parameter that can be used to search for the topic on Twitter Search, and the Twitter Search URL.... GET trends/available Returns the locations that Twitter has trending topic information for. The response is an array of "locations" that encode the location's WOEID and some other human-readable information such as a canonical name and country the location belongs in. A WOEID is a Yahoo! Where On Earth ID. GET trends/closest Returns the locations that Twitter has trending topic information for, closest to a specified location. The response is an array of "locations" that encode the location's WOEID and some other human-readable information such as a canonical name and country the location belongs in. A WOEID is a Yahoo...

Linked Data & Semantic Web Technology GET trends/available Resource URL – Other Information – Requests per rate limit window: 15/user, 15/app – Authentication: Required – Response The response is an array of "locations" that encode the location's WOEID and some other human-readable information. A WOEID is a Yahoo! Where On Earth ID. – API Version: v1.1 4

Linked Data & Semantic Web Technology Twitter4J Classes for Trends TrendsResources Interface – Methods ResponseList getAvailableTrends() Trends getPlaceTrends(int woeid) Location Interface – Methods java.lang.String getCountryCode() java.lang.String getCountryName() java.lang.String getName() int getPlaceCode() java.lang.String getPlaceName() java.lang.String getURL() int getWoeid() Trends Interface – Methods Location getLocation() java.util.Date getTrendAt() Trend[] getTrends() Trend Interface – A data interface representing Trend. – Methods java.lang.String getName() java.lang.String getURL() 5

Linked Data & Semantic Web Technology Getting Locations for Available Trends 1.import twitter4j.Location; 2.import twitter4j.ResponseList; 3.import twitter4j.Twitter; 4.import twitter4j.TwitterException; 5.import twitter4j.TwitterFactory; 6.public class TwitterTrends { 7.Twitter twitter = null; 8.public TwitterTrends() { 9.this.twitter = TwitterFactory.getSingleton(); 10.this.twitter.setOAuthConsumer(TwitterAccessToken.consumerKey, 11.TwitterAccessToken.consumerSecret); 12.this.twitter.setOAuthAccessToken(TwitterAccessToken.loadAccessToken()); 13.} 14.public static void main(String args[]) throws TwitterException { 15.TwitterTrends tt = new TwitterTrends(); 16.ResponseList locations = tt.twitter.getAvailableTrends(); 17.for (int i = 0; i < locations.size(); i++) { 18.Location location = locations.get(i); 19.System.out.println(location.getName() + ", " 20.+ location.getCountryName() + ": " + location.getWoeid()); 21.} 22.} 23.} 6

Linked Data & Semantic Web Technology GET trends/place Resource URL – Parameters Other Information – Requests per rate limit window: 15/user, 15/app – Authentication: Required – API Version: v1.1 id required The Yahoo! Where On Earth ID of the location to return trending information for. Global information is available by using 1 as the WOEID. exclude optional Setting this equal to hashtags will remove all hashtags from the trends list. 7

Linked Data & Semantic Web Technology Getting Trends 1.public static void main(String args[]) throws TwitterException { 2.TwitterTrends tt = new TwitterTrends(); 3.Trends trends = tt.twitter.getPlaceTrends(1); 4.Trend[] trend = trends.getTrends(); 5.for(int i = 0; i < trend.length; i++) { 6.System.out.println(i + ". " + trend[i].getName()); 7.} 8.} 8