In October, 2016, I wrote that there was no way Trump could be president. I stand by that prediction. Every single indicator said Trump could NOT be president. And every single indicator was completely wrong. The best said Trump had a 25% chance. Most said 0%. I accepted the 25% as the best, but still remote.
No one knows if Secretary Clinton lost or Trump won (or a bit of both). Trump should not have won the nomination. But he did. He didn't win the vote, but US rules says that New York and California don't get as many votes as they think they deserve, and that goes back to the 18th century: when 13 colonies agreed to join in a single polity, the small colonies wanted some protections from the big colonies. And they got them.
The Senate heavily favours small states and is not proportional. The Electoral College favours small states and is not proportional. And Secretary Clinton's Ada artificial intelligence programme that told her how to win the election proved to be artificially intelligent, not really intelligent.
And now we all have to see if Trump will be a disaster, or just another typical US President (i.e., a disaster).