Perhaps as many as 670,000 American jobs have been lost since 1993 thanks to the introduction of automation in manufacturing, according to new analysis from the National Bureau of Economic Research. The places most affected by that boom in automation — that introduction of robots, if you will — were also places that in 2016 were more likely to support Sen. Bernie Sanders (I-Vt.) and Donald Trump over Hillary Clinton.

The NBER analysis, conducted by MIT’s Daron Acemoglu and Yale’s Pascual Restrepo, determined estimates of the number of robots introduced to a region between 1993 and 2007 for every 1,000 workers. Unsurprisingly, the region where that happened the most was Michigan, where the automotive industry in particular heavily automated its production processes.

(Our thanks to Acemoglu and Restrepo for sharing their data.)

That Michigan is so dominant in that map means that we can miss some more subtle gradations. By depicting the robot metric in buckets, we can see broader trends: The relatively large introduction of robotic workers throughout the Midwest and Rust Belt and along the Gulf Coast.

The NBER paper determined its figures using “commuting zones,” clusters of counties that share a common labor market. We went back and compiled numbers from the 2016 election for those counties, allowing us to correlate robot-introduction with 2016 voting patterns. Interestingly, the average number of robots introduced per every thousand workers over the 14-year period being considered was higher in areas where the 2016 vote was closer.

But that doesn’t tell the whole story.

If we compare the number of robots introduced per 1,000 workers with the margin between Trump and Clinton in each of those 700-plus clusters, we notice that most of the zones where more than one robot was introduced for every thousand workers ended up backing Trump over Clinton. The most notable exception is in the commuting zone at the center of Michigan, where nearly five robots were introduced for every 1,000 workers but — aided by the results in the home county of the University of Michigan — ended up backing Clinton.

As is usually the case with election data that’s linked to counties, all zones are not created equal. Hillary Clinton won the popular vote thanks to there being a lot more voters in the zones she won. Below, we’ve scaled the data points according to the total number of votes cast in each zone.

If we take this electoral data and relate it to the buckets we introduced in that second map, the effect is clear. There’s a correlation between the extent to which robots were introduced in a commuting zone and the extent to which the zone voted against Hillary Clinton.

Below, pitting Clinton against Trump, with data points again sized relative to the number of votes cast in each zone. The diagonal line is the trend in the data — up and to the right, meaning that as a zone had more robots introduced from 1993 to 2007, it was also more likely to vote for Trump in 2016.

It holds true for the primary, as well. While data from the primary is a bit flukier, given that many states use low-turnout caucuses or may only offer results by congressional district. But again that diagonal line, up and to the right.

This is a very good example of the old saying “correlation does not equal causation” — that is, just because there’s a link between the number of robots introduced and the 2016 results doesn’t mean that the robots led to those results. But given that the NBER research links automation to job loss — each robot per 1,000 workers cost an estimated 6.7 jobs — and given that job loss (particularly in the Midwest) has broadly been cited as a driving factor for support for Clinton’s opponents, these findings are at least logically consistent.

This study also reinforces another point that complicates President Trump’s stated desire to bring manufacturing back to the U.S.: Manufacturing job loss stems to some significant degree from automation, not outsourcing. (The Brookings Institution looked specifically at that point.) It will be a lot easier, one can safely assume, to convince Ford or Chevy to build a new plant in Michigan instead of Mexico. It will likely be harder to convince them to staff it with humans instead of robots — and if they don’t, there might be political implications for Trump moving forward.