As urban and rural communities are becoming more distinct along demographic lines, they are also becoming more polarized politically. Americans in urban and rural communities have widely different views when it comes to social and political issues. From feelings about President Donald Trump to views on immigration and same-sex marriage, there are wide gaps between urban and rural adults.

While these differences have been widely documented, the survey finds that, on some issues, they can be attributed to differences in the partisan composition of urban, suburban and rural areas, rather than in viewpoints that are rooted in a particular type of community. Rural areas tend to have a higher concentration of Republicans and Republican-leaning independents, while a majority of Americans in urban communities identify as Democrats or lean toward the Democratic Party. These patterns have become more pronounced over the past two decades as rural areas have moved in a Republican direction and urban counties have become even more Democratic. Americans who live in the suburbs are about evenly divided in their partisan loyalties, and that has generally been the case in recent decades.

When it comes to abortion rights, the significant gap in attitudes between urban and rural residents – 61% of those in urban areas compared with 46% in rural areas say abortion should be legal in all or most cases – virtually disappears after controlling for party. Similar shares of Republicans in urban, suburban and rural communities express this view, as do nearly equivalent shares of Democrats in urban and rural communities.

A similar pattern can be seen on the question of whether the economic system unfairly favors powerful interests, or if it is generally fair to most Americans. Overall, urban residents are more likely than those living in rural areas to say the economic system is unfair, but that difference is not notable within party groups.

The same can be said of views on the country’s changing demographics. Across community types, views are similar within the Republican and Democratic coalitions on the issue of nonwhites making up a majority of the population in the future, despite differences among urban, suburban and rural residents overall.

In some cases, however, differences across community types remain even after taking partisanship into account. For example, rural Republicans are more likely than Republicans living in urban areas to say the recent legalization of same-sex marriage is a bad thing for the country.

Urban and rural Republicans have somewhat different views on Trump

Asked to rate President Trump on a “feeling thermometer” ranging from 0 to 100, a majority of Americans give Trump a very cold (51%) or somewhat cool (8%) rating, while 10% rate him a neutral 50 on the 0-100 point thermometer. By contrast, 31% of Americans give him a very warm (22%) or somewhat warm (9%) rating.

Trump’s ratings are particularly warm in rural areas, where four-in-ten rate him warmly. By contrast, 19% of people in urban areas give Trump a warm rating.

These differences by community type remain, even after controlling for party. Among Republicans, 56% of rural residents give Trump a very warm rating, compared with 48% of suburban and 46% of urban Republicans.

Within the Republican coalition, there are significant age gaps in views of Trump. In the suburbs, the share rating Trump very warmly is substantially higher among Republicans ages 50 and older (57%) than among Republicans younger than 50 (38%).

This gap persists among rural Republicans, a group largely considered central to Trump’s base. Younger rural Republicans are less likely than their older counterparts to rate Trump very warmly (44% vs. 66%).

Among Democrats, community type differences are more modest: 84% of suburban Democrats give President Trump a very cold rating, compared with 78% of urban Democrats and 75% of rural Democrats. And across community types, age plays less of a role in Democrats’ views of Trump than among Republicans.

Similarly, views of Barack Obama are divided by community type within parties: 70% of Republicans in urban areas give Obama a cold rating, compared with 78% of Republicans in rural areas. And urban Democrats are more likely to give Obama a warm rating (83%) than rural Democrats (72%).

Urban Republicans are more evenly split on social issues than rural Republicans

On the issue of same-sex marriage, the parties have long been divided. Still, controlling for partisan differences, the urban-rural divide persists on this issue. While 71% of rural Republicans say the legalization of same-sex marriage is a bad thing for the U.S., Republicans in urban areas are significantly less likely to say the same (56%).

Among Democrats, there is less of a distinction. Urban and rural Democrats largely agree on the issue of same-sex marriage (71% of urban Democrats and 67% of rural Democrats say it is a good thing). Suburban Democrats have a somewhat more favorable view (78% say this is a good thing).

A similar pattern can be seen in views of societal priorities when it comes to marriage and family. Respondents were asked which of the following statements came closer to their own views, even if neither is exactly right: Society is better off if people make marriage and having children a priority, or society is just as well off if people have priorities other than marriage and children.

Among Republicans, there is a wide gap by community type. Urban Republicans are split, with 53% saying society is just as well off if people have other priorities than marriage and kids and 45% saying society is better off if people prioritize marriage and kids. By contrast, majorities of rural (57%) and suburban (60%) Republicans say the latter.

Among Democrats, views on immigration differ by community type

