Data Visualization #5–Canadian Residential Schools–plotting change in number and federal government

At the end of Data Visualization # 4 I promised to look at a couple of alternative solutions to the problem of outliers in our data. I’ll have to do so in my next data visualization (#6) because I’d like to take some time to chart some data that I have been interested in for a while and was made more topical by some comments unearthed a few days ago that were made by the leader of Canada’s federal Conservative Party, Erin O’Toole on the issue of the history of residential schools in Canada. These schools were created for the various peoples of the Canada First Nations’ and have a long and sordid history. If you are interested in learning more, here is the final report of Canada’s Truth and Reconciliation Commission.

I wanted to use a chart that is in the PDF version of that report as the basis for plotting the chart described above. Here is the original.

I was unable to find the raw data, so I had to do some work in R to extract the data from the line in the image. There are some great R packages (magick, and tidyverse) that can be used to help you with this task should the need arise. See here for an example.

Using the following code, I was able to reproduce fairly accurately the line i the graph above.


im <- image_read("residential_schools_new.jpg")

## This saturates the pic to highlight the darkest lines
im_proc <- im %>% image_channel("saturation")

## This gets rid of things that are far enough away from black--play around with the %

im_proc2 <- im_proc %>% image_threshold("white", "80%")

## Finally, invert (negate) the image so that what we want to keep is white.

im_proc3 <- im_proc2 %>% image_negate()

## Now to extract the data.

dat <- image_data(im_proc3)[1,,] %>% %>%
  mutate(Row = 1:nrow(.)) %>%
  select(Row, everything()) %>%
  mutate_all(as.character) %>%
  gather(key = Column, value = value, 2:ncol(.)) %>%
  mutate(Column = as.numeric(gsub("V", "", Column)),
         Row = as.numeric(Row),
         value = ifelse(value == "00", NA, 1)) %>%

# Eliminate duplicate rows.

dat <- subset(dat, !duplicated(Row))  # Get rid of duplicate rows

Here’s the initial result, using the ggplot2 package.

It’s a fairly accurate re-creation of the chart above, don’t you think? After some cleaning up of the data and adding data on Primer Ministerial terms during Canada’s history since 1867, we get the completed result (with R code below).

