New Data Available from the Comparative Constitutions Project

Last week the Comparative Constitutions Project (CCP) released two new data sets. These new data are available for download here.

The first data set is an update to the CCP’s Chronology of Constitutional Events. In addition to making a number of minor changes to previously released chronology data, we added constitutional events that occurred from 2007 to 2013. According to our records, there have been 25 new constitutions and 4 interim constitutions written from 2007 through 2013 and 172 constitutional amendments.

The second data set is a major expansion of the CCP’s data on the Characteristics of National Constitutions. The original release of these data (version 1.0) included only the contents of each constitution in force in 2006. The expanded data (version 2.0) contains all of the “cleaned” data available from the project. This includes data from 524 constitutional systems and nearly 1,500 constitutional events, which equates to more than 8,000 country-years.

The figure below illustrates the relationship between the CCP’s characteristics data and its chronology. The dashed line indicates the number of independent states in each year from 1789 to 2013. The solid line indicates the number of constitutions in force in independent states in each of those years.  The shaded area represents the country-years for which the CCP has released data on the characteristics of national constitutions. Overall, the characteristics data are available for 52% of country-years for which there was a constitution in force. As illustrated in the figure, this percentage varies quite a bit over time, ranging from only having data available for about 40% of countries circa World War II to data available for about 85% of countries for much of the last decade.

Continue reading

Comparing the 1971, 2012, and 2013 Egyptian Constitutions

The Comparative Constitutions Project has developed a new tool that allows one to compare the 1971, 2012, and 2013 Egyptian constitutions:  http://comparativeconstitutionsproject.org/comparing-the-egyptian-constitution/.  We have assigned the topics from the Constitute site to the texts of those three constitutions, which allows one to select a topic and see how each of the three constitutions addresses it.  If you are interested in how much (or little) the Egyptian constitution has changed as a result of the Arab Spring, then I encourage you to take a look.

(Please send me an e-mail or make a comment if you notice any errors in our assignment of topics.)

Directly Querying the Constitute Data

Thank you to all who attended my seminar today.  As promised, I am going to provide the code that I used to query the data underlying the Constitute site.

To start, you will need to know how to write a SPARQL query.  There are good resources online to teach you how to write such queries (see here or here).  Once you know a bit about writing SPARQL queries, you can test out your skills on the data underlying the Constitute site.  Just copy and paste your queries here.  To get you started, here are the two queries that I used in my seminar:

Query 1:

PREFIX ontology:<http://tata.csres.utexas.edu:8080/constitute/ontology/>
PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#>
SELECT ?const ?country ?year
WHERE {
?const ontology:isConstitutionOf ?country .
?const ontology:yearEnacted ?year .
}

Query 2:

PREFIX ontology:<http://tata.csres.utexas.edu:8080/constitute/ontology/>
PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#>
SELECT ?const ?country ?year ?region ?sectionType ?sectionText ?childType ?childText
WHERE {
?const ontology:isConstitutionOf ?country .
?const ontology:yearEnacted ?year .
?section ontology:isSectionOf ?const .
?country ontology:isInGroup ?region .
?section ontology:hasTopic ontology:env .
?section ontology:rowType ?sectionType .
OPTIONAL {?section ontology:text ?sectionText}
OPTIONAL {?childSection ontology:parent ?section . ?childSection ontology:text ?childText}
OPTIONAL {?childSection ontology:parent ?section . ?childSection ontology:rowType ?childType}
}

Notice the “topic” line in the second query (?section ontology:hasTopic ontology:env .).  The env part of that line is the tag that we use to indicate provisions that deal with “Protection of environment”.  You can explore the list of topics included on Constitute and their associated tags here.

The next step is to apply your querying knowledge using the SPARQL package in R.  I will demonstrate how this is done by walking you through the creation of the Word Cloud that I discussed during my seminar (the code for the histogram is easier to understand and is below).  First, query the SPARQL endpoint using R:

#Opens the Relevant Libraries
library(SPARQL)
#Defines URL for Endpoint
endpoint <- "http://tata.csres.utexas.edu:8080/openrdf-sesame/repositories/test"
#Defines the Query
query <- "PREFIX ontology:<http://tata.csres.utexas.edu:8080/constitute/ontology/>
PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#>
SELECT ?const ?country ?year ?region ?sectionType ?sectionText ?childType ?childText
WHERE {
?const ontology:isConstitutionOf ?country .
?const ontology:yearEnacted ?year .
?section ontology:isSectionOf ?const .
?country ontology:isInGroup ?region .
?section ontology:hasTopic ontology:env .
?section ontology:rowType ?sectionType .
OPTIONAL {?section ontology:text ?sectionText}
OPTIONAL {?childSection ontology:parent ?section . ?childSection ontology:text ?childText}
OPTIONAL {?childSection ontology:parent ?section . ?childSection ontology:rowType ?childType}
}"

