manifestoR v1.2.4


Monthly downloads



Access and Process Data and Documents of the Manifesto Project

Provides access to coded election programmes from the Manifesto Corpus and to the Manifesto Project's Main Dataset and routines to analyse this data. The Manifesto Project <> collects and analyses election programmes across time and space to measure the political preferences of parties. The Manifesto Corpus contains the collected and annotated election programmes in the Corpus format of the package 'tm' to enable easy use of text processing and text mining functionality. Specific functions for scaling of coded political texts are included.



An R package for accessing and processing the Manifesto Project's Data and Corpus of election programmes.

Quick Start Guide

You can install the package from CRAN:


Then a typical script or session with manifestoR starts like this:

mp_setapikey("manifesto_apikey.txt") ## create and download your API key at before

## download election programmes texts and codings
election_programmes <- mp_corpus(countryname == "Bulgaria")

## for example:
head(content(election_programmes[[1]])) ## view beginning of text of first manifesto
table(codes(election_programmes)) ## count codes of all manifestos

## ...


The main user documentation is the vignette manifestoRworkflow. It walks you through the package's central functions giving many example code bits. For detailed information about all functions and parameters, pleaser refer to the functions' documentations with R's ? or the packages Reference Manual.


If you want to contribute to the development of manifestoR by reporting bugs, proposing features or writing program code, you are invited to do this on the package's github page: Developers, please also note the information on packing and testing manifestoR below.

Alternative versions and installation methods

Stable major versions of manifestoR will be provided on CRAN, such that you can install and update them via R's base functions install.packages and update.packages. A development version is available on github, which you can install to get the most recent features and bugfixes.

Installation from github

Note that the NAMESPACE file and documentation are not part of the github repository, since they are generated automatically. Hence installation with devtools via install_github is not possible. Instead, you can clone the master branch of the repository and a Makefile will come with the source code. make install packs and installs the package (and documentation) to your default R installation, requiring devtools to be installed.

Developing: from a local source copy

The Makefile in the github repository contains several other targets helpful for developing:

make (=make all) packs the package (and documentation) to a tarball in the parent directory.

You can run the tests provided together with the source code with make test. Note that this requires a file with a valid Manifesto Project DB API Key in the file tests/manifesto_apikey.txt.

make check checks the package.

Build dependencies:

To pack the source and documentation from this folder into a package tarball your system needs to have installed:

  • R packages devtools and roxygen2
  • R packages knitr (for documentation)
  • texlive-fonts-extra (for documentation)

Functions in manifestoR

Name Description
attach_year Compute year from date variable in MPDS
v4_categories Lists of categories and category relations
ManifestoDocument Manifesto Document
ManifestoDocumentMeta Manifesto Document Metadata
ManifestoSource Data Source for Manifesto Corpus
aggregate_pers Aggregate category percentages in groups
get_mpdb Download content from the Manifesto Database
get_viacache Get API results via cache
iff Apply a function if and only if test is TRUE
issue_attention_diversity Issue Attention Diversity
mp_corpusversions List the available versions of the Manifesto Project's Corpus
mp_emptycache Empty the manifestoR's cache
clarity_dimensions Default programmatic clarity dimensions from Giebler/Lacewell/Regel/Werner 2015.
aggregate_cee_codes Process CMP codings
mp_coreversions List the available versions of the Manifesto Project's Main Dataset
mp_corpus Get documents from the Manifesto Corpus Database
formatmpds Format the main data set
franzmann_kaiser Left-Right Scores based on Franzmann & Kaiser Method
mp_availability Availability information for election programmes
mp_bootstrap Compute bootstrap distributions for scaling functions
mp_cite Print Manifesto Corpus citation information
mp_clarity Programmatic clarity measures (PC)
mp_save_cache Save manifestoR's cache
mp_scale Scaling annotated manifesto documents
ManifestoAvailability Manifesto Availability Information class
ManifestoCorpus Manifesto Corpus class
count_codes Count the codings from a ManifestoDocument
formatids Format ids for web API queries
mp_nicheness Party nicheness measures
mp_rmps Relative measure of party size (RMPS)
mp_view_originals View original documents from the Manifesto Corpus Database
mpdb_api_request Manifesto Project DB API request
na_replace Replace NAs in vector with fixed value
null_to_na Convert NULL to NA
mp_interpolate Interpolate values within election periods
mp_load_cache Load manifestoR's cache
prefix Prefix a string of text
codes Access the codes of a Manifesto Document or Corpus
mp_check_for_corpus_update Check for Updates of Corpus in Manifesto Project DB
manifestoR Access and process data and documents of the Manifesto Project
median_voter Median Voter position Replicates cases in a data.frame
rescale Simple linear rescaling of positions
split_belgium Split Belgium party system into separate groups
vanilla Vanilla Scaling by Gabel & Huber
mp_setapikey Set the API key for the Manifesto Documents Database.
mp_use_corpus_version Use a specific version of the Manifesto Project Corpus
rile RILE
scale_weighted Scaling functions
readManifesto Reader for ManifestoSource
mp_maindataset Access the Manifesto Project's Main Dataset
mp_metadata Get meta data for election programmes
No Results!

Vignettes of manifestoR

No Results!

Last month downloads


Date 2017-05-08
VignetteBuilder R.rsp
Collate manifestoR-package.r globals.R pipe_helpers.R cache.R db_api.R corpus.R manifesto.R codes.R scaling_general.R scaling_rile.R scaling_functions.R issue_attention.R nicheness.R clarity.R scaling_bootstrap.R dataset.R
License GPL (>= 3)
LazyData true
RoxygenNote 6.0.1
NeedsCompilation no
Packaged 2017-05-10 08:05:26 UTC; gitlab-runner
Repository CRAN
Date/Publication 2017-05-10 11:27:50 UTC

Include our badge in your README