Good morning.
I have been using Tweet Downloader to download tweets for research on tourism and mobility. I am happy about the launch of this tool since I don’t need to block myself on Python.
However, I’ve seen two issues I’d like to comment.
The main issue is that the geo field is empty. In query parameters of the tool, I have selected in the filtering options that the tweets must have geo “matches Tweets that have Tweet-specific geolocation data provided by the Twitter user.”. I need geolocated tweets so I can perform spatial analysis on GIS. However, when I check the json file, I see that every tweet has an empty geo field (“{}”). So as result I have a collection of tweets that aren’t geolocated.
Another issue is that I’ve tried to download also tweets including the field location from users.field, with the goal to check if an user is a city resident or a tourist. In the json file, that field isn’t listed (I have author_id which I guess is the result from having marked the field id from users.field, but I don’t have any location field).
Thank you for your help.
Thanks, @cartografo87. I’ll talk with the team about this and let you know.
What was the full query you used? Maybe the has:geo operator was part of an OR clause and didn’t get picked up?
Also the lack of location field for a user may be due to not specifying the right fields, or the fact that location is a free text field, so may not actually be a location.
Another reason is that users are included in the includes part of the response, not data, so the information could be there but not linked up.
Give twarc and twarc-csv a try to generate the CSV, as this does a bunch of preprocessing for you: GitHub - DocNow/twarc-csv: A plugin for twarc2 for converting tweet JSON into DataFrames and exporting to CSV. you can use it as a command line tool so you don’t need to write python, but you do need to ahve it installed
I used an AND clause with a bounding box. In the query it appeared like this: bounding_box:[-6.167793 37.251145 -5.791512 37.499254] has:geo
In theory, according to the tool, doing that makes me download tweets with specific geolocation data. But as I commented before, the geo field appeared empty.
I’ll check twarc-csv, thank you.
1 Like
The query is correct but by default, you only get the id and text. Under “Choose query params” you can select the following expansions as geo.place_id, tweet.fields as geo, and place.fields as geo.
2 Likes
Hello. Thank you very much for the help. I didn’t activate the extensions before so that could be the problem.
1 Like