While many historic events are mentioned throughout the show, we find that the show itself does not follow the real life timeline. Bartlet was elected in 1998, 2 years prior to the election of George W. Bush. The show ends with the election victor of Matt Santos in 2006, 2 years prior to the election of Barack Obama. There are many theories to why the timeline is different in the show from our real life.
The biggest theory is that when President Richard Nixon resigned in 1973 (rather than 1974 like he did in real life), it was done prior to his appointing of Gerald Ford as his second VP after invoking the 25th amendment to appoint a new Vice President, therefore, there was no Vice President to take over. The theory goes on to say that the Speaker of the House temporary took over while the country decided to hold a special election to elect a new President rather than have the Speaker finish off Nixon's term. It is most likely that the Speaker turn President did not ran for his own term.
Many believe that Jimmy Carter was elected President in November of 1974 and was sworn-in as the 39th President on January 20, 1975, less than two years after Nixon resigned from office. Ronald Reagan does defeat President Carter in 1978 like he does in reality. Reagan is re-elected in 1982. However, Vice President George H.W. Bush loses the Presidential election of 1986 to Democrat D. Wire Newman. When President Newman ran for re-election in 1990, he lost to Republican California Governor Owen Lassiter. Lassiter won re-election in 1994.
Four years later, we go to the election of 1998, where John Hoynes and Josiah Bartlet run for the Democratic nomination. Bartlet wins the nomination and names Hoynes his Vice President. And everything else is history.