We can see that there was an initial period of Canada’s history during which the number of schools operating increased. This period stopped with the First World War. Then there was a period of relative stabilization thereafter (some increase, then decrease through the 1940s and early 1950s, and then there was about a 10-year increase that began with Liberal Prime Minister Louis St. Laurent, and continued under Conservative Prime Minister John Diefenbaker and Liberal Prime Minister Lester B. Pearson, during whose time in power the number of residential schools topped out. Upon the ascension to power of Liberal Prime Minister Pierre Elliot Trudeau, the number of residential schools began a drastic decline, which continued under subsequent Prime Ministers.

EDIT: After reading the initial report more closely, it looks like the end point of the original chart is meant to be 1998, not 1999, so I’ve recreated the chart with that updated piece of information. Nothing changed, although it seems like the peak in the number of schools operating at any point in time was in about 1964, not a couple of years later as it had seemed. Here’s an excerpt from the report, in a section heading entitled Expansion and Decline:

From the 1880s onwards, residential school enrolment climbed annually. According to federal government annual reports, the peak enrolment of 11,539 was reached in the 1956–57 school year.144 (For trends, see Graph 1.) Most of the residential schools were located in the northern and western regions of the country. With the exception of Mount Elgin and the Mohawk Institute, the Ontario schools were all in northern or northwestern Ontario. The only school in the Maritimes did not open until 1930.145 Roman Catholic and Anglican missionaries opened the first two schools in Québec in the early 1930s.146 It was not until later in that decade that the federal government began funding these schools.147

From the 1880s onwards, residential school enrolment climbed annually. According to federal government annual reports, the peak enrolment of 11,539 was reached in the 1956–57 school year.144 (For trends, see Graph 1.) Most of the residential schools were located in the northern and western regions of the country. With the exception of Mount Elgin and the Mohawk Institute, the Ontario schools were all in northern or northwestern Ontario. The only school in the Maritimes did not open until 1930.145 Roman Catholic and Anglican missionaries opened the first two schools in Québec in the early 1930s.146 It was not until later in that decade that the federal government began funding these schools.147

The number of schools began to decline in the 1940s. Between 1940 and 1950, for example, ten school buildings were destroyed by fire.148 As Graph 2 illustrates, this decrease was reversed in the mid-1950s, when the federal department of Northern Affairs and National Resources dramatically expanded the school system in the Northwest Territories and northern Québec. Prior to that time, residential schooling in the North was largely restricted to the Yukon and the Mackenzie Valley in the Northwest Territories. Large residences were built in communities such as Inuvik, Yellowknife, Whitehorse, Churchill, and eventually Iqaluit (formerly Frobisher Bay). This expansion was undertaken despite reports that recommended against the establishment of residential schools, since they would not provide children with the skills necessary to live in the North, skills they otherwise would have acquired in their home communities.149 The creation of the large hostels was accompanied by the opening of what were termed “small hostels” in the smaller and more remote communities of the eastern Arctic and the western Northwest Territories.

Honouring the Truth, Reconciling for the Future:
Summary of the Final Report of the Truth and Reconciliation Commission of Canada

A couple of final notes: one can easily see (visualize) from this chart the domination of Liberal Party rule during the 20th century. Second, how many of you knew that there had been a couple of coalition governments in the early 20th century?

Here is the R code for the final chart:

gg.res.schools <- ggplot(data=dat) + 
  labs(title = "Canadian Residential Schools \u2013 1867-1999",
       subtitle="(Number of Schools in Operation & Federal Party in Power)", 
       y = ("Number of Schools"), x = " ") +
  geom_line(aes(x=Row.Rescale, y=Column.Rescale), color='black', lwd=0.75)  +
  scale_y_continuous(expand = c(0,0), limits=c(0,100)) +
  scale_x_continuous(limits=c(1866,2000)) + 
            mapping=aes(xmin=Date_Begin.1, xmax=Date_End.1, 
                        ymin=rep(0,25), ymax=rep(100,25), fill=Government)) +
              scale_fill_manual(values = alpha(c("blue", "red", "green", "yellow"), .6)) +
  theme_bw() +
        plot.title = element_text(hjust = 0.5, size=16),
        plot.subtitle = element_text(hjust= 0.5, size=13),
        axis.text.y = element_text(size = 8)) <- gg.res.schools + geom_line(aes(x=Row.Rescale, y=Column.Rescale), color='black', lwd=0.75, data=dat)

Data Visualization #1–Electoral Results Map

The data visualization with which I begin my 30-day challenge is a standard electoral map of the recently-completed British Columbia provincial election, the result of which is a solid (57 of 87 seats) majority government for the New Democratic Party, led by Premier John Horgan.

It’s a bit ironic that I begin with this type of map since, for a few reasons, I consider them to be poor representations of data. First, because electoral districts are mapped on the basis of territory (geography) they misrepresent and distort what they are purportedly meant to gauge–electoral support (by actual voters, not acreage) for political parties.

Though there are other pitfalls with basic electoral maps I’ll highlight what I believe to be the second major issue with them. They take what is a multinomial concept–voter support for each of a number of political parties in a specific electoral district–and summarize them into a single data point–which of the many parties in that electoral district has “won” that district. Most of these maps provide no information about either a) the relative size of the winning party’s victory in that district, or b) how many other parties competed in that district and how well each of these parties did in that district.

Although the standard electoral map provides some basic electoral information about the electoral outcome (and it is undeniable that in terms of determining who wins and runs government, it is the single most important piece of information), they are “information-poor” and in future posts I’ll show how researchers have tried to make their electoral maps more information-rich.

But, first, here are some standard electoral maps for the last two provincial elections in British Columbia (BC)–May 2017 and October 2020. Like many jurisdictions in North America, BC is comprised of relatively densely-populated urban areas–the Lower Mainland and southern Vancouver Island–combined with sparsely-populated hinterlands–forests, mountains, and deserts. Moreover, there is a strong partisan split between these areas–with the conservative BC Liberal Party (BCLP–the story of why the provincial Liberal Party in BC is actually the home of BC’s conservatives is too long for this post) dominating in the hinterlands while the left-centre New Democratic Party (NDP) generally runs more strongly in the urban southeast of the province. In Canada, electoral districts are often referred to as “ridings”, or “constituencies.”

