O NE REASON America has become so polarised is that its two big parties are increasingly seen to represent tribes as well as policies. One study by Lilliana Mason of the University of Maryland found that whether people said they were “liberal” was a better predictor of reluctance to marry a “conservative”—and vice versa—than actual views on political issues were. Another paper, by Douglas Ahler of Florida State University and Gaurav Sood, found that Americans wildly exaggerate the share of each party’s voters made up by certain groups. On average, poll respondents guessed that 32% of Democrats were gay and that 38% of Republicans earned over $250,000. The real figures were 6% and 2%.

Ample evidence shows that the two sides differ on more than just taxes and guns. One viral quiz in 2014 predicted party loyalty using quirky data: Republicans were more likely than Democrats to prefer dogs to cats, neat desks to messy ones, action films to documentaries and Internet Explorer to Google Chrome. Using data on concert tickets from Vivid Seats, an online market, we find that tastes in live music also mirror America’s political divide.

Regional variation in musical preferences is tied to demography. Hip-hop, a genre invented by urban blacks, is most popular in cities and in African-American areas. Sales for Latin styles like merengue are high in Hispanic counties in Florida and near the Mexican border. Country and folk, full of odes to wide-open spaces, prevail in plains and mountain states. Yet playlists also provide extra information about political beliefs, beyond their ability to stand in for race and population density.

The musical style that best predicts liberalism is hip-hop; for conservatism, it is country. In 2016 Donald Trump’s vote share in places where country out-sold hip-hop was 22 percentage points higher than in those where hip-hop was more popular. When combined into a statistical model, race, age, education and urbanisation account for only an 18-point gap. The remaining four points consist of factors reflected in music but not by demography.

It stands to reason that rural whites who like rap, a genre in which artists have railed against police brutality, are unusually left-wing. The politics of hard-rock acts like Metallica, AC/DC and Guns’n’Roses—who are particularly popular in places that voted for Barack Obama in 2012 but Mr Trump in 2016—are less clear. Politically active rockers tend to lean left. However, the best-selling rock groups are older than most pop stars or rappers, suiting many Trump voters’ nostalgia. And among Mr Trump’s often rowdy fans, their belligerent, anti-establishment music may strike a chord. ■

Sources: Vivid Seats; US Census Bureau; MIT Elections and Data Science Lab; The Economist