In this project, we take a deep dive into Trump and Biden’s Twitter followers. By utilizing data visualization techniques, entropic analysis, and machine learning modeling, we investigate the polarization between Trump and Biden followers, predict who a Twitter user is most likely to follow based on the accounts they follow, and analyze other significant trends.
Check out our website!: https://johnsont4.medium.com/twitter-analysis-trump-vs-biden-8dafa77ac7d5
- Install all libraries (tqdm, os, twint, pandas, numpy, sklearn)
- Run scrapeUsers.py to scrape followers from Trump and Biden (or whoever else you insert into the program)
- Run dataCollector.py to create the 3 groups: Trump followers, Biden followers, and both followers
- Run matrixCreator.py to create the matrices and target arrays
- Use jupyter notebooks to import the matrices and target arrays and analyze the data however you want! (Our analysis can be found in FinalSubmission.ipynb)
- *BONUS: Run youTry.py to see how likely a specific user is to follow Trump or Biden!
If you have any questions or concerns, please reach out! johnsont4@carleton.edu