I am new to R so I am sorry for any non-well formulated question.
I have a csv file with coordinates of points corresponding to places scattered around London and I want to collect people tweets in these locations to see how many people there are in each place.
I cannot find a code which shows where I should insert the imported file with coordinates so that I can run a query and select only tweets in those coordinates.
and got the following:
Error: could not find function "search_tweets"
Plus, I have 5,000 coordinate points (in a csv file) so is there a way to automatically insert all of them as geocode? it would be impossible to do it manually. The problem is that I have scattered places around, not just one big area with boundaries.
I also thought of extracting all the tweets I get from outdoor spaces in London and then clip the data to my coordinatesin QGIS, but I must find the right keyword to look for tweets.
Could you please turn this into a self-contained reprex (short for reproducible example)? It will help us help you if we can be sure we're all working with/looking at the same stuff.
If you run into problems with access to your clipboard, you can specify an outfile for the reprex, and then copy and paste the contents into the forum.
Since my script includes secret tokens, I will copy it here masking the codes:
> setwd("") # does it have to be a folder in my pc or the website I have created when making a twitter app?
> source("https://urbanstudiesresearch.blogspot.com\") #this would be the website I have created
> install.packages("twitteR")
> library(twitteR)
> consumer_key <-""
> consumer_secret <-""
> access_token <- ""
> access_secret <- ""
> setup_twitter_oauth("consumer_key","consumer_secret","access_token", "access_secret")
> Yes
> hrc <- search_tweets("square", n = "1000", geocode = "-0.072841, 51.514047, 10me")