Skip to content

Tag: manifesto.position()

Compiling government positions from the Manifesto Project data with R

****N.B. I have updated the functions in February 2019 to makes use of the latest Manifesto data. See for details here.*** The Manifesto Project (former Manifesto Research Group, Comparative Manifestos Project) has assembled a database of ‘quantitative content analyses of parties’ election programs from more than 50 countries covering all free, democratic elections since 1945’ and is freely accessible online. The data, however, is available only at the party, and not at the government (cabinet) level. In order to automate  the process of extracting government positions from the Manifesto data, I wrote a simple R function which combines the party-level Manifesto data with the data on government compositions from the ParlGov database. The function manifesto.position() produces a data frame with the country, the time period, the government position of interest, and an index (id) variable. You can get the data either at a monthly or yearly period of aggregation, specify the start and the end dates, and get the data in ‘long’ or ‘wide’ format. Here is how it works: First, you would need R up and running (with the ‘ggplot2‘ library installed). Second, you need the original data on party positions and on government compositions, and this script to merge them. Alternatively, you can download (or source) directly the resulting merged dataset here. Third, you need to source the file containing the functions. Here are a few examples of the function in action: #### ### 1. Load the data file from the working directory or from the URL (default)…