/twitter-gender-distribution

Compare number of women, men, and nonbinary people among my friends and followers.

Primary LanguagePythonApache License 2.0Apache-2.0

Gender Distribution of Twitter Friends and Followers

Twitter analytics estimates the gender ratio of your followers, but it doesn't tell you about those you follow--your Twitter "friends"--and it doesn't let you analyze other people's friends and followers. Neither does it notice gender-nonbinary users.

In June 2016 I've deployed it temporarily for public use at proporti.onl.

Read my article about this code: "72% Of The People I Follow On Twitter Are Men."

Tweet me your thoughts.

Install

This script requires Python 2.7, and the packages listed in requirements.txt.

python2.7 -m pip install -r requirements.txt

Command-line Use

Pass a Twitter username to analyze the user's friends and followers:

python2.7 analyze.py jessejiryudavis

Test

From the repository root directory:

python2.7 -m unittest discover -v

Website

Start a Flask server:

python2.7 server.py 80