#Queries the endpoint
sparql <- SPARQL(endpoint,query,ns=c('ontology','<http://tata.csres.utexas.edu:8080/constitute/ontology/>','const','<http://tata.csres.utexas.edu:8080/constitute/>'))

You now have a data table with the relevant textual data available to you in R under sparql$results.  The second step is to organize that data into a corpus using the text mining package (tm, for short).  Ultimately, I am only interested in rows in the data table that have text (i.e. the sectoinText and childText columns are not empty) and that are from constitutions written in the Americas or Africa, so I will filter the data along these lines in this step of the process.  Here is the code:

#Opens the Relevant Libraries
library(tm)
library(SnowballC)

#Filters Out Correct Regions
data.Africa <- subset(sparql$results,sparql$results$region=="const:ontology/Africa")
data.Americas <- subset(sparql$results,sparql$results$region=="const:ontology/Americas")

#Extracts Section Text from Results and Removes Missing Values
sText.Africa <- subset(data.Africa,data.Africa$sectionText!='NA')
sText.Africa <- subset(sText.Africa$sectionText,sText.Africa$sectionType=="const:ontology/body")
sText.Americas <- subset(data.Americas,data.Americas$sectionText!='NA')
sText.Americas <- subset(sText.Americas$sectionText,sText.Americas$sectionType=="const:ontology/body")

#Extracts Child Section Text from Results and Removes Missing Values
cText.Africa <- subset(data.Africa,data.Africa$childText!='NA')
cText.Africa <- subset(cText.Africa$childText,cText.Africa$childType=="const:ontology/body")
cText.Americas <- subset(data.Americas,data.Americas$childText!='NA')
cText.Americas <- subset(cText.Americas$childText,cText.Americas$childType=="const:ontology/body")

#Appends Parent and Child Text Together
Text.Africa <- data.frame(c(sText.Africa,cText.Africa))
Text.Americas <- data.frame(c(sText.Americas,cText.Americas))

#Converts Data Frames to Corpora
corpus.Africa <- Corpus(VectorSource(Text.Africa))
corpus.Americas <- Corpus(VectorSource(Text.Americas))

Now that I have organized the relevant text into corpora, I need to clean those corpora by removing stop words (e.g. a, an and the), punctuation and numbers and stemming words.  This is standard practice before analyzing text to prevent “the” from being the largest word in my word cloud and to make sure that “right” and “rights” are not counted separately.  The tm package has all the tools to perform this cleaning.  Here is the code:

#Makes All Characters Lower-Case
corpus.Africa <- tm_map(corpus.Africa,tolower)
corpus.Americas <- tm_map(corpus.Americas,tolower)

#Removes Punctuation
corpus.Africa <- tm_map(corpus.Africa,removePunctuation)
corpus.Americas <- tm_map(corpus.Americas,removePunctuation)

#Removes Numbers
corpus.Africa <- tm_map(corpus.Africa,removeNumbers)
corpus.Americas <- tm_map(corpus.Americas,removeNumbers)

#Removes Stopwords
corpus.Africa <- tm_map(corpus.Africa,removeWords,stopwords('english'))
corpus.Americas <- tm_map(corpus.Americas,removeWords,stopwords('english'))

#Stems Words
dict.corpus.Africa <- corpus.Africa
corpus.Africa <- tm_map(corpus.Africa,stemDocument)
corpus.Africa <- tm_map(corpus.Africa,stemCompletion,dictionary=dict.corpus.Africa)
dict.corpus.Americas <- corpus.Americas
corpus.Americas <- tm_map(corpus.Americas,stemDocument)
corpus.Americas <- tm_map(corpus.Americas,stemCompletion,dictionary=dict.corpus.Americas)

The last step is to analyze the cleaned text.  I created a simple word cloud, but you could perform even more sophisticated text analysis techniques to the textual data on Constitute.  I used the wordcloud package to accomplish this task.  Here is the code I used to create the word clouds for my presentation:

