This is a small project for a university project to download and analyse tweets from followers of certain German parties. The project involves analysing tweets based on the moral foundation theory by Haidt.
- gettweets.py: downloads the tweets of the follower using tweepy
- deletedouble.py: finds unique follower, i.e. follower that only follows one party
- postprocessing.py:
- remove retweets
- remove words containing @ and http
- replace corresponding unicode with äöüß
- lower character and split
- match.py: count occurences of moral dictionary words. Output is a dictionary with party and count for each category. This output need to be saved in a csv as input for chi_test.py.
- chi_test.py: does chi-square test for scores. Input has a format similar to the moral_results.xlsx (see scores.csv in GDrive)
- countfrequency.py: counts most most occuring words after omitting stopwords