Bernie Sanders had a great week. He won big in five Western caucuses: Washington, Alaska, Idaho, Utah and Hawaii. It was enough to whittle Hillary Clinton’s pledged-delegate lead to around 230, despite her own solid win in Arizona.

To get to a majority, not counting superdelegates, Mr. Sanders now needs more than 56 percent of the remaining pledged delegates.

It might not look too daunting after he just won at least 70 percent of the vote in five states. But the remaining states aren’t especially welcoming for him. Mrs. Clinton’s delegate advantage seems likelier to grow over the rest of the contests than to shrink. The remaining states force Mr. Sanders to confront his big weaknesses: affluence, diversity, establishment-friendly areas and closed primary contests.

To get a sense of how the rest of the Democratic race plays out, consider how the remaining states might vote if they follow the same demographic patterns of the first half of the primary season. The patterns include the results for all of the states where The Associated Press has reported the results by county.