#Opens the Relevant Libraries
library(wordcloud)
library(RColorBrewer)
library(lattice)

#Creates a PNG Document for Saving
png(file="WC_env.png", height = 7.5, width = 14, units = "in", res=600, antialias = "cleartype")

#Sets Layout
layout(matrix(c(1:2), byrow = TRUE, ncol = 2), widths = c(1,1), heights = c(1,1), respect = TRUE)

#Sets Overall Options
par(oma = c(0,0,5,0))

#Selects Colors
pal <- brewer.pal(8,"Greys")
pal <- pal[-(1:3)]

#Word Cloud for the Americas
wordcloud(corpus.Americas,scale=c(3,0.4),max.words=Inf,random.order=FALSE,rot.per=0.20,colors=pal)

#Creates Title for Americas Word Cloud
mtext("Americas",side=3,cex=1.25,line=4)

#Word Cloud for Africa
wordcloud(corpus.Africa,scale=c(3,0.4),max.words=Inf,random.order=FALSE,rot.per=0.20,colors=pal)

#Creates Title for African Word Cloud
mtext("Africa",side=3,cex=1.25,line=4)

#Creates an Overall Title for the Figure
mtext("Constitutional Provisions on the Environment",outer=TRUE,cex=2,font=2,line=1.5)

#Closes the Plot
dev.off()

Note that the plotting commands above are complicated by the fact that I wanted to combine two word clouds into the same image.  Had I only wanted to create a single word cloud, say for Africa, and did not care much about the colors of the plot, the following commands would have sufficed:

#Opens the Relevant Libraries
library(wordcloud)

#Word Cloud for Africa
wordcloud(corpus.Africa,scale=c(3,0.4),max.words=Inf,random.order=FALSE,rot.per=0.20,colors=pal)

Anyway, here is the resulting word cloud:

WordClouds_Env

With the commands above, you should be able to replicate the word clouds from my seminar.  In addition, minor modifications to the commands above will allow you to describe the constitutional provisions on different topics or to compare the way that different regions address certain topics.  One could even perform more advanced analyses of these texts with the SPARQL queries outlined above.

CODE FOR HISTOGRAM

#Opens the Relevant Libraries
library(SPARQL)
library(RColorBrewer)

#Defines URL for Endpoint
endpoint <- "http://tata.csres.utexas.edu:8080/openrdf-sesame/repositories/test"

#Defines the Query
query <- "PREFIX ontology:<http://tata.csres.utexas.edu:8080/constitute/ontology/>
PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#>
SELECT ?const ?country ?year
WHERE {
?const ontology:isConstitutionOf ?country .
?const ontology:yearEnacted ?year .
}"

#Makes the Query
sparql <- SPARQL(endpoint,query,ns=c('ontology','<http://tata.csres.utexas.edu:8080/constitute/ontology/>','const','<http://tata.csres.utexas.edu:8080/constitute/>'))

#Subsets Data
data.year <- data.frame(subset(sparql$results,select=c("const","year")))

#Drops Duplicate Observations
data.year <- unique(data.year)

#Makes Year Numeric
year <- as.numeric(data.year$year)

#Creates PNG Document for Saving
png(file="Histogram_Year.png")

#Selects Colors
pal <- brewer.pal(3,"Greys")
pal <- pal[-(1:2)]

#Histogram Command
hist(year, breaks=21, col = pal, border = pal, xlab = "Promulgation Year", ylab = "Number of Constitutions", ylim = c(0,60), xlim = c(1790,2010), main = "Constitutions on Constitute")

#Closes the Plot
dev.off()

And here it is:

Histogram_Year

What Would a Scottish Constitution Look Like?

Last week, Stephen Tierney posted an excellent evaluation of the White Paper released by the Scottish Government on “Scotland’s Future”.  In his evaluation, Professor Tierney addresses three issues related to the Government’s repeated commitment to write a constitution should Scotland become independent:  1) when will it be finished? 2) what will be in it? and 3) what process will be used to make it?  Much of his post is on the process of writing a Scottish constitution, so I want to make just a couple of additional observations about the likely contents of a Scottish constitution.  My remarks are based on a report that I wrote last spring with my collaborators on the Comparative Constitutions Project.

First, very little is likely to change in Scotland as a result of drafting a constitution.  As we state in our report:

