Across the U.S., denser districts in Congress tend to be more Democratic, and sparser ones more Republican. But there are a few exceptions with their own personalities, from Staten Island to Bernie Sanders land.

CityLab’s recent analysis of the 2018 U.S. Congressional battle found a powerful connection between density and politics. The closer together people in a congressional district live, the more likely that district is to support Democrats, while districts where people life farther apart tend to be represented by Republicans.

Competitive districts as of Oct. 31, 2018 FiveThirtyEight ratings.

Predominantly suburban districts are highly competitive this election, with dozens of seats—mostly held by Republicans—in play. The hundreds of predominantly rural or urban seats are less competitive, with rural seats tending to be safely Republican and urban ones safely Democratic.

But density isn’t a perfect predictor of politics. There are millions of Republicans living in big cities and millions of Democrats living in the country — they just usually get outvoted. But not always. Here are some exceptions to the rule that density equals Democrats and rural equals Republican.

The urban Republican: The Staten Island effect

There are 34 purely urban congressional districts in the country. Almost all of them are overwhelmingly Democratic.

The exception is New York’s 11th Congressional District, located entirely within the borders of New York City, and currently represented by Republican Dan Donovan. More than 90 percent of the district’s residents live in high-density neighborhoods, a situation that is usually associated with support for Democrats.

But New York’s 11th District, largely coterminous with Staten Island, has long been noted as “a rock-ribbed Republican redoubt in a sea of blue,” as Seth Barron described it in City Journal. Republicans have represented the area in Congress for decades, and Donald Trump won 75 percent of the vote in a state legislative district on Staten Island’s south shore—levels Trump usually only reached in the country’s most rural counties.

David H. Montgomery/CityLab

Although the politics is counter-intuitive, density may still play a role. Though Staten Island is denser than most of the country—it has more people per square mile than all but 10 of the more than 3,000 U.S. counties—it’s also the least dense part of New York City. In Barron’s analysis, Staten Island “has long represented conservative values traditionally associated with suburban rather than urban polities”: the “quintessential ‘outer borough’.”

This Republican lean seems likely to continue despite the area’s density. Donovan, the current representative from New York’s 11th District, currently has about an 80 percent chance to win against Democratic challenger Max Rose, according to FiveThirtyEight’s forecast.

Majority-Minority Rural Democrats

On the other side of the spectrum, we have pure rural districts, of which Republicans control 60 of 70. Who are the 10 Democrats holding on to these highly rural districts, and are they likely to continue?

Three of these districts are consistently Democratic despite their rural nature, and seem unlikely to change. That’s because of a factor with even more salience in modern American politics than density: race. Mississippi’s 2nd District and South Carolina’s 6th District are both predominantly rural and majority black. New Mexico’s 3rd District is also majority-minority, with 40 percent of its residents identifying as Hispanic and a significant Native American population. Those districts didn’t just vote for Democrats for Congress; they also voted for Barack Obama and Hillary Clinton in recent presidential elections. All three Democratic incumbents are seen as safe.

David H. Montgomery/CityLab

The rest1 of these rural Democratic districts are places where some combination of race, culture, and history explain Democratic success despite the odds.

One is a swing district with a large but not dominant population of people of color. Arizona’s 1st District has large Hispanic and Native American populations, though it also has significantly more white voters than New Mexico’s 3rd District. Also unlike NM-03, it’s not safely Democratic, and voted for both Donald Trump and Mitt Romney by modest margins. Despite this, it elected Democratic Representative Tom O’Halleran in 2016 after a competitive race. O’Halleran is a favorite to win another term this year.

David H. Montgomery/CityLab

Left leaners in Bernie Sanders country

Two outlier rural districts are in left-leaning New England. Vermont’s At-Large District and New Hampshire’s 2nd District are both white northeastern districts that gave Obama strong majorities in 2008 and 2012 before moving right in 2016, with New Hampshire’s 2nd the more conservative of the two.

Both are heavily white and well-educated, with NH-02 slightly wealthier than Vermont. Vermont has been represented by left-leaning politicians ever since 1990, when a 49-year-old mayor named Bernie Sanders was first elected to Congress. New Hampshire’s 2nd District is more competitive: Trump nearly won it in 2016, and it’s been represented by a Republican in Congress as recently as 2013.

David H. Montgomery/CityLab

Midwest Democrats: Mining towns, blue dogs, and driftless area

Three of the remaining rural Democratic districts are in the upper Midwest, and moved sharply to the right in the 2016 election.

David H. Montgomery/CityLab

Minnesota’s 7th District is the most conservative of the three, both today and historically. It voted for Ronald Reagan and George H.W. Bush in the 1980s, Bill Clinton in the 1990s, and Republicans ever since (with changing but similar boundaries). But ever since 1992, it’s been represented in Congress by Democrat Collin Peterson, one of the last of the old “Blue Dog” coalition of conservative rural Democrats. Peterson continues to win, even in 2016 when Trump won his district by 30 points, but local Democrats expect the area to go Republican whenever Peterson retires.

One of the ten rural Democratic districts isn’t actually a rural Democratic district at all, but rather a fluke of this year’s odd election map: Pennsylvania’s 13th District. It’s currently occupied by Democrat Brendan Boyle, and unsurprisingly, it’s not rural at all, but located within the Philadelphia metro. But Pennsylvania’s Supreme Court redrew and rearranged the state’s congressional district map this year, so starting in January, Pennsylvania’s new 13th District will be rural southwestern Pennsylvania. It’s overwhelmingly Republican and election analysts expect it will be represented by a Republican after November’s election. CityLab’s Congressional Density Index used the boundaries that will be in effect in 2019 for its analysis. Reshuffled Pennsylvania districts also create apparent outliers in other categories, including a second seemingly urban Republican who actually represents a rural district that’s being reclassified as a Philadelphia seat.↩

In southwest Connecticut, the gap between rich and poor is wider than anywhere else in the country. Invisible walls created by local zoning boards and the state government block affordable housing and, by extension, the people who need it.