If one were completely ignorant about BC’s provincial politics one would assume, simply from a quick perusal of the map above, that the “blue” party–the BC Liberal Party–was the dominant party in BC. In addition, it would seem that there was very little change in partisan support and electoral outcomes across the electoral districts over the course of the two elections. In fact, the BCLP lost 15 districts, all of which were won by the NDP. (The Green Party lost one of the districts it had won to the NDP as well, for a total NDP gain of 16 districts (seats on the provincial legislature) between 2017 and 2020. This factual story of a substantial increase in NDP seats in the legislature is poorly conveyed by the maps above because the maps match partisanship to area and not to voters.

To repeat, in future posts I will demonstrate some methods researchers have used to mitigate the problem of area-based electoral maps, but for now I’ll show that once we zoom into the southwest corner of the province (where most of the population resides) a simple electoral map does do a better job of conveying the change in electoral fortunes of the BCLP and NDP over the last two elections This is because there is a stronger link between area and population (voters) in these districts than in BC as a whole.

You can more easily see the orange NDP wave overtaking the population centres of the Lower Mainland (greater Vancouver area–upper left part of each map) and, to a lesser extent, southern Vancouver Island. Data visualization #2 will demonstrate how to create animated maps of the above, which more appropriately convey the nature of the change in each of the electoral districts over the two elections.

Here’s the R code that I used to create the two images in my post, using the ggplot2 package.

## Once you have created a sf_object in R (which I have named bc_final_sf, the following commands will create the image above.

## First plot--2017
gg.ed.1 <- ggplot(bc_final_sf) +
  geom_sf(aes(fill = Winner_2017), col="black", lwd=0.025) + 
  scale_fill_manual(values=c("#295AB1","#26B44F","#ED8200")) +
  labs(title = "May 2017") +
  theme_void() + 
        plot.title = element_text(hjust = 0.5, size=12, face="bold"),
        legend.position = "none")

## Second plot--2020
gg.ed.2 <- ggplot(bc_final_final) +
  geom_sf(aes(fill = Winner_2020), col="black", lwd=0.025) + 
  scale_fill_manual(values=c("#295AB1","#26B44F","#ED8200")) +
  labs(title = "October 2020") +
  theme_void() +
        plot.title = element_text(hjust = 0.5, size=12, face="bold"),
        legend.position = "bottom")

## Combine the plots and do some annotation <- gg.ed.1 + gg.ed.2 & theme(legend.position = "bottom") <- + plot_layout(guides = "collect") + 
  title = "British Columbia Election Results \u2013 by Riding",
  theme = theme(plot.title = element_text(size = 16, hjust=0.5, face="bold"))
  )    # to view the first image above

## For the maps of the Lower Mainland and southern Vancouver Island, the only difference is that we add the following line to each of the individual maps:

coord_sf(xlim = c(1140000,1300000), ylim = c(350000, 500000))  

## so, we get 

gg.ed.lmsvi.1 <- ggplot(bc_final_final) +
  geom_sf(aes(fill = Winner_2017), col="black", lwd=0.075) + 
  coord_sf(xlim = c(1140000,1300000), ylim = c(350000, 500000)) + 
  scale_fill_manual(values=c("#295AB1","#26B44F","#ED8200")) +
  labs(title = "May 2017") +
  theme_void() + 
        plot.title = element_text(hjust = 0.5, size=10, vjust=3),  
        legend.position = "none")

UN Secretary-General Ban Ki-Moon Interviewed on Canadian Television

Host Peter Mansbridge, of the Canadian Broadcasting Coroporation’s (CBC) evening news program, The National, interviewed United Nations Secretary-General Ban Ki-Moon earlier this week on issues related to climate change and the Alberta oil sands. (I’ll have more next week about the anti-pipeline protests on Burnaby Mountain (in the vicinity of SFU) next week.)

Here are some excerpts:

Ban Ki-Moon: I know the domestic politics in Canada and Australia…but this is a global issue.

Peter Mansbridge: But the Canadian argument has always been, if everybody’s not in, we’re not in. [This obviously refers to the Kyoto Protocol’s division of countries into those that are required to make cuts (so-called Annex I countries) and those (mostly ‘developing’ countries) that do not.]

Ban Ki-Moon: China and [the] United States have taken such a bold initiative, Germany has been a leading country now, and [in] the European Union, twenty-eight countries have shown solidarity and unity. Therefore, it is only natural that Canada as one of the G-7 countries should take a leadership role.

