Donald Trump’s election came down to a series of successes in surprising places, including the battleground states of Ohio, Pennsylvania, Michigan, and Florida. After a night spent standing mouth agape, journalists from a variety of mainstream media outlets began to ask how the polls had missed this surge of Trump support. Wasn’t Hillary Clinton poised to walk away with this election? Instead, the election showed the limitations of a data-only model of analysis and the need for the on-the-ground reporting eliminated with tighter newspaper budgets.

To those persuaded by numbers, it likely looked like a second Clinton presidency was nigh. After all, the Princeton Election Consortium, drawing on a complex set of data and number crunching, asked “Is 99% a reasonable probability [for a Clinton win]?” the week before the election. On Twitter, Nate Silver of FiveThirtyEight responded heatedly to the Huffington Post’s Ryan Grim, who had accused him of underreporting Clinton’s chances of success, particularly in Florida, a state which Trump later won. This was after Silver projected that Clinton had a 64 percent chance of winning the election.

The nail-bitingly close results in several states certainly were within the margin of error. In the end, the zeitgeist was for Trump and the election results primarily surprised those whose predictions relied heavily on polling data. Although even subtle shifts in polling data lead the headlines for months preceding an election, political scientists note that they rarely do much to persuade voters one way or another.

“My sense is that these effects [of polling data] are pretty small, since some people don’t follow polls, many don’t completely trust them, they change over the course of the election, and in close elections you can find polls pointing in either direction,” said Boston University political science professor Dino Christenson in an interview three weeks before the election.

Despite this, the media often has what Christenson calls an “obsession with the horse race,” following day to day shifts in a candidate’s polling numbers. This can obscure the fact that the majority of election success comes down to turnout.

“Persuading potential voters to vote can be more important than persuading them to prefer a candidate,” said Christenson, “since the latter has already been decided for most.”

This is the basis for the so-called “likely voter” metric studied in certain polls. As with the rest of polling, what determines a likely voter is more art than science. This is part of why polls include a margin of error. Trump’s win, while surprising, was within the margin of error for most of the polling data.

What has stunned many was an extreme focus on polling data at the expense of coverage of local issues in the states which decided the election. In part, this shows a weakness in the modern media landscape, which is primarily based in large cities on the East Coast. Of the ten U.S. papers with the largest circulation, six are located either in New York City or Washington, D.C. Location does affect coverage, as papers focus on local issues. In 2016, this meant that the mainstream media did not have much coverage of local issues in swing states.

For example, in the month before the election, the New York Times published only 24 stories with the dateline “Detroit” that weren’t related to sports. Although Michigan was one of the closest swing states, the New York Times had very little coverage of what issues mattered to voters there.

Local papers could have used this as an opportunity to cover the race as it unfolded on a local level. However, some of these papers relied instead on analysis and data, rather than reporting, when making their predictions. The Detroit Free Press, in its election postmortem, “relied on a trusted election analyst, as it has for many years, to collect results from key precincts to help determine the outcome of the race.” This year, that analysis failed to account for Trump’s success among rural voters, and the paper even falsely declared victory for Clinton early on Election Night.

Trump’s narrow victory in Michigan was essential to his win.

Thousands of voters like those in Michigan attended campaign rallies across the nation. Reporters covering them, however, focused primarily on the horse race and strategy, rather than what the candidate’s supporters—the voters—were thinking about the policies put forward. Some of the stories that did investigate what drove Trump supporters, were limited to media outlets within the state, and lacked broader outreach. Meanwhile, other stories, such as one in the Sarasota Tribune, focused on interviews with members of Trump’s campaign.

In other instances, it was often blogs and unofficial observers who reported on the Trump phenomenon and the enthusiastic crowds he drew. While an unofficial metric, these hinted at future enthusiasm at the polls.

Still, the end result was the same, large papers on the coasts, which lacked serious reporting from on the ground, underestimated Trump’s support in these states.

This occurred despite the large volume of coverage Trump received overall. Coverage of Trump supporters differs from how often the media reported on Trump himself. In January, one media research group found that Trump had “been covered in the mainstream news about twice as many times as the next-closest candidate: Hillary Clinton.” This statistic refers to the candidate himself. By contrast, journalists spent less time looking into how the various stories and scandals influenced the voting public.

Elections are decided at the polls, not by the polls. In the end, Trump’s victory demonstrates how election coverage must include both local stories and polling numbers.

Follow Erin on Twitter.