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)

License

zlisto/User_Geo_Location

Repository files navigation

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

About

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)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages