-1

I need to extract Twitter data, specific to a country using the place_country: keyword in the search_fullarchive command.

x<-search_fullarchive("keyword", n=100,fromDate ="202003151558", toDate="202004101900",env_name="name",parse=TRUE,token = Token, place_country:"US")

After execution, I get the error: "object 'place_country' not found."

2 Answers2

0

search_fullarchive() sends requests to the premium Twitter API which uses other operators than the free API. You have to use the place: operator in the search query instead. Type ?search_fullarchive to see the limited documentation on this. Or look at a few imperfect examples here: How to define search queries in rtweet fullarchive and 30day search

d_fornis
  • 29
  • 3
0

Have you figure this out? If not, I had the same issue and I can help.

Your operator place_country:US should be in the keyword search argument x <- search_fullarchive(q = "place_country:US", n=100,fromDate ="202003151558", toDate="202004101900",env_name="name",parse=TRUE,token = Token)

Cheers!

  • How to add a hashtag and a country name like covid and US ? – Soumya Boral May 09 '21 at 20:29
  • I think you can just add replica of this code with your objects: `search_fullarchive("#covid-19", q = "place_country:US", n=100,fromDate ="202003151558", toDate="202004101900", env_name="name", parse=TRUE, token = Token)` – IrenaItova May 12 '21 at 14:11