Sample output from twitter that includes geo and place?


#1

Hello,

In http://dev.datasift.com/docs/getting-started/data/twitter one can read that if “twitter base” is enabled, then a number of data items including “geo” will become available. One is also informed that if “twitter place” is enabled, then a data item called “twitter place” will become available.

Do you have any sample twitter outputs that show what these two data items actually look like? Do they have the same formats as values of the the corresponding targets http://dev.datasift.com/docs/targets/twitter/twitter-geo and http://dev.datasift.com/docs/targets/twitter/twitter-place-* ?

Also, how are “geo”, “place”, and the “location” data item in the twitter “user” structure related? Given that we use datasift with all twitter output enabled, under what circumstances are these output data items set?

Thanks.

L


#2

Below is an example Tweet, with Twitter's geo data enabled. The objects correspond with each of the CSDL targets found in twitter.geo and twitter.place.*

['twitter']['user'] is information about the Twitter user - the author of the Tweet.

['twitter']['user']['location'] is data entered by the Twitter user about their location. In this case, I have specified that I am from "Reading, UK". This will not be sent if the user has not specified where they are from.

['twitter']['geo'] is sent each time a Twitter user Tweets with geo location enabled. This is the longitude and latitude coordinates the Tweet was sent from.

['twitter']['place'] is information Twitter has about the place you are Tweeting from. 

 

{    "interaction": {        "source": "web",        "author": {            "username": "DugdaleTest",            "name": "Jason D",            "id": 491432709,            "avatar": "http://a0.twimg.com/sticky/default_profile_images/default_profile_5_normal.png",            "link": "http://twitter.com/DugdaleTest"        },        "type": "twitter",        "created_at": "Tue, 06 Mar 2012 12:17:53 +0000",        "content": "Checking in!",        "id": "1e1678665dbaae80e0749f8b98aabe7e",        "link": "http://twitter.com/DugdaleTest/statuses/177005078379638784",        "geo": {            "latitude": 51.4514285,            "longitude": -0.990659        }    },    "twitter": {        "created_at": "Tue, 06 Mar 2012 12:17:53 +0000",        "geo": {            "latitude": 51.4514285,            "longitude": -0.990659        },        "id": "177005078379638784",        "place": {            "id": "e9e38cb14731d1ef",            "url": "http://api.twitter.com/1/geo/id/e9e38cb14731d1ef.json",            "place_type": "city",            "country": "United Kingdom",            "country_code": "GB",            "full_name": "Reading, Reading",            "name": "Reading"        },        "source": "web",        "text": "Checking in!",        "user": {            "name": "Jason D",            "location": "Reading, UK",            "statuses_count": 16,            "screen_name": "DugdaleTest",            "lang": "en",            "id": 491432709,            "id_str": "491432709",            "created_at": "Mon, 13 Feb 2012 16:41:03 +0000"        }    }}

Geolocated Tweets
#3

Thanks for your reply. What if twitter.geo is present, but twitter.place is not? Is this possible? If so, do you have a service where a lat/long pair is translated into a likely geographical entity?


#4

It is possible to receive ['twitter']['geo'] and not receive ['twitter']['place'] in cases where Twitter does not recognise the place the Tweet was sent from.

Unfortunately we do not currently offer any service to populate the ['twitter']['place'] obejct in this case.