Grokbase Groups R r-help August 2012
FAQ
Hi all,

Is it possible to get the latitude and longitude of the location of a
tweet? If I do

tweets<- searchTwitter("#obama", n=200) #get tweets
df <- twListToDF(tweets) #converts to data frame
for ease of viewing

it does not seem to be getting the location of where that tweet was posted.
From what I read from the twitter API this is possible?
Thanks,
Sachin

Search Discussions

  • Bhupendrasinh Thakre at Aug 14, 2012 at 11:43 pm
    Please read the FAQ file for twitteR.
    It mentions how to get both and as well as radius.

    Best Regards,

    Bhupendrasinh Thakre
    Sent from my iPhone
    On Aug 14, 2012, at 6:06 PM, Sachinthaka Abeywardana wrote:

    Hi all,

    Is it possible to get the latitude and longitude of the location of a
    tweet? If I do

    tweets<- searchTwitter("#obama", n 0) #get tweets
    df <- twListToDF(tweets) #converts to data frame
    for ease of viewing

    it does not seem to be getting the location of where that tweet was posted.
    From what I read from the twitter API this is possible?
    Thanks,
    Sachin

    [[alternative HTML version deleted]]

    ______________________________________________
    R-help at r-project.org mailing list
    https://stat.ethz.ch/mailman/listinfo/r-help
    PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
    and provide commented, minimal, self-contained, reproducible code.
  • Sachinthaka Abeywardana at Aug 15, 2012 at 12:04 am
    Did you mean the Vignette for twitteR? there is no FAQ section that I can
    see and I could not get the following to work either:

    a<-searchTwitter("sydney", n=100, geocode='-33.871841,151.206709, 10000mi')


    returns with a null list. Is there some sort of registration I need to
    do for this to work? The above is the latitude longitude for Sydney
    from google maps.


    Thanks,

    Sachin

    On Wed, Aug 15, 2012 at 9:43 AM, Bhupendrasinh Thakre wrote:

    Please read the FAQ file for twitteR.
    It mentions how to get both and as well as radius.

    Best Regards,

    Bhupendrasinh Thakre
    Sent from my iPhone

    On Aug 14, 2012, at 6:06 PM, Sachinthaka Abeywardana <
    sachin.abeywardana@gmail.com> wrote:
    Hi all,

    Is it possible to get the latitude and longitude of the location of a
    tweet? If I do

    tweets<- searchTwitter("#obama", n=200) #get tweets
    df <- twListToDF(tweets) #converts to data frame
    for ease of viewing

    it does not seem to be getting the location of where that tweet was
    posted.
    From what I read from the twitter API this is possible?
    Thanks,
    Sachin

    [[alternative HTML version deleted]]

    ______________________________________________
    r-help@r-project.org mailing list
    https://stat.ethz.ch/mailman/listinfo/r-help
    PLEASE do read the posting guide
    http://www.R-project.org/posting-guide.html
    and provide commented, minimal, self-contained, reproducible code.
  • Bhupendrasinh Thakre at Aug 15, 2012 at 12:38 am
    Very true, it does bring null list.
    However while giving some other inputs like since, until, lang as Null you will get desired result.


    Bhupendrasinh Thakre




    On Aug 14, 2012, at 7:04 PM, Sachinthaka Abeywardana wrote:

    a<-searchTwitter("sydney", n=100, geocode='-33.871841,151.206709, 10000mi')
  • Sachinthaka Abeywardana at Aug 15, 2012 at 4:17 am
    what am I doing wrong here? Increased the radius to 10,000 miles and the
    dates are for the last two years. Surely this should get some tweets?

    a<-searchTwitter("sydney", n=100, geocode='-33.871841,151.206709,
    10000mi', since="2010-01-01", until="2012-08-01")


    Thanks,

    Sachin

    On Wed, Aug 15, 2012 at 10:38 AM, Bhupendrasinh Thakre wrote:

    Very true, it does bring null list.
    However while giving some other inputs like since, until, lang as Null you
    will get desired result.


    Bhupendrasinh Thakre





    On Aug 14, 2012, at 7:04 PM, Sachinthaka Abeywardana <
    sachin.abeywardana@gmail.com> wrote:

    a<-searchTwitter("sydney", n=100, geocode='-33.871841,151.206709, 10000mi')

  • Bhupendrasinh Thakre at Aug 15, 2012 at 4:36 am
    There is something wrong in your geo code. What was the source.
    Although some trial and error suggests that we should use lat and lang till 4 decimal only. Don't know why.
    I have changed the geo-code somewhat and it works.

    Changed Code :

    searchTwitter('sydney', n=10,geocode='-33.8389,151.2101,10000mi')


    Bhupendrasinh Thakre

    Sent from my Mac


    On Aug 14, 2012, at 11:17 PM, Sachinthaka Abeywardana wrote:

    what am I doing wrong here? Increased the radius to 10,000 miles and the dates are for the last two years. Surely this should get some tweets?

    a<-searchTwitter("sydney", n=100, geocode='-33.871841,151.206709, 10000mi', since="2010-01-01", until="2012-08-01")



    Thanks,

    Sachin


    On Wed, Aug 15, 2012 at 10:38 AM, Bhupendrasinh Thakre wrote:
    Very true, it does bring null list.
    However while giving some other inputs like since, until, lang as Null you will get desired result.


    Bhupendrasinh Thakre




    On Aug 14, 2012, at 7:04 PM, Sachinthaka Abeywardana wrote:

    a<-searchTwitter("sydney", n=100, geocode='-33.871841,151.206709, 10000mi')
  • Sachinthaka Abeywardana at Aug 15, 2012 at 4:52 am
    That worked but how do you get the location of one particular tweet. So
    from that list of 10, say the first tweet, is there a way to say at exactly
    what location it was tweeted?

    Thanks,
    Sachin
    On Wed, Aug 15, 2012 at 2:36 PM, Bhupendrasinh Thakre wrote:

    There is something wrong in your geo code. What was the source.
    Although some trial and error suggests that we should use lat and lang
    till 4 decimal only. Don't know why.
    I have changed the geo-code somewhat and it works.

    Changed Code :

    *searchTwitter('sydney', n=10,geocode='-33.8389,151.2101,10000mi')*


    Bhupendrasinh Thakre

    Sent from my Mac



    On Aug 14, 2012, at 11:17 PM, Sachinthaka Abeywardana <
    sachin.abeywardana@gmail.com> wrote:

    what am I doing wrong here? Increased the radius to 10,000 miles and the
    dates are for the last two years. Surely this should get some tweets?

    a<-searchTwitter("sydney", n=100, geocode='-33.871841,151.206709, 10000mi', since="2010-01-01", until="2012-08-01")


    Thanks,

    Sachin


    On Wed, Aug 15, 2012 at 10:38 AM, Bhupendrasinh Thakre <
    vickythakre@gmail.com> wrote:
    Very true, it does bring null list.
    However while giving some other inputs like since, until, lang as Null
    you will get desired result.


    Bhupendrasinh Thakre





    On Aug 14, 2012, at 7:04 PM, Sachinthaka Abeywardana <
    sachin.abeywardana@gmail.com> wrote:

    a<-searchTwitter("sydney", n=100, geocode='-33.871841,151.206709, 10000mi')

  • John at Aug 16, 2012 at 4:18 am

    On Wed, 15 Aug 2012 14:52:44 +1000 Sachinthaka Abeywardana wrote:

    That worked but how do you get the location of one particular tweet.
    So from that list of 10, say the first tweet, is there a way to say
    at exactly what location it was tweeted?
    You are teetering on the edge of potential stalking here, since
    locating a specific tweet implies locating a specific individual. In
    some countries that can be a problem.

    JWDougherty
  • S Ellison at Aug 16, 2012 at 11:45 am

    That worked but how do you get the location of one particular tweet.
    You are teetering on the edge of potential stalking here,
    since locating a specific tweet implies locating a specific
    individual. In some countries that can be a problem.
    Location is currently disabled by default in twitter; a user must choose to enable it for location to be available. That would constitute a clear decision to publish location. No sensible judiciary would regard it as an offence, of itself, to access an individual's location when the individual has themselves has chosen to publish it to a public place such as the web.

    But intent matters: as they say, it's what you do with it that counts. You might land yourself with having to defend the intent. So you're not wrong to raise the issue.


    *******************************************************************
    This email and any attachments are confidential. Any use...{{dropped:8}}
  • Jean-Pierre Müller at Aug 15, 2012 at 7:17 am
    Have look at :

    http://stackoverflow.com/questions/11674842/how-to-extract-tweet-geocode-in-twitter-package-in-r/11678037#11678037

    HTH,

    --

    Jean-Pierre M?ller
    SSP / Anthropole 4123 / UNIL / CH - 1015 Lausanne
    Voice:+41 21 692 3116 / Fax:+41 21 692 3115

    Please avoid sending me Word or PowerPoint attachments.
    See http://www.gnu.org/philosophy/no-word-attachments.html
    S'il vous pla?t, ?vitez de m'envoyer des attachements au format Word ou PowerPoint.
    Voir http://www.gnu.org/philosophy/no-word-attachments.fr.html

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupr-help @
categoriesr
postedAug 14, '12 at 11:06p
activeAug 16, '12 at 11:45a
posts10
users5
websiter-project.org
irc#r

People

Translate

site design / logo © 2017 Grokbase