title: R - Twitter - create timeline of tweets according to country (geographic location)
body: <p>I am trying to create a timeline of tweets for a specific hashtag according to geographic location. The location should be a country.</p>
  
  <p>I would like to verify if my code below indeed filters the tweets by country (in this case France):</p>
  
  <pre><code>tag=„NBA"
  # determine place id corresponding to country coordinates
        geo=GET("https://api.twitter.com/1.1/geo/search.json?query=France&amp;granularity=country",
        config(token = twitter_token))
        geo &lt;- content(geo, as = "text")
        geo=fromJSON(geo)
        country_id= geo$result$places$id
  # use id to filter tweets by country
        req=GET(sprintf("https://api.twitter.com/1.1/search/tweets.json?q=%%23%s&amp;src=typd&amp;count=100&amp;id=%s",
                    tag, country_id),
            config(token = twitter_token))
        req &lt;- content(req, as = "text")
        newTweets=fromJSON(req)
  </code></pre>
  
  <p>Is this the way to go?</p>
  
  <p>What I find somewhat puzzling is that according to... </p>
  
  <p><a href="https://dev.twitter.com/rest/reference/get/search/tweets" rel="nofollow">https://dev.twitter.com/rest/reference/get/search/tweets</a></p>
  
  <p>...there is only the possibility to set option <code>geocode</code> but nothing is mentioned regarding <code>place_id</code> </p>