Upload
spencer
View
37
Download
1
Embed Size (px)
DESCRIPTION
Online real-time tweets extraction, mapping and dissemination. Xiannian Chen and Gregory Elmes West Virginia University. Geospatial data. Challenges that geospatial data face Traditional geospatial data updates are slow. The real-time data is critical in disaster management. - PowerPoint PPT Presentation
Citation preview
2014 WVAGP GIS Conference, Charleston, WV 1
Online real-time tweets extraction, mapping and dissemination
Xiannian Chen and Gregory ElmesWest Virginia University
Chen & Elmes @ West Virginia University
2014 WVAGP GIS Conference, Charleston, WV 2
Geospatial data• Challenges that geospatial data face
• Traditional geospatial data updates are slow.• The real-time data is critical in disaster management.
• Crowdsourcing (Jeff Howe 2005, Brabham 2008)• VGI (Volunteered Geographic Information, Goodchild 2007)
• Real time geographic information from volunteers• “geographic information acquired and made available to others
through the voluntary activity of individuals or groups, with the intent of providing information about the geographic world” (Elwood, Goodchild, and Sui 2011)
Chen & Elmes @ West Virginia University
2014 WVAGP GIS Conference, Charleston, WV 3
Values of VGI• Captures of real time changes• Quick dissemination• A significant data source.• Individuals’ understandings of a local event• Rich in context
Chen & Elmes @ West Virginia University
2014 WVAGP GIS Conference, Charleston, WV 4
API and REST• Application Programming Interface
• A library that may include specification for routines, data structures, object classes, and variables
• An interface for software components to communicate• All social media websites provide API
• REST (REpresentational State Transfer, Fielding 2000)• A HTTP-based style to describe the resources it represents.• uses HTTP for all four CRUD (Create/Read/Update/Delete)• The access of REST services is a simple URL
Chen & Elmes @ West Virginia University
2014 WVAGP GIS Conference, Charleston, WV 5
Twitter and Tweets• Twitter: a real-time information network• Tweets
• created_at• coordinates• favorite_count, retweet_count• id• place• text• user• more information:
https://dev.twitter.com/docs/platform-objects/tweets
Chen & Elmes @ West Virginia University
2014 WVAGP GIS Conference, Charleston, WV 6
Twitter Search API• Twitter provides REST API to access tweets
• The resources are represented in RESTful style, which mean, in theory, users can get tweets by typing the URL with right parameters.
• Tweets, especially geo-tagged tweets• A sample URL for query:
• https://api.twitter.com/1.1/search/tweets.json?q=shooting&geocode=41.148693,-81.346292,100km&result_type=recent&until=2014-05-30&since=2014-05-29&count=100
Chen & Elmes @ West Virginia University
2014 WVAGP GIS Conference, Charleston, WV 7
Major query parameters• q – the search keywords• geocode – location with radius. Format: lat, long, 50mi.• since, until – the search time frame. Format: yyyy-mm-dd• count – the number of tweet in a query. <100• result_type – types of search results preferred to receive
• mixed: Include both popular and real time results in the response.• recent: return only the most recent results in the response.• popular: return only the most popular results in the response.
• more information: https://dev.twitter.com/docs/api/1.1/get/search/tweets
Chen & Elmes @ West Virginia University
2014 WVAGP GIS Conference, Charleston, WV 8
Authorization• Required in Twitter API v1.1.• Response of un-authorized request.
• {"errors":[{"message":"Bad Authentication data","code":215}]}• Using Twitter website to generate the authorization code
• API key• API secret• Access token• Access token secret
• Use and activate authorization through server-side programming technologies, e.g. PHP, Python.
Chen & Elmes @ West Virginia University
2014 WVAGP GIS Conference, Charleston, WV 9
System architecture for live VGI saving
Chen & Elmes @ West Virginia University
Serverfor Tweets
Client Application
Web Server
Server-GIS Application
Server
Geodatabase Server
Map Server
Tweet collection
Tweet storing
Live data saving Live mapping
2014 WVAGP GIS Conference, Charleston, WV 10
Implementation of live data saving
Chen & Elmes @ West Virginia University
ArcGIS Server
FeatureServer Service
RESTful map service
Tweets(FeatureClass
Field: KeywordField: LocationField: Message:::
Geodatabase
ArcGIS Desktop
Tweets(GIS Layer)
Symbologybased on keyword Web GIS platform
ArcGIS JavaScript API
Load(ArcSDE)
Publish(ArcGIS Server)
Write(ArcGIS JavaScript API)
Tweets
Twitter Search API
Geo-tagged Tweets
Geo Filter
Collect(Twitter API, PHP)
Filter(JavaScript)
2014 WVAGP GIS Conference, Charleston, WV 11
A live demo• http://157.182.212.204/tweets
Chen & Elmes @ West Virginia University
2014 WVAGP GIS Conference, Charleston, WV 12
Issues• Quality• Accuracy• Uncertainty• Credibility• Heterogeneities• Liability• Privacy• Confidentiality
Chen & Elmes @ West Virginia University
2014 WVAGP GIS Conference, Charleston, WV 13Chen & Elmes @ West Virginia University
Thanks and questions