ManifestoProject / manifestoR

An R package for accessing the Manifesto Project's Data and Corpus of election programmes
53 stars 5 forks source link

new variable id_perm not accessible via manifestoR #3

Closed nicmer closed 6 years ago

nicmer commented 6 years ago

Version 2017b of the Main dataset includes a new variable (id_perm). The variable is a six-digit character string. However when using "mp_maindataset()" all entries are NA, because manifestoR treats the variable as numeric.

id_perm is mostly for internal reasons to identify observations permanently between different dataset versions even if we correct let's say the party id or the election date. The variable will only become useful in such cases in the future.

We will fix this with the a future version of manifestoR.

An easy workaround is this to load the stata version instead of the JSON file:

library(haven)
library(manifestoR)
mp_setapikey("secrets/manifesto_apikey.txt")
mpds <- mp_maindataset(download_format = "dta") %>% read_dta()
nicmer commented 6 years ago

fixed with version 1.3