twitter - Extract tweets and the users only from a particular location using R -


i want compare brand knowledge (ex : sony) in dublin , london. how select tweets locations user name tweeted it? tried london 1 geocode option, returned zero. code:

tweets <- searchtwitter(     "@sony", n = 1000, since = "2014-01-01",     lang = "en", geocode = "51.5074, 0.1278" ) 

is there better way this?

you need remove spaces in geocode parameter, , need specify distance representing radius against lat/long point specify. example, if wanted radius of 50km, use this:

tweets <- searchtwitter(     "@sony", n = 1000, since = "2014-01-01",    lang = "en", geocode = "51.5074,0.1278,50km" ) 

from twitter documentation:

geocode - if not null, returns tweets users located within given radius of given latitude/longitude.

and

for geocode argument, values given in format latitude,longitude,radius, radius can have either mi (miles) or km (kilometers) unit. example geocode='37.781157,-122.39720,1mi'.

notice there no spaces in geocode parameter.


Comments

Popular posts from this blog

account - Script error login visual studio DefaultLogin_PCore.js -

xcode - CocoaPod Storyboard error: -