The Secretary-General also spoke about the Alberta oil sands, which have been in the news lately in our part of the world as the result of protests aimed at Kinder Morgan over its plans to increase (three-fold) the flow of tar sands oil (bitumen) through an existing pipeline that runs through Burnaby Mountain to waiting oil tankers in Vancouver’s Burrard Inlet, to almost one million barrels per day.

Peter Mansbridge: Should Canadians, or the Canadian government, look beyond the oil sands to make its decisions about climate change?

Ban Ki-Moon: Energy is a very important, this is a cross-cutting issue. There are ways to make transformative changes from a fossil fuel-based economy to a climate-resilient economy by investing wisely in renewable energy resources.

Peter Manbridge: So back away from…

Ban Ki-Moon: Yes, Canada is an advanced economic country…you have many technological innovations, so with the technological innovation and financial capacity, you have many ways to make some transformative changes.

This is the key; the political and societal will has to be created and sustained to force our leaders to make the requisite changes, which will move our country towards an economy that is climate-resilient. An economically-sustainable future and economic well-being are not mutually exclusive. Indeed, there is every reason to believe that not not only are they not mutually exclusive, but that that each is necessary for the other. If we don’t start moving away from our “extractivist economic structure”, we in Canada face the prospect of a future with tremendous ecological and environmental degradation coupled with economic despair, when our leaders finally realize that rather than using our current wealth to innovate away from the extraction and toward energy innovation, we have squandered our wealth on fining ever cheaper ways to dig up crap that the world no longer wants to buy.

“Polluted and poor”–how’s that for a political campaign slogan?

Canadian Minister Aglukkaq’s Opening Statement at the 19th COP in Warsaw

In a couple of weeks time, we will be finishing up the course with a UN simulation. Each of the participants will be required to give a 1-minute (maximum!) opening presentation to the conference. Here is the opening statement of Honourable Leona Aglukkaq, Minister of the Environment, Minister of the Canadian Northern Economic Development Agency and Minister for the Arctic Council, to the 19th Conference of the Parties (COP19) to the United Nations Framework Convention on Climate Change (UNFCCC) held in Warsaw, Poland in 2013. Your opening statements should follow a similar structure (but not length!).

Hayley Stevenson talks about who decides to fix climate change

I’m not certain that it’s cause for sustained consternation, but a few of my students (it was more than three) referred to the University of Sheffield’s Hayley Stevenson as a he in their most recent assignments. You may listen to her in the clip below addressing the topic of climate change and democracy. Not surprisingly, Professor Stevenson implicitly rejects my proposal of a global benevolent dictator (take that USA, China, and Stephen Harper) tasked with creating the global climate regime necessary to combat the potential effects of climate change. Stevenson prefers more democracy to less.

NDP MP Asks Canadian Parliament Why no PM Harper at UN Climate Summit

The UN Climate Summit of 2014 was held in New York earlier this week. More than 125 world leaders were present, including US President Barack Obama and British Prime Minister David Cameron. Amongst the most noteworthy no-shows were the leaders of some of the world’s largest GHG-emitting countries, such as China, India, Russia, and Germany. Joining his colleagues on the no-show was our own Prime Minister, Stephen Harper. The Canadian government did send a delegate from the ministerial level, however. This did not satisfy the official opposition–The New Democratic Party, as MP Megan Leslie used question period to ask the Conservative government to justify Harper’s non-appearance in New York on Tuesday. Here’s the clip (Leslie’s first offering is in French, so if you don’t follow, the English transcript is provided on youtube:



Proportional Represenation versus Plurality

In IS210 we will discuss the relative merits of the two most frequently instituted electoral systems–proportional representation and plurality (also called majority or “first-past-the-post” electoral systems.

In advance, here is a chart that I’ve created, which shows the electoral results (in terms of number of seats won in the House of Commons) of the 2011 Canadian Federal election. The bottom of the chart contains the actual number of seats won, while the top lists the hypothetical number of seats each party would have won if Canada’s electoral system were one of proportional representation. So, Canada’s electoral system is working as it should, correct?


How much does political culture explain?

For decades now, comparativists have debated the usefulness of cultural explanations of political phenomena. In their path-breaking book, The Civic Culture, Almond and Verba argued that there was a relationship between, what they called, a country’s political culture and the nature and quality of democracy. (In fact, the relationship is a bit more complex in that the believed that a country’s political culture mediated the link between individual attitudes and the political system.) Moreover, the political culture was itself a product of underlying and enduring socially cultural factors, such as either an emphasis on the family, bias towards individualism, etc. Although Almond and Verba studied only five countries–the United States, West Germany, Mexico, Italy, and the United Kingdom–they suggested that the results could be generalized to (all) other countries.

How much, however, does culture explain? Can it explain why some countries have strong economies? Or why some countries have strong democracies? We know that cultural traits and values are relatively enduring, so how can we account for change? We know that a constant can not explain a variable.

The 1963 Cover of Almond and Verba's classic work.

In a recent op-ed piece in the New York Times, Professor Stephen L. Sass asks whether China can innovate its way to technological and economic dominance over the United States. There is much consternation in the United States over recent standardized test scores showing US students doing poorly, relative to their global peers, on science exams. (How have Canadian students been faring?)

Professor Sass answers his own question in the negative. Why, in his estimation, will China not innovate to the top? In a word (well, actually two words)–political culture:

Free societies encourage people to be skeptical and ask critical questions. When I was teaching at a university in Beijing in 2009, my students acknowledged that I frequently asked if they had any questions — and that they rarely did. After my last lecture, at their insistence, we discussed the reasons for their reticence.

Several students pointed out that, from childhood, they were not encouraged to ask questions. I knew that the Cultural Revolution had upturned higher education — and intellectual inquiry generally — during their parents’ lifetimes, but as a guest I didn’t want to get into a political discussion. Instead, I gently pointed out to my students that they were planning to be scientists, and that skepticism and critical questioning were essential for separating the wheat from the chaff in all scholarly endeavors.

Although Sass admits that there are institutional and other reasons that will also serve to limit China’s future technological innovation, he ends up affirming the primacy of political culture:

Perhaps I’m wrong that political freedom is critical for scientific innovation. As a scientist, I have to be skeptical of my own conclusions. But sometime in this still-new century, we will see the results of this unfolding experiment. At the moment, I’d still bet on America.

Do you agree? What other important political phenomena can be explained by political culture?

Electoral Systems

Here’s an interesting post by a student on the effect of different electoral systems on the strategic calculations of voters. Would Canadian voters vote differently if our electoral system were PR? The evidence suggests that for a substantial minority, the answer is yes.

Here’s an example: in many (most) ridings, there is no chance that a member of the Green Party would be elected to parliament. Thus, rather than voting for the Green Party, many voters in these ridings who would prefer to vote Green, vote their 2nd preference, meaning that the Liberal Party and the NDP receive more votes during our elections than they otherwise would under a PR system. (Very few voters whose favoured party is the Green Party have the Conservative Party as their 2nd preference). Check out the post…

Electoral Systems.

In POLI 1140 this week, we’ll look at war and conflict (and strife), which, according to Mingst and Arreguin-Toft, “is generally viewed as the oldest, the most prevalent, and in the long term, the most salient” issue in international relations. Indeed, this attention to war and security is warranted given that without at least a minimal degree of security it is difficult to achieve other, worthy values.

As many of you are well aware, the US military, with its NATO allies, has been at war in Afghanistan since just after the terrorist attacks of 9/11. The Canadian military, of course, stood by its NATO ally from the beginning taking a large number of casualties during its time in Afghanistan. Our last combat troops left Afghanistan last summer. While in Afghanistan, the Canadian military was responsible for securing the Kandahar province, which was, by all accounts, the most dangerous province in that war-torn country:

The military first went into Kandahar in 2005, the beginning of the combat mission. The forces are now into a training mission based in Kabul, where they’re teaching Afghan national security forces.

Kandahar was Afghanistan’s most dangerous province, Defence Minister Peter MacKay said in a statement.

Following Canada’s military withdrawal from Kandahar, the US military took over responsibility for the area. Unfortunately, tragedy struck over the weekend as a US soldier allegedly walked off of his military base in Kandahar and killed at least 16 civilians, 9 of which were children, who were all asleep at the time. Those who are familiar with war and its effects on the psychic health of all involved understand that these types of things do happen in war zones. I have personally interviewed soldiers who described to me similar incidents that they either witnessed or in which they were personally involved.

Based on what you’ve read in Chapter 8 of the textbook, which theory of IR best accounts for the war in Afghanistan and for why NATO troops are still in combat there?