The Supreme Court ruled Monday in Harris v. Quinn that Illinois home health-care workers cannot be forced to pay union dues if they don’t want to join a union. The court said these workers are not “full-fledged public employees.” Although the ruling was a blow to unions, justices did not strike down the laws that ensure public sector workers in certain states have to pay union fees even if they aren’t part of a union.

Liberals think this is the tip of the iceberg. What if the Supreme Court, in future decisions, makes it difficult for any sort of union to collect members and dues? Beyond the obvious financial repercussions, such a decision could have a large electoral impact that could hurt Democrats for years to come.

Unions have seen their influence on the American political scene decline over the past 60 years. Any court ruling that limits union membership would be the equivalent of hitting a man when he’s down.

According to the American National Election Study (ANES), voters who lived in union households made up about 28 percent of voters during the 1950s. That percentage slowly slid over the next two decades before dropping precipitously during the 1980s. In the 1990s, 20 percent of voters on average were in union households, and over the past three elections, only 17 percent of voters on average were in union households.

Still, it would be a big mistake to think that unions have no power left. In 2011, my colleague Nate Silver ran an analysis that demonstrated the influence of the union vote. Even when controlling for variables such as age, education, gender, income, race, region and religion, being a member of union or living in a household with a union member increased your odds of voting for then-Sen. Barack Obama over Sen. John McCain in the 2008 presidential election.

We can update Nate’s analysis. In the 2012 network exit polls, union households voted for Obama by an 18 percentage-point margin (58 percent to 40 percent), and Obama won the nonunion vote by only a 1-point margin (49 percent to 48 percent). If every person in a union household sat out the election, Obama still would have won, but his margin would have been cut by 75 percent.

This, of course, is a simple analysis. It’s quite possible that union members and those who lived with a member would continue to vote Democratic, even if they weren’t in a union. Union members, for instance, are more likely to be African-American than the population at large. Most African-Americans voted for Obama, even if they weren’t part of a union.

So, as Nate did, I ran a logistic regression analysis. This way, we isolate the effect of the union vote. I’ve included 19 variables to try and explain why a person voted for Obama or Mitt Romney. (Like Nate, I eliminated those who didn’t vote or voted for a third-party candidate.)

Unfortunately, the National Annenberg Election Survey that Nate used was not in the field in the 2012 election. Instead, I performed my analysis on the 2012 ANES. This survey was in the field just before and after the 2012 presidential election, and it has 3,922 respondents who answered all the demographic variables and voted in the election. The “type of community variable” (urban, suburban, and rural) Nate used was not available in the full ANES data set, though I did add a variable for whether people considered themselves gay, lesbian, bisexual or heterosexual.

Below is the relative effect of these variables. In the chart, red bars mean that controlling for everything else, a member of this group was more likely to vote for Romney versus the baseline. The blue bars mean a member of the group was more likely to vote for Obama. The longer bars show groups for which the effect was greater.

As in 2008, being African-American had the greatest effect on someone’s vote. Even if all other variables predicted a Republican voter, being African-American meant you were 78 percent likely to vote for Obama. Being nonheterosexual or Hispanic had the next greatest effect in favor of voting for Obama. A born-again Christian or a weekly churchgoer were more likely to vote Republican.

Toward the middle of the list is the effect of union membership and living with a union member. The effect is not as large as most demographic variables.

But it’s not nothing; being a member of a union or living with a union member did make a person more likely to vote Democratic. At least according to the 2012 ANES, the effects of the two different union variables were pretty much identical. And the impact was about the same as the 1.7 percentage points it was in 2008.

In the ANES data set, 58 percent of union members or those living with a union member voted for Obama. If every union member or member of a union household voted as if they were not one and every other characteristic was kept constant, 51.1 percent of them still would have voted Democratic.

Obama would have lost 1.4 percentage points off his vote share in 2012 without unions. Instead of his margin of victory over Romney being 3.9 percentage points, it would have been 1.1 points.

Obviously, this sort of analysis doesn’t take into account what would really happen without the union vote. The two parties would go about courting voters differently. And unions also play a big role in fundraising and organizing for Democratic candidates.

But the 2.8 percentage-point difference in the presidential vote margin is nothing to sneeze at either. It’s larger than the margin in two of the past four elections, and it’s about the same as it was in 2008. Even if unions make up a lower percentage of voters than at any point in the past 60 years, they are a player in presidential elections. And if a future Supreme Court decision suppresses union power further, it would not be good news for Democrats.