Country/location based data in twitter

Hi,

i am fetching data from twitter and wants to put a geo-location filter while fetching the data.
tried
country_code = ["US","IN"]
and location =["us"] but no luck
please help.

Thanks in advance

How do you fetch the data from twitter?
Using input plugin?

If you are using the twitter input plugin try this:

input {
twitter {
----your options
full_tweet => true
ignore_retweets => false
use_samples => false
languages => ["us"]

locations => "100,100"
}
}

locations edit

  • Value type is string
  • There is no default value for this setting.

A comma-separated list of longitude, latitude pairs specifying a set of bounding boxes to filter tweets by. See https://dev.twitter.com/streaming/overview/request-parameters#locations for more details.

you would have to handle it in a json filtering I guess going after the
{
"country": "Sweden",
"countryCode": "SE",
"name": "Sweden",
"parentid": 1,
"placeType": {
"code": 12,
"name": "Country"
},
"url": "http://where.yahooapis.com/v1/place/23424954",
"woeid": 23424954
},

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.