The U.S. economy seems to be a net positive for President Trump as he campaigns for reelection. Unemployment is low, consumers feel pretty good and their spending is holding up.

But there’s a notable weakness in key pockets of the economy: The harm caused by Trump’s trade policies. Research firm Panjiva, a division of S&P Global Market Intelligence, calculates that U.S. exports to all countries grew by 6.1% from 2017, before Trump began imposing new tariffs on imports, through the end of 2019, when a broad range of new tariffs were in place. Imports during the same time grew 6.9%.

That sounds like healthy growth in trade. But the numbers for China in particular show a sharp slowdown in trade between the two economic giants, as Trump slapped tariffs on Chinese imports and China retaliated with similar measures on American goods. Exports to China fell 17.9% from 2017 through 2019, while imports from China fell 10.7%. For businesses and regions overexposed to trade with China, that’s a tough economic hit.

Is it possible Trump’s trade war could hurt swing states enough to flip the 2020 election to the Democrats? To find out, we analyzed Panjiva data for 16 swing states that aren’t solidly Republican or Democrat and could go either way in 2020. We focused on exports, since those contribute most to economic growth, and used per-capita data to account for population change.

The swing states that took the biggest hit in the Panjiva data are Nevada, Wisconsin and Michigan. Those states endured a net loss of exports overall, and to China in particular from 2017 to 2019. Maine lost exports to China while overall exports were flat. Trump won Michigan and Wisconsin in 2016, and the four states combined account for 34 electoral votes. That could be enough to tilt the 2020 election one way or the other, according to early predictions of the vote total at the University of Virginia’s Center for Politics.

Graphic by David Foster More

The Panjiva data likely understates the harm Trump’s tariffs have caused in some states, because of the way some exports are counted. Exports that leave the country on ship via ports are sometimes “sold” to exporters in a coastal state, then “exported” from wherever the port is.

That’s why we included Louisiana in the table above. Louisiana is solidly red—not a swing state. But it’s also where crops and other products from states such as Iowa and Minnesota leave the United States for foreign markets. They show up as exports from Louisiana, not from the originating states. So while the China export numbers for the originating states look pretty good, the China export numbers for Louisiana are terrible, falling 36% from 2017 to 2019. Some of that pain is felt elsewhere.

The “phase one” trade deal trump inked with China in January halts, for now, the escalation in tariffs and other trade barriers between the two countries. China has pledged to buy more U.S. farm goods and other products, while Trump slightly lowered one set of tariffs he imposed in 2019. But tariffs on Chinese imports remain at elevated levels, rising from an average of 3% in 2017 to 19% now. All told, the new Trump tariffs take about $80 billion per year out of the U.S. economy.

Trump is obviously hoping to repair that damage in 2020. But it’s not clear China will ramp up purchases by the time of the election in November, especially with the disruptive coronavirus worsening. It’s also not clear Trump will actually lose votes on account of his trade policies. Voters are mulling it all now.

Rick Newman is the author of four books, including “Rebounders: How Winners Pivot from Setback to Success.” Follow him on Twitter: @rickjnewman. Confidential tip line: rickjnewman@yahoo.com. Encrypted communication available. Click here to get Rick’s stories by email.

Read more:

Read the latest financial and business news from Yahoo Finance

Follow Yahoo Finance on Twitter, Facebook, Instagram, Flipboard, SmartNews, LinkedIn, YouTube, and reddit.