It is entirely possible, as many have argued, that Hillary Clinton would be the president-elect of the United States if the F.B.I. director, James Comey, had not sent a letter to Congress about her emails in the last weeks of the campaign.

But the electoral trends that put Donald J. Trump within striking distance of victory were clear long before Mr. Comey sent his letter. They were clear before WikiLeaks published hacked emails from the Democratic National Committee. They were even clear back in early July, before Mr. Comey excoriated Mrs. Clinton for using a private email server.

It was clear from the start that Mrs. Clinton was struggling to reassemble the Obama coalition.

At every point of the race, Mr. Trump was doing better among white voters without a college degree than Mitt Romney did in 2012 — by a wide margin. Mrs. Clinton was also not matching Mr. Obama’s support among black voters.

This was the core of the Obama coalition: an alliance between black voters and Northern white voters, from Mr. Obama’s first win in the 2008 Iowa caucuses to his final sprint across the so-called Midwestern Firewall states where he staked his 2012 re-election bid.