This is an archived article that was published on sltrib.com in 2016, and information in the article may be outdated. It is provided only for personal research purposes and may not be reprinted.

What do "Parks and Recreation" and "The West Wing" have in common?

Other than the fact that both aired on NBC for seven seasons. And that both were about public servants.

Both the 2009-15 sitcom and the 1999-2006 drama ended their runs with surprisingly accurate predictions.

The final season of "Parks and Recreation" aired in January-February 2015, but it took place in 2017. And in one episode — which aired on Jan. 13, 2015, and was written in mid-2014 — Tom (Aziz Ansari), Andy (Chris Pratt) and Lucy (Natalie Morales) were seen in the city of Chicago.

"I think you're really going to like it here," says Lucy. "And, obviously, everyone's in a really great mood now because of the Cubs winning the World Series."

Lucy was clearly talking about the 2016 season. And, of course, the Chicago Cubs ended their 108-year drought on Thursday by winning the World Series.

Coincidence? A joke?

Not according to "Parks and Rec" writer/producer Mike Schur, a big baseball fan who told the Washington Post it was a genuine prediction.

"I was the only person on the staff who cared about baseball enough to track the Cubs' minor-league system," he told the Post.

Hey, I'm willing to let Schur have his moment of glory.

As good as the "Parks and Rec" prediction turned out to be, it still can't touch the final season of "The West Wing" for its insanely accurate peek into the future. Much of the sixth season and most of the seventh season centered on the race to succeed President Josiah Bartlet (Martin Sheen).

"West Wing" executive producer John Wells confirmed at the time that the Democratic nominee — a young, relatively inexperienced congressman by the name of Matthew Santos (Jimmy Smits) — was based on young, relatively inexperienced U.S. Sen. Barack Obama.

Actually, Obama was used as a template when he was still an Illinois state senator, after he came to national attention with a stirring speech at the Democratic National Convention.

Santos clinched the fictional nomination with a stirring speech at the fictional Democratic Convention in the Season 6 finale.

Santos had been talked into running by Josh Lyman (Bradley Whitford). And Josh was based on another real person — Rahm Emanuel, who had been a senior adviser to President Bill Clinton. There's even a scene in the "West Wing" pilot in which Josh reads a newspaper story about how he'd mailed a rotting fish to a congressman who crossed him — something that, reportedly, Emanuel actually did.

In the finale, Santos has just been inaugurated and Lyman is his chief of staff — 2½ years before Obama was elected and 32 months before he was inaugurated and Emanuel — now mayor of Chicago — became his first chief of staff.

Depending on the outcome of Tuesday's election — if Hillary Clinton is elected the first female president of the United States — we'll see who claims credit for predicting that.

The list includes Patty Duke in "Hail to the Chief" (1985); Geena Davis in "Commander In Chief" (2005-06); Cherry Jones in "24" (2008-10); Alfre Woodard in "State of Affairs" (2014-15); Lynda Carter in "Supergirl" this season; and Julia Louis-Dreyfus in "Veep," which returns in 2017.

Stay tuned. …

Scott D. Pierce covers television for The Salt Lake Tribune. Email him at spierce@sltrib.com; follow him on Twitter @ScottDPierce.