By any measure, Boston has a fraught history of race relations. There were the busing riots in the 1970s, the Charles Stuart case in the late 1980s, the Twitter virulence directed at Joel Ward in 2012.

But a new study suggests Boston is not among the most racist areas of the country. It’s not even the most racist area of the commonwealth. That would be rural western Massachusetts, according to the study, released earlier this month by PLOS-ONE.

Researchers behind the study studied Google searches containing the “N-word” in 196 designated market areas across the country. In short, they found a connection between internet-based racism and black mortality. In areas with a greater level of racism, there was an 8 percent increase in the all-cause black mortality rate, which is equal to 30,000 deaths annually.

The most racist parts of America based on the Google searches, according to the study, were swaths of the south, pockets of the Midwest and areas of the rural Northeast, including western Massachusetts.

Areas in eastern Massachusetts, including Boston and Cape Cod, were among the least racist, or at the very least featured the least frequent racial slur Google searches, according to the study.