Skip to content
Python code for collecting a set of geo-located users in a specific city. Based on the paper Building a Location-Based Set of Social Media Users by Tauhid Zaman and Christopher Marks (https://arxiv.org/abs/1711.01481)
Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
miscellaneous
.gitignore
LICENSE
README.md
README.pdf
function_HELPER.py
get_ULDS.py
get_tweets.py
twitter_credentials.py
userData_class.py

README.md

User_Geo_Location

Make sure to fill up the twitter_credentials.py file with your API keys.

alt text

Make sure that you have all requirements installed (cf readme.pdf)

You can run get_ULDS.py to insert a set of users in a database, and, once this is done, get_tweets.py to recover the timeline of the later set of users.

To run get_ULDS.py, you must redefine the location_terms characteristic of the city or town you target.

alt text

Similarly, language, UTC offset and geocode name ought to be tailored to your target location.

alt text

Finally, you'll need to manually search for a small sample of seed users you know are in the location for sure, and update the following:

alt text

There exists various ways to get a user_id from a screen_name, one of which is going to https://tweeterid.com/:

alt text

You can’t perform that action at this time.