The San Bernardino shootings have caused concern over what seems to be growing Islamic hatred towards the United States. It even prompted Republican presidential candidate Donald Trump to propose banning Muslim immigrants from entering the country, claiming that “large segments” of the Muslim population hate the US.

In fact, data from Pew Research Center suggests that some Muslim countries view the US very favourably.

What this chart shows is that Indonesia, home to 12.5% of the world’s Muslims, 62% of the population have a positive opinion of the US, compared to just 50% in Germany. In Nigeria, the world’s fifth most populous Muslim country, the figure is 76%.

In Turkey, positive ratings for the US have increased by 10 percentage points in the last year (from 19% to 29%), according to the study.

In the Middle East, however, the picture is different: most Jordanians, Palestinians, Turks and Lebanese register an unfavourable opinion of the US.

The rise of ISIS and recent terrorist attacks in Paris, Beirut, Baghdad, Mali – as well as on Russian aircraft over the Sinai – have prompted security fears around the world. Pew’s research shows Muslims everywhere are overwhelmingly opposed to ISIS. Data collected earlier this year, in 11 countries with significant Muslim populations, found people from Nigeria to Jordan to Indonesia expressed negative views of ISIS. One exception was Pakistan, where a majority offered no definite opinion.

Unlike the Iraq War a decade ago, the current US air campaign in Iraq and Syria is backed by majorities in key Middle East nations.

Despite widespread support for America’s military action against ISIS, most people around the world oppose the harsh interrogation methods used by the US against suspected terrorists in the wake of 9/11. Only 35% believe they were justified. Americans disagree – nearly six in 10 (58%) say they were justified.