Donald and Melania Trump cast their votes on Nov. 8, 2016, in New York. (Chip Somodevilla/Getty Images)

Ideally, a political party would like House districts drawn so that its candidates can confidently win by about five percentage points each time. You want to win, obviously, and you don’t want to constantly have to scramble in hard-fought races. But you also don’t want to keep winning by 30 points. After all, House districts are drawn to incorporate groups of voters, and if you’re winning one district by 30 points all the time and losing the one next to it by 10 points, you’d very much like to redraw the line between them until you win both by 10.

To some extent, this is what gerrymandering does — redrawing boundaries to the advantage of whichever party is doing the drawing. (The party that wins that seat by 10 points, after all, would like to keep winning it.) But sometimes redrawing the lines in a way that evens everything out is all but impossible.

Why? One reason is that Democrats are much more likely to live in cities, and cities are often heavily Democratic in a way that suburbs are not.

Last September we took precinct-level data and made maps showing vote density in 2016 by neighborhood. Here’s the Gulf Coast.

Dark blue indicates heavily Democratic votes. Dark red shows heavily Republican. Lighter colors and white are a more even mix. The cities are dark blue, while the suburbs are white or light red. The Democratic vote, clearly, is more heavily packed in city precincts.

We can look at this another way. Using data from the MIT Election Lab, we can visualize the winning margin of every House race since 1976 (with a few gaps in the data). In 1976, when the Democrats maintained control of the House, the distribution of winning margins is fairly even, from the Democrats winning by 60 points to Republicans winning by about 40. (There were also a lot of uncontested races.) In 2016, though, the Democratic victory margins were evenly distributed from a tie to plus-90 — but the Republican margins were concentrated from a tie to plus-50. Republicans won races by closer margins.

Since 1976, Democrats have consistently won more races by 50 or more points, more often than Republicans.

If we look at that as a function of the total number of seats won, the difference is only slightly less pronounced.

Overall, Republicans had more unnecessary votes (that is, more votes than needed for a victory) than Democrats did. On average, though, the Democratic candidates in 2016 won by about 112,000 votes. The Republicans won by 97,000.

That margin is a problem for the Democrats.

If the sweet spot is, say, a four- to eight-point victory, more Democrats than Republicans landed in that zone in 2016. But even while losing the House by a wide margin, more than 60 Democrats won by more than 50 percentage points.

Either Democrats need to move, lines need to be redrawn — or the Democrats need to get used to a political downside from their self-sorting into America’s cities.