Almost all countries have institutions that pre-date their entrance into the modern state system and the writing of their first constitution.  Regardless of whether a state’s primordial institutions were purely informal rules, as in the earliest states, or colonial structures, they will likely survive in some form.  Institutions inevitably favor some individuals’ interests over others, so those who benefit from the presence of some institution have a strong incentive to fight for the continued existence of that institution during constitutional drafting.  Factors such as colonial heritage, legal origin, religion, ethnic fractionalization, language, and region are strong predictors of pre-state institutions and, as a result, the content of subsequent constitutional systems. (p. 3)

If Scotland becomes independent, regardless of whether it writes a constitution or not, the institutions established by the Scotland Act (1998) are likely to live on and to maintain the same structure and powers that they have today.  As a result, ordinary politics in an independent Scotland are likely to look almost identical to ordinary politics in Scotland today.

I am not suggesting that Scotland should not write a constitution.  The act of writing a constitution has value beyond the contents of the document.  Writing a constitution can help build legitimacy for the new Scottish state and, depending on the process in which it is drafted and promulgated, may even help to unify the newly independent nation.  By establishing a hierarchical system of law, a constitution may even further entrench democracy and the rule of law in Scotland.  What I am suggesting is that, regardless of any positive externalities that Scotland might reap from writing a constitution, the contents of that document are largely predetermined.

Second, I am sceptical of the Government’s promise to entrench socioeconomic rights in the Scottish constitution.  Socioeconomic rights are easy to promise but hard to deliver.  If the Government really intends to deliver on the socioeconomic rights that it has promised, then it should promise to make them justiciable, meaning that the Courts in Scotland will be able to enforce them, and explain how it intends to pay for them.  The Government has done neither.  As a result, I think it is more likely that there will be socioeconomic rights entrenched in the Scottish constitution but that those rights will be aspirational, giving the Government lots of flexibility when deciding whether or not to adhere to those promises.

Designing Constitutions to Prevent Dictatorship

27th September 2013

I had the privilege to hear President Marzouki of Tunisia and former President Otunbayeva of the Kyrgyz Republic speak during the launch event for Constitute on Monday.  The remarks by both Presidents were excellent and, remarkably, sincere.  They spoke very optimistically about their respective countries’ futures, while recognizing that both countries faced many challenges on their path towards development.

What struck me about both President Marzouki and former President Otunbayeva’s remarks was their focus on preventing a return to dictatorship.  Although I have no doubt that both Presidents have aspirations of democracy, their remarks were far more focused on creating constitutions that prevent a return to dictatorship than on designing constitutions that will usher in democracy.  Such an aim is certainly reasonable.  After all, both countries have recently exited long periods of repressive dictatorship and want to avoid something similar in the future.  Moreover, the goal of preventing a return to dictatorship is very pragmatic.  Consolidated, liberal democracy is not something that is achieved in a few weeks or even a few years.  Both Tunisia and the Kyrgyz Republic will be in their current transitional state for some time and, as long as they are in that state, the danger of backsliding into a repressive dictatorship is very real.  Most countries that experience a breakdown of dictatorship will transition into another dictatorship, not a consolidated, liberal democracy.  Both Presidents were very cognizant of this risk.  They both mentioned, numerous times, that many individuals within their respective countries would prefer dictatorship to the transitional state currently present in both countries.  Not only are there the elites from the old regime who long for a return to power, but many ordinary citizens prefer the stability brought by dictatorship to the uncertainty and disorder that is associated with democratisation.

The focus of the two President’s on preventing a return to dictatorship was striking because there is little scholarly literature that helps leaders to understand how to prevent backsliding towards dictatorship.  There are some studies that attempt to identify the determinants of backsliding (I was recently the discussant on a panel at the Annual Meeting of the American Political Science Association on this very topic).  However, the vast majority of social scientists who study these topics are focused squarely and exclusively on understanding the determinants of consolidated, liberal democracy.

Of course, one could say that I am splitting hairs because any variable negatively associated with democracy is a variable that promotes backsliding, right?  Perhaps, but personally, I think things are a bit more complicated than that in countries transitioning out of dictatorship.  Given their remarks, I think that President Marzouki and former President Otunbayeva would probably agree with me.  It might be unfair to suggest that they were more worried about preventing a return to dictatorship than transitioning to democracy, but it was clear from their remarks that the former was a key concern for both of them.  Their concern should be our concern.

