Python as a ‘Build-a-Bot Workshop’

One thing you can do with Python is interact with social media platforms through their APIs. As such, it's possible, using Python, to create social media bots that can do all sorts of things. Here are some resources that demonstrate the potential for using social media bots in social scientific research:

Brooker, P. (2019) My unexpectedly militant bots: A case for Programming-as-Social-Science, The Sociological Review [online first]: 1–21.

Wilkie, A., Michael, M., and M. Plummer-Fernandez (2015) Speculative method and Twitter: Bots, energy and three conceptual characters, The Sociological Review 63(1): 79–101.

The @ParliamentEdits and @DroptheIBot Twitter accounts are very interesting examples of the use of social media bots to respond to social problems. @ParliamentEdits tweets information about changes made to Wikipedia pages (e.g. the name of the page and a link to the most recent edit log where all changes are made visible), where the computer used to do the editing has an IP address linked to the UK Houses of Parliament. This bot account acts as a service that highlights whenever people working in UK government might be attempting to steer public discourse and public relations around political issues. @DroptheIBot is a now-defunct Twitter account that used to scan Twitter for usages of the term ‘illegal immigrant’ and automatically respond to the users of that term with a phrase ‘People aren't illegal. Try saying ‘undocumented immigrant’ or ‘unauthorized immigrant’ instead.’ In this way, @DroptheIBot aimed to encourage people to pay attention to the ways our common language usage might serve to dehumanise and demonise others.

There are unlimited possibilities of what you might use Python to do, in terms of creating bots that highlight or intervene in social problems. There are also numerous ethical issues that may arise in doing so  –  for instance, @DroptheIBot was banned from Twitter, on the grounds that its responses to the term ‘illegal immigrant’ happened so frequently that it contravened Twitter's terms and conditions around API usage; it also received numerous complaints from the tweeters who had used the term ‘illegal immigrant’ who did not appreciate a bot (and some users did not know it was a bot at all!) interrupting their timeline. So, there's a problem here that you now have the skills to work on.

Can you design and implement a social media bot, on a platform of your choice, that responds to a social problem in some way, but which does so ethically and in a positive/constructive way?

This is a rather large project that may involve multiple different elements of Python working together  –  data collection, social media API usage, scheduling a script to run at certain times of day, producing a variety of (perhaps even randomised) content to post, etc  –  but taking on a project like this will give you lots of practical experience with Python along the way.