Interest in the Middle East Over Time
MAT 259, 2021
Will Sheppard
Concept
The United States has been involved in a number of armed conflicts in the Middle East and Northern Africa in the twenty-first century. In particular, the US war in Afghanistan has the distinction of being the longest-running conflict in US history, beginning in October 2001 and continuing to the present. Using the Seattle Public Library database, I investigate how library patrons checkout materials relating to certain countries in these regions, in the hopes of gauging the interest of Americans in the conflicts over time.
Query
SELECT
YEAR(cout) AS Year,
COUNT(IF(title LIKE '%iraq%', 1, NULL)) AS 'Iraq',
COUNT(IF(title LIKE '%israel%', 1, NULL)) AS 'Israel',
COUNT(IF(title LIKE '%afghanistan%', 1, NULL)) AS 'Afghanistan',
COUNT(IF(title LIKE '%iran%', 1, NULL)) AS 'Iran',
COUNT(IF(title LIKE '%palestine%' OR title LIKE '%gaza%' OR title LIKE '%west bank%' , 1, NULL)) AS 'Palestine',
COUNT(IF(title LIKE '%syria%', 1, NULL)) AS 'Syria',
COUNT(IF(title LIKE '%lebanon%', 1, NULL)) AS 'Lebanon',
COUNT(IF(title LIKE '%tunisia%', 1, NULL)) AS 'Tunisia',
COUNT(IF(title LIKE '%libya%', 1, NULL)) AS 'Libya',
COUNT(IF(title LIKE '%somalia%', 1, NULL)) AS 'Somalia',
COUNT(IF(title LIKE '%yemen%', 1, NULL)) AS 'Yemen',
COUNT(IF(title LIKE '%saudi arabia%', 1, NULL)) AS 'Saudi Arabia',
COUNT(IF(title LIKE '%terror%' OR title LIKE '%terrorism%' , 1, NULL)) AS 'Terror',
COUNT(IF(title LIKE '%arab spring%', 1, NULL)) AS 'Arab Spring',
COUNT(IF(title LIKE '%islam%', 1, NULL)) AS 'Islam',
COUNT(IF(title LIKE '%war%', 1, NULL)) AS 'War',
COUNT(IF(title LIKE '%intifada%', 1, NULL)) AS 'Intifada',
COUNT(IF(title LIKE '%refugee%' OR title LIKE '%refugees%', 1, NULL)) AS 'Refugee',
COUNT(IF(title LIKE '%vietnam%', 1, NULL)) AS 'Vietnam'
FROM
spl_2016.outraw
WHERE
YEAR(cout) BETWEEN 2006 AND 2019
AND deweyClass >= 900
GROUP BY YEAR(cout)
ORDER BY YEAR(cout);
Final result
The table produced in MySQL. The countries listed are mostly Middle Eastern, with Vietnam serving as a reference for comparison on the far right.
Israel, Iraq and Afghanistan are the most commonly checked out countries of those explored in this project. Checkouts for almost every country decreased over the range 2006 to 2019, with the notable and unsurpring exception of Syria since around 2014.
Code