Religion can inspire people to do all sorts of great things, on their own and in groups. But as we know all too well, it can also inspire them to do all sorts of bad things — both to members of their own religion with whom they disagree, and to followers of other religions, who are seen as wrong, heretical, or deserving of punishment. Indeed, a large number of conflicts around the world, both now and over the history of humanity, can be seen through the lens of religious disagreements.
That's why I was interested in a report published last week by the Pew Research Center, describing religious restrictions around the world (https://www.pewresearch.org/religion/2026/06/15/more-countries-had-elevated-levels-of-social-hostilities-involving-religion-in-2023/ and https://www.pewresearch.org/religion/feature/religious-restrictions-around-the-world/). They looked at the degree to which countries and territories treated religion — from the government's stand on religion, to the way in which it treats people of various religions, to social (i.e., non-government) harassment and violence against members of various religions. This was the latest report to analyze data that Pew has been collecting for more than a decade.
This week, we'll look at the state of affairs, now and over time, for various religions in countries around the world, using the Pew data.
Data and five questions
The Pew data can be downloaded from https://www.pewresearch.org/dataset/dataset-global-restrictions-on-religion-2007-2022/ . Click on the "Download dataset," or use this link to get the data in CSV format, along with a data dictionary explaining the (very large) number of measures:
However, that data only goes through 2022. Last week's Pew report included data from 2023; we'll use only one of those downloadable files, the one listing social hostilities around the world. Go to the appropriate chart, and click on "data," then "download CSV."
Paid subscribers, both to Bamboo Weekly and to my LernerPython+data membership program (https://LernerPython.com) get all of the questions and answers, as well as downloadable data files, downloadable versions of my notebooks, one-click access to my notebooks, and invitations to monthly office hours.
Learning goals for this week include grouping, reshaping data, pivot tables, and plotting with Plotly.
Here are my five questions for this week. I'll be back tomorrow with my solutions and explanations:
- Read the main CSV file into a Pandas data frame. From the 2022 data, were any countries among the 10 highest GRI (government restrictions index) and also the 10 highest SHI (social hostilities index) based on religion?
- Which 10 countries had the greatest improvement (i.e., lower score) in GRI from 2007 to 2022? Which 10 countries showed such improvements in the area of SHI?