When it comes to your political leanings, you are what you drive, according to a new study that says election results can be predicted by the make and models of cars spotted in a particular community.

Stanford University researchers used a computer algorithm to determined whether a neighborhood leaned to the left or right by looking at vehicles in 50 millions of images from Google Street View in 200 American cities.

When sedans outnumbered pickup trucks, there was an 88 percent chance the city would vote Democratic.

In areas with more pickup trucks, the odds switched to 82 percent in favor of Republicans, the researchers concluded.

“We show that it is possible to determine socioeconomic statistics and political preferences in the US population by combining publicly available data with machine-learning methods,” said the report, published Tuesday in the Proceedings of the National Academy of Sciences.

The researchers created an algorithm to identify the brand, model and year of every car sold in the US since 1990.

The types of cars also provided information about the race, income and education levels of a neighborhood, the study said.

Volkswagens and Aston Martins were associated with white neighborhoods while Chryslers, Buicks and Oldsmobiles tended to appear in African-American neighborhoods, the study found.

The researchers cross-checked their predictions against actual Census Bureau data and voting results.

They said their method of surveying neighborhoods could eventually save the government time and money by replacing or supplementing the Census Bureau’s door-to-door approach with compilations of demographic information.

Scott Cleland, a tech blogger who is critical of Google’s privacy protections, worried that the voting data could be misused.

“Once you start sharing and deducing people’s private stuff in a group setting for group purposes, it doesn’t take a genius to see that this could end badly,” said Cleland. “You can imagine the manipulations of a neighborhood.”