As the immigrant share of the U.S. population nears a historic high, Americans are largely divided by party and community type when it comes to views of immigrants. Among Democrats, those in urban (75%) and suburban areas (81%) are more likely than those in rural areas (65%) to say the growing number of newcomers strengthens American society rather than threatening traditional American customs and values.

Differences on this question within the Republican coalition are more modest: 78% of rural Republicans say the growing number of newcomers threatens traditional American customs and values. This compares with 74% of suburban Republicans and 70% of urban Republicans. Relatively few Republicans, across community types, say immigrants strengthen the country.

When asked about the impact immigrants are having on their own community, a similar pattern emerges, with Democrats divided across community types. Among those who say there are at least a few immigrants in their local community, 56% of urban Democrats say their impact is mostly positive, compared with 43% of rural Democrats.

Overall, urban and suburban residents are more likely than those living in rural areas to say there are immigrants living in their local community, but even among rural residents the vast majority – 79% – say there are at least a few.

Beyond partisanship, large racial, gender and generational gaps exist within communities on key issues

Depending on the type of community in which Americans live, views differ sharply on whether white people in the U.S. benefit from advantages in society that black people do not have.

Americans living in rural areas are roughly evenly divided: 52% say whites do not benefit too much or at all from advantages in society that black people do not have, and 47% say they benefit a great deal or a fair amount. By contrast, three-in-ten people living in urban areas say whites do not benefit from societal advantages; 69% say they do.

Overall, the views of whites differ sharply from those of nonwhites on this issue.4 While about half (51%) of whites say people in their racial group do not benefit from societal advantages, just 22% of nonwhites agree.

The racial gap persists across all three community types. White rural residents are twice as likely to say whites do not benefit from extra advantages (60% vs. 30%). Similarly, there is a wide gap between the share of whites (49%) and nonwhites (20%) in suburban communities who say whites do not benefit from societal advantages.

Even so, among nonwhites there is a divide between those living in urban and rural areas. While 18% of nonwhites in urban areas say whites don’t have extra advantages, 30% of rural nonwhites say this.

When controlling for differences in partisanship across community types, the racial divide persists on this issue. Among Republicans living in suburban areas, 72% of whites say that whites don’t benefit from societal advantages, compared with 52% of nonwhites – a 20-percentage-point gap. And among suburban Democrats, whites are 8 points more likely than nonwhites (19% vs. 11%) to say this.

Similarly, there is a racial gap in views of demographic change in the U.S. Across all community types, nonwhites are far more likely than whites to say it’s a good thing for the country that nonwhites will make up a majority of the population in 25 to 30 years. This pattern can also be seen in the suburbs, where 14% of whites say this type of demographic change is good for the country, compared with 46% of Hispanics and 56% of blacks. A majority of suburban whites (64%) say this demographic change is neither good nor bad for the country.

Millennials are significantly more likely to favor same-sex marriage than Gen Xers, Boomers across all community types

Millennials across urban, suburban and rural areas are significantly more likely than Baby Boomers and members of the Silent Generation to say they think the legalization of same-sex marriage is a good thing for society.

This difference is stark in the suburbs. About seven-in-ten Millennials living in suburban areas (72%) say the legalization of same-sex marriage is a good thing. Among Gen Xers as well, a majority (59%) say this is a good thing for society. Boomers in suburban areas are more divided in views on same-sex marriage: About half (51%) say it is a good thing for society. Just one-third of suburban Silents say this is a good thing.

These generational differences on same-sex marriage remain, even when controlling for differences in the partisan composition of each community.

Views of immigrants also differ widely by generation. Roughly half (52%) of Millennials in rural areas say the growing number of newcomers from other countries strengthens American society compared with 36% of Baby Boomers in rural areas and 32% of Silents who say the same.

This pattern is nearly identical across community types, with Millennials in urban and suburban areas also more likely than Boomers and members of the Silent Generation to say newcomers strengthen society.

Across community types, women are more likely than men to say obstacles still exist for women

Majorities of Americans in all three community types say there are still significant obstacles that make it harder for women to get ahead than men. Americans living in urban areas are somewhat more likely to say this is the case (60%), than are those in suburban (55%) and rural (53%) areas.

However, there is a significant gap between men and women on views about the obstacles women face to get ahead. Women are far more likely than men to say significant obstacles still exist that make it harder for women to get ahead. Two-thirds of women, compared with 46% of men, say obstacles still exist.

And this gender gap is consistent across all types of communities. For example, 62% of rural women say they think obstacles still exist for women, compared with 43% of rural men.

Even after controlling for party, the gender gap persists across community types. For example, among Republicans in rural areas, women are about twice as likely as men to say obstacles still exist that keep them from getting ahead (53% of rural Republican women vs. 27% of rural Republican men).