JacobWeinbren / Voter-Bot

tweets from @VoterBritish

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Voter-Bot

So a brief Q&A. I'm a student so the code is a bit messy, but I've broken it up.

Where is the data from?
Wave 13 of the BES Study. It's in effect survey data weighted to the post 2017 election. After weighing, it was exported into a giant (relative to GitHub file standards) csv file called Voters.csv. Headers have all the variable names and then each voter has the responses. On the BES website, with the SPSS file, there's the full list of survey questions & variables.

How do you make the tweets?
The python program main.py recursively goes through each of the voters and in order just replaces variable values for prepared pieces of text. LA.csv is just a reference to convert codes to constituencies. The stuff it collects is around political views, demographics etc. The issues weren't picked with a clearly stated agenda at the time, just as salient/divisive questions. At the end, it goes through random issues until it finds a tweet under 280 characters. It's all put in a giant file called lines.

How do you do the tweeting?
bot.py does the tweeting. And for API reasons, access.py just uses my key to do the tweeting but it's git-ignored. It's done from a pythonanywhere.com bot every hour. Count is a file that counts the current line.

Why the emojis?
I thought it would look nicer.

What should I do now?
Follow Chris and Dan, they're good people.

GNU License (except for the stuff that BES owns)

About

tweets from @VoterBritish


Languages

Language:Python 100.0%