Closed kavyanjalik closed 3 years ago
Hi
This is possible via the Query you enter. The only thing you need to keep in mind is that only small percentage of Tweets have geo-tagged information associated with them. Thus, relying only on geo-tagged Tweets alone might introduce some bias in your dataset.
You can do this by entering a search query with the longitude, latitude and the radius like this: The Radius has to be smaller than 25 miles according to twitters docu
library(RTwitterV2)
Bearer_Token <- ""
query <- '"New York" point_radius:[-73.942859 40.629653 10mi]'
tmp <- full_archive_search(token = Bearer_Token, search_query = query, n = 1500)
I will probably add a param for the search function soon which will make it easier to use this feature.
Ther are other possible ways to restrict the search to location with the following operators:
place:"new york city OR place:seattle OR place:fd70c22040963ac7
place_country:US
bounding_box:[west_long sounth_lat east_long north_lat]
(again box is not allowed to be bigger then 25mi x 25mi)Thank you so much! Yes, I agree with the bias in the dataset, which I will keep in mind.
Added a new function (v0.2.1) to make it easier to search for tweets within a Country (place_country), point_radius and bounding_box.
Hello, Thanks a lot for your support with the R package. Wanted to ask if it is possible to set the location filter to download tweets only from selected countries? Thank you!