The Urban-Rural Divide is More Complex Than You Might Think

Using Python to reveal some national differences in thoughts on politics in America.

Adel Wu
7 min readDec 23, 2020

This is a final Data Story Project for COMM318: Stories From Data taught by Dr. Matt O’Donnell.

On November 3rd 2020, I was anxiously sitting at the edge of my seat, chewing my nails while blasting the livestream of the voting results on YouTube. I had piles of work to do but my roommate and I resorted to baking brownies and doing crafts, attempting to ease our mind over the narrow margins between blue and red.

As a news analyzer pulled up each state and their different county percentage breakdowns, I had begun to notice a slight pattern — each state had small specks of pure blue, slowly bleeding out into a vast red sea. Each visualization had the major urban cities superimposed on the map, and they happen to sit right on top of those blue specks: a county level inspection of this year’s election map reveals densely populated liberal epicenters surrounded by large swaths of sparsely-inhabited conservatism.

A map of Pennsylvania and each of its counties, colored on a scale from Red to Blue representing Dem/Rep votes.
A GeoJSON visualization I created of the voting turnout for Pennsylvania, a close swing state, for the 2020 Presidential Election. Philadelphia, Pittsburgh, Allentown, and Erie are the top 4 most inhabited cities in Pennsylvania. Biden ended up beating out Trump with 1.2% more votes. Source: Kaggle & PennShare OpenData

In 2016, Hillary Clinton won just 15 percent of the land area of the U.S., but she led Donald Trump by more than 2 million popular votes.

National Level

Further research led me to the concept coined “The Urban-Rural Divide,” which is the exact phenomenon I saw displayed — this clear realization was slightly jolting yet so obvious at the same time. As someone who has never really dug deep into politics, I wanted to further prove this to myself through analysis of data! I found a vast amount of survey data from a new UChicago Harris/AP-NORC Poll conducted in January 2019. The poll asked over 1,010 adults aged 18 and older nationwide their opinions on political topics ranging from the economy to traits they’d like in a candidate, and also recorded their demographics, notably if they lived in an urban, suburban, or rural area.

A majority of urban residents identify as Democrats, while a majority of rural residents identify as Republicans. Graph by Adel Wu. Source: AP-NORC

The plot to the left shows an association between Residential type and political party leaning: The percentage of Democrats drops significantly as you go from urban to rural, while the percentage of Republicans follow the opposite pattern. Studies have also shown that suburbanites with urban-living experience are significantly more liberal in their political attitudes than those who have lived their whole lives in either suburban or rural communities.

It was clear from the map that counties containing major urban cities were very blue, but was it the case that the further you were from one, the more likely republican you were? What happens in between?


In order to investigate this question, I wanted to focus back in on the state of Pennsylvania, as it was a swing state and is also the state I go to school in. I wanted to find a possible association between the distance between each county and urban city, and how many people vote Democratic in that county. The definition of an urban city can vary, so I decided to pick the Top 5 most populous cities in PA, which were Philadelphia, Pittsburgh, Allentown, Erie, and Reading. I also defined a county’s “location” to be the center of the area geometrically, which is called the centroid.

I took the centroids of all 65 counties in Pennsylvania, and plotted their smallest distance from the 5 chosen cities against the percentage of Democratic voters in their county. With a line of best fit (which best expresses the relationship between those points), a smooth downward sloping pattern appears:

The graph shows a negatively sloped relationship between the two, meaning that the further away you get from a large city, the less likely you are a Democratic voter. Graph by Adel Wu. Source: AP-NORC & Wikipedia

Looking closer at two of the most rightmost points on this plot, they represent Fulton and Potter county. When you place them on the map, the gradient becomes more clear visually as you see the colors change as you get closer to Pittsburgh and Erie.

Fulton and Potter County are two of the reddest counties, and as you can see the line that connects them to their closest urban city spans a nice gradient of counties from light blue to dark red. Graph by Adel Wu. Source: AP-NORC

Candidate Traits

