Skip to content
3 min read · Tags: regular-expressions excel cleaning window-functions plotting

BW #124: NATO Spending

Get better at: Working with Excel files, regular expressions, cleaning data, window functions, and plotting.

BW #124: NATO Spending

NATO (the North Atlantic Treaty Organization) was established after World War II, in no small part to protect Western democracies against the Soviet Union and other Communist threats. NATO is generally seen as a great success, and has even absorbed into its ranks a number of countries that were previously part of the Soviet Bloc before they became democracies.

But NATO has also found itself challenged, in no small part in the wake of Russia's invasion of Ukraine. NATO allies are coming under pressure to spend more on defense — both from the United States, which has long funded the lion's share among NATO members, and from their own people, who see what Russia is doing in Ukraine and want to be better prepared in case they are similarly invaded.

A number of countries have already pledged to increase defense spending to 2 percent, and several have even passed laws requiring that their governments do so. As the New York Times notes (https://www.nytimes.com/live/2025/06/25/us/trump-nato-news?unlocked_article_code=1.Rk8.57Os._2tG-hkNEc42&smid=url-share), NATO countries announced that members (but not "all members") will indeed be increasing their defense spending even further.

Given this week's NATO summit, our topic this week is thus NATO spending.

Data and five questions

This week's data comes from NATO itself, on its "Defence expenditures and NATO’s 2% guideline" page (https://www.nato.int/cps/en/natohq/topics_49198.htm). At the bottom of the page, you'll find links to download reports from each year; you want the 2024 data, at https://www.nato.int/cps/en/natohq/news_226465.htm.

Learning goals for this week include: Working with Excel files, cleaning data, window functions, regular expressions, and plotting.

Paid subscribers can download the data file from the end of this post.

Here are the five questions and tasks: