John Oliver, in his very first episode on HBO's new show, Last Week Tonight, talked about Indian elections and the near-absence of its coverage in US Television. In response to that show, Alyssa Ayres wrote in Forbes that US's attention on India was scant. This, according to her, is also reflected in the pattern of languages studied in the US. She presented data in a tabular format from the Modern Languages Enrollment Database for 3 survey years-2002, 2006, and 2009 to show that the number of students enrolling to study Indian languages were very few in comparison to other popular languages.
Assuming that the knowledge of a language helps one understand culture in a better manner and could also potentially provide an advantage in international relations and business, it was of interest to me to see how different languages fared across a longer time frame. Here, I look at the pattern of language enrollments from MLA surveys of enrollments in US institutions of higher education using ggplot2 and rely on rCharts to facilitate comparison between any two or more languages across and within different years. This post has been generated using slidify and the code to reproduce it, along with the code and data for different charts can be found on github.
Enrollment data for US higher education institutions were collected for 8 survey years spanning over two and half decades - 1983,1986,1990,1995,1998,2002,2006, and 2009. (One could go back in history further, but I chose to stop there for convenience.) Why only those years and not intermediate years? Those were the years when surveys were conducted and hence, data were provided only for those years.
Data were collected on the following languages - French, German, Italian, Japanese, Spanish, Arabic, Chinese, Korean, Portuguese, and Russian. Following Alyssa Ayres' procedure, data on multiple Indian languages were collected and then summed for a composite Indian language score for each year. These Indian languages include Bengali, Gujarati, Hindi, Hindi-Urdu, Kannada, Malayalam, Marathi, Punjabi, Tamil, Telugu, and Urdu. For the purposes of this post, I'll look at only the overall Indian language enrollment and not its individual components.
library(knitr) lang = read.csv("languages.csv") langmajor = lang[-c(2:12)] kable(langmajor)
Before we see the patterns, we will need to convert our dataset into the long form. This, we perform using the reshape2 package. See how the dataframe format from the earlier table is modified to the following.
library(reshape2) langmajormelt = melt(langmajor, id = "Year") colnames(langmajormelt) = c("Year", "Language", "Enrollments") kable(head(langmajormelt))
library(ggplot2) ggplot(langmajormelt, aes(x = Year, y = Enrollments)) + geom_point() + geom_line() + facet_wrap(~Language, scales = "free") + theme_bw()
Interest in most languages has been on a rise. However, there were major drops in the interest in French, German, and Russian between 1990 and 1995.
library(rCharts) np1 = nPlot(Enrollments ~ Year, group = "Language", data = langmajormelt, type = "lineChart") np1$set(disabled = c(F, T, T, T, T, T, T, T, T, T, T)) np1$xAxis(tickValues = c(1983, 1986, 1990, 1995, 1998, 2002, 2006, 2009)) np1$show("inline", include_assets = TRUE, standalone = TRUE)
In the barchart below, we begin by comparing enrollments in Chinese and in Indian languages across all years. You could interact with it in the following ways.
np2 = nPlot(Enrollments ~ Year, group = "Language", data = langmajormelt, type = "multiBarChart") np2$set(disabled = c(F, T, T, T, T, T, T, F, T, T, T)) np2$addFilters("Year") np2$chart(showControls = F) # np2$publish('np2',host='gist')