Is your name a clue about your political party?

Mapping names by political party using Python’s WordCloud

Tania
My Data Science Projects

--

What can your name tell about you?

According to an article from The Washington Post, a lot. Your age, your job where you live, and even... your political leaning.

Eric Olivier (PHD), Professor at the University of Chicago, studied the differences in taste of liberals and conservatives, expressed through baby names. He found out that conservatives, as well as people with a higher socio-economic status, tend to give their babies more traditional names. Meanwhile, liberals have, overall, less economic capital and more cultural capital, which they express through giving their babies more unusual and artistic names. Verdant Labs even created a Politics of First Names chart, which you can check out here.

Through my project, I tried to represent those name differences with wordclouds, using a Kaggle dataset with all 166th US House of Representatives.

Let’s dig into the details of the project!

Overview of the Kaggle dataset

After formatting the dataset, I created two new tables, one with only Democrats, another one with only Republicans. For each, I transformed the rows into a text object, then I created wordclouds from each of them. I got lost in the silly features one can add to wordclouds:

Creating wordclouds following a color pattern

But I guess you’re more interested in the analysis than by hearing me brag about my wordcloud-creating skills. So here’s what I found:

Democrats VS Republicans
  1. The first thing we notice is that there’s some recurrent names, notably David, John, Mike, Mark.
  2. Exclusively Democratic names seem to be James, Joe, Donald (if you’re surprised by the later, remember that from 2001 to 2009, Trump was affiliated to the Democratic party). Exclusively Republican names tend to be Michael, Tom, Bill, Steve. I compared my findings to the Politics of First Names chart: Michael and Mike are indeed more Republican, but it’s the only common points between both analysis…
  3. In the Democrats cloud, there’s significantly more womens’ names (Lisa, Yvette, Katie, Katherine, Debbie, Lizzie…) than on the republican side (Liz).
  4. Unsurprisingly, more culturally diverse names on the liberal side: Salud (Filipino), Raul (Hispanic), Tulsi (Asian or Pacific Islander). Note: I checked the ethnic statistics for each name on mynamesstats.com

Conclusion: I suspect that the dataset I used (the full list of the 166th House of Reps names) was not large enough to get an accurate analysis — this is probably why I did not manage to reproduce the results from Verdant Labs’ chart. Plus, given the average age of members of the House of Representatives (60 years old), the names may not reflect the current trends in terms of naming babies. However, we did generate pertinent insights, such as the higher diversity on the Democratic side when it comes to ethnicity and gender.

Links:

--

--