Boston City Councilor Ayanna Pressley announced last week she is challenging veteran Congressman Mike Capuano. They are both Democrats, meaning the contest between them is for votes in the primary in September. Whoever wins the primary is almost certainly the next representative, since the Democratic primary is pretty much the whole competition.

Since Pressley's announcement, much of the coverage has noted the diversity of the district as a key dynamic in how the race may unfold. The urban district -- which includes large parts of Boston, Cambridge, Somerville, Everett and Chelsea -- is alone in Massachusetts as the only minority-majority congressional district. The most recent Census Bureau data shows 41.5 percent of the district’s residents are non-Hispanic white.

Right now, at least, it's unclear how that demographic diversity will impact the candidacies of the incumbent Capuano, who is white, and Pressley, the first African-American woman elected to the Boston City Council.

But while it’s true that the 7th is less than half white in terms of population, the district’s voters are less diverse. According to voter data provided by The Novus Group, a political data firm in Boston, approximately 55 percent of the registered voters in the district are white.

(Courtesy MassINC Polling Group)

It’s not unusual for whites to make up a larger share of voters than they do of the population, due to differences in citizenship status, and different propensities to register to vote, even if eligible. According to the census, the 7th district has the largest number of non-citizen residents of any district in the state, at 17 percent.

But the electoral slant in the 7th district doesn’t stop with who is eligible or registered to vote. White voters tend to make up larger shares of the electorate in lower-turnout contests such as party primaries. The voters who decide this year's congressional primary will very likely by mostly white, potentially by a large margin. In the 2014 Democratic primary, for instance, about two thirds of the district’s voters who turned out were white.

It’s not a guarantee that past is prologue in terms of turnout patterns. There are some reasons to believe that 2018 could produce unusual electorates. In elections since Donald Trump assumed office, black women have often voted in particularly large numbers compared to historical norms, and Democrats across the board have been energized. Democrat Doug Jones owes his Alabama U.S. Senate win at least partly to extraordinary turnout among black voters, and especially black women. In this environment, if there’s any district in Massachusetts that could produce a majority-minority electorate in a primary election, it’s the 7th. But the shift in turnout to do so would have to be massive.

In the 2014 Democratic primary, about two thirds of the 7th district’s voters who turned out were white.

Though the racial makeup of the district has drawn the most early attention, the gender makeup of Democratic primary voters is also pertinent. The majority of registered Democrats, and the majority of independents who pull the Democratic primary ballot, are women. In 2014, 56 percent of voters in the district’s primary were women. This is not unusual; the composition of Republican and Democratic primary electorates are consistently different.

Capuano points out it’s not clear voters will choose based on demographic differences, and he’s right on that.

“Look, I cannot be a woman of color," he told WBUR last week. "And if that's what people care about, that's fine. I accept that, I understand that. I just don't think there are that many people who will vote for me because I'm a white male or vote against me because I'm a white male.”

No matter how voters choose, unseating an incumbent is never easy, particularly one who appears well liked and scandal-free. Though in what could be a wave year for Democrats fueled by discontent among women, Pressley might have a shot, even against a popular incumbent. As they fire up their campaigns, both candidates will need to look to appeal to voters across race and gender lines.