This means asking research questions about how transitioning countries can maintain their path towards democracy, rather than slipping back into some form of dictatorship.  Such research would imply a trichotomous measure of democracy, where the groups are dictatorships, transitional countries, and democracies – e.g. as that used by (Epstein et al. 2006).  Rather than focusing solely on the institutions operating in transitioning countries, as President Marzouki of Tunisia and former President Otunbayeva did in their remarks, there are a range of factors that one could study.  Some that seem particularly promising include things like the number and type of groups involved in the transition, the constitution-making process used and how long that process lasts, involvement from the international community, etc.  Only by studying these critical moments in countries’ histories can we provide any insights for leaders and members of the development community about how they can minimise the risk that a transitioning country will slip back into dictatorship.

Announcing the Launch of Constitute: The World’s Constitutions to Read, Search and Compare

23rd September 2013

I am pleased to announce the launch of Constitute, a website for reading, searching, and comparing the world’s constitutions.  Constitutions are critical to countries’ development.  Outcomes, like democracy, economic performance and human rights protection, are all associated with the contents of countries’ constitutions.  It is little wonder, then, that constitutions are often blamed for poor economic and political outcomes or that such outcomes commonly result in constitutional change.  Constitute aims to improve constitutional design and, in doing so, increase the likelihood that countries’ constitutions will facilitate development, rather than hinder it. Numerous countries change their constitution each year.  Already this year we have observed new constitutions in Fiji and Zimbabwe and constitutional amendments in Brazil, Colombia, the Czech Republic, Georgia, Hungary, Mexico, Switzerland and Tonga.  In addition, countries like Egypt, Myanmar, Tunisia and Yemen are all known to be in various stages of the constitutional revision process.  Some might be surprised to learn that so many countries have either recently revised or intend to revise their constitutions.  After all, constitutions are meant to be timeless documents that establish the foundations for politics and governance from one generation to the next.  This may be true in the United States or Western Europe, but most countries’ constitutions are fragile.  A typical constitution lasts only 19 years, which means that, on average, 5 constitutions are replaced and 30 are amended each year.

Despite the high level of constitutional change each year, there is no country that changes its constitution often enough for public officials to gain much experience as constitutional drafters.  Constitutional drafters are typically engaged in a task that they have never done before and will never do again.  They lack systematic information on the contents of other countries’ constitutions that could help them to decide what topics should be addressed in their constitution and how to address those topics.  Such information is hard to acquire.  There is no single location that constitutional drafters can use to access and compare constitutional documents and language – which is critical to drafters – because these documents are locked up in libraries or on the hard drives of constitutional experts.

Constitute addresses this problem by putting searchable copies of the world’s constitutions online.  However, Constitute is more than just a repository of constitutional texts.  The project draws on data collected by the Comparative Constitutions Project over the last 8 years to assign topic tags to provisions within constitutions.  This allows for powerful, topic-based searches of those texts.   There are more than 300 topics for users to choose from on the site, which range from the fairly general – e.g. the structure of the branches of government – to the very specific – e.g. voting rights for indigenous groups.  For those interested in regional or temporal trends in constitution-making, the search results can be filtered by country and year.

Our hope is that Constitute will improve constitution-making by allowing drafters to consider the full array of possible choices when determining the contents of their country’s constitution.  We also anticipate that the tool will empower domestic actors not directly involved in drafting the constitution but who are, nonetheless, integral to the success of that process.  Increasingly, constitution-making processes ask the public to participate, for example by submitting suggestions to the constitutional drafting committee or approving the completed draft in a public referendum.  Constitute will facilitate participation in these aspects of the constitution-making process by allowing groups in civil society, academia, and the general public to inform themselves about how other countries have tackled particular problems.

More generally, the constitutions available on Constitute will be of great interest to numerous domestic actors in countries all over the world.  Many constitutions are not available in digital form and tools to organize their provisions for a non-specialist are rare, even though there is substantial demand for such tools from public officials, lawyers, non-governmental organizations, students, etc.  Constitute can be used by such individuals to learn about their constitutions.  Want to know if your constitution protects freedom of religion or the right to health care or even the rights of breast-feeding mothers?  Just search for the term you are interested in, using either a topic or free text search, and filter the results to display only the country where you reside.   (For the curious reader, note that only Ecuador’s constitution mentions the rights of breast-feeding mothers.)

Constitute will increase transparency in countries throughout the world by ensuring universal access to the world’s constitutions.  We expect that access to these important documents will improve constitution-making as well as empower the general public to play a more active role in their country’s governance.

Constitute was made possible by the support from Google Ideas and the Indigo Trust.