Another interesting section of the AP-NORC Poll was the questions dedicated to asking how excited a participant would be about a political candidate if they had a specific trait. The poll asked: “Would each of the following characteristics of a presidential candidate make you more excited or less excited to vote for each candidates, or wouldn’t it make any difference?” The respondents answered on a valence scale from (1) being a lot less excited, to (5) being a lot more excited.

The traits tested included:

  • Is a woman
  • Is Black
  • Is Latino
  • Shares your religious beliefs
  • Is younger
  • Has served in the military
  • Is lesbian, gay, or bisexual
  • Is Asian
  • Has experience running a business
  • Is White
  • Is older
  • Is transgender
  • Is a man

I wanted to see what kind of a candidate would Democrats and Republicans be more excited to vote for, by categorizing each trait by which party had a higher average valence score. I found that:

  • Democrats are more excited than Republicans about a candidate who has previous office experience, is a POC (black, asian, latino), is LGBTQ, is young, or a woman.
  • The highest ranked trait was having office experience at 3.97. The lowest ranked trait was being transgender at 2.87.
  • Republicans are more excited than Democrats about a candidate who has military experience, has the same religious beliefs, is a man, is a businessman, and is older.
  • The highest ranked trait was being a businessman at 3.86. The lowest ranked trait was being transgender at 1.94.

Across different residential types, having office experience ranked the highest at around 3.7 for all three types. Being transgender and LGBTQ ranked the lowest for all three, at around 2.5 and 2.7 respectively— it seems like the largest hurdle is the remaining prejudice around sexuality and gender. The divide seen in residential types seems to be mirrored with the difference in political party taste.

This divide is also reflected in opinions about Trump. When respondents were asked whether or not they approved of Trump’s handling of economy, taxes, health care, immigration, and trade negotiations, the same pattern appeared with rural residents leading in approval percentages.

Urban residents tend to be more pessimistic about the direction of the country, while rural and suburban residents closely share approval ratings of Trump. Graph by Adel Wu. Source: AP-NORC

The Future

With the 2020 election, a huge topic of contention has been the handling of COVID-19, and it has greatened the rift between rural and urban residents. Rural Republicans who were hit hard economically mostly despised the COVID-19 business shutdowns. Many Democrats called them crucial to protect public health. While some in America blasted the president’s chaotic pandemic response and his spreading of racist conspiracy theories, Trump racked up wins in some rural counties in 2020 by even bigger margins than in 2016. Interestingly enough, counties where voters felt better off today than four years ago swung toward Biden, while counties that declined over the past four years were more likely to shift even more to Trump.

Many foresee this divide only getting greater overtime. While the basis of working-class rural jobs is in manufacturing, the U.S. has lost nearly 7 million manufacturing jobs in the 35 years since 1980, and now the steep rise of automation is threatening to exacerbate the issue more. College-educated citizens are leaving struggling rural areas to live in cities, where wages are higher and more jobs are available. Some even call the urban-rural divide the digital versus blue-collar split, because of the US’s increasing shift to a knowledge and digital economy which heavily favors college-educated, urban dwelling residents.

However, some analysts like Hanna Love and Tracy Loh see it completely different. They claim that this black and white depiction of the “two Americas” is completely inaccurate and could hurt real people who don’t fit this binary narrative. Consequences include overlooking POC rural communities during a pandemic, devaluing the role of rural economies in overall prosperity, and propagating the myth of place-based poverty, thus “concealing effective policy solutions that embrace the interdependence of rural and urban economic futures.” A 2018 Pew study also found that many urban and rural residents feel misunderstood and looked down on by Americans living in other types of communities. About two-thirds or more in urban and rural areas say people in other types of communities don’t understand the problems people face in their communities. Perhaps media has only focused on the differences that drive us apart, instead of what we share and can improve on together.

How can we address the complexity of this ever-changing urban-rural divide?Empathy isn’t enough. We need to take seriously the value, nuance, and diversity of people and places, urban, suburban, and rural. Will the Biden administration be able to balance the fine line between generalization and favoritism?

There’s no easy solution, but we must keep working to get closer!

Disclaimer: I am by no means a data scientist as this is my first dabbling in it, so please feel free to leave comments or contact me!