Functions to import the
V-Dem and the
V-Party datasets
from the {vdemdata}
package in a many packages universe consistent format.
Value
A dataframe of the[vdem]
dataset in a many packages
universe-consistent format.
A dataframe of the[vparty]
dataset consistent with the
many packages universe.
Details
import_vdem()
imports the latest version of VDEM dataset
and formats it to be consistent with the many packages universe.
import_vparty()
imports the latest version of the V-Party dataset
and formats it to be consistent with the many packages universe.
Examples
# \donttest{
import_vdem()
#> # A tibble: 27,555 × 4,598
#> vdemID stateID StateName State Beg End Year Date codingstart codingend
#> <dbl> <chr> <chr> <chr> <mda> <mda> <mda> <mda> <dbl> <dbl>
#> 1 3 MEX Mexico Vicer… 1789 1820 1789 1789… 1789 2022
#> 2 3 MEX Mexico Vicer… 1789 1820 1790 1790… 1789 2022
#> 3 3 MEX Mexico Vicer… 1789 1820 1791 1791… 1789 2022
#> 4 3 MEX Mexico Vicer… 1789 1820 1792 1792… 1789 2022
#> 5 3 MEX Mexico Vicer… 1789 1820 1793 1793… 1789 2022
#> 6 3 MEX Mexico Vicer… 1789 1820 1794 1794… 1789 2022
#> 7 3 MEX Mexico Vicer… 1789 1820 1795 1795… 1789 2022
#> 8 3 MEX Mexico Vicer… 1789 1820 1796 1796… 1789 2022
#> 9 3 MEX Mexico Vicer… 1789 1820 1797 1797… 1789 2022
#> 10 3 MEX Mexico Vicer… 1789 1820 1798 1798… 1789 2022
#> # ℹ 27,545 more rows
#> # ℹ 4,588 more variables: gapstart1 <dbl>, gapstart2 <dbl>, gapstart3 <dbl>,
#> # gapend1 <dbl>, gapend2 <dbl>, gapend3 <dbl>, gap_index <dbl>,
#> # COWcode <dbl>, v2x_polyarchy <dbl>, v2x_polyarchy_codelow <dbl>,
#> # v2x_polyarchy_codehigh <dbl>, v2x_polyarchy_sd <dbl>, v2x_libdem <dbl>,
#> # v2x_libdem_codelow <dbl>, v2x_libdem_codehigh <dbl>, v2x_libdem_sd <dbl>,
#> # v2x_partipdem <dbl>, v2x_partipdem_codelow <dbl>, …
# }
# \donttest{
import_vparty()
#> # A tibble: 11,898 × 383
#> # Groups: vpartyID [3,467]
#> vpartyID Party partyID StateName State stateID stateNR Beg End Year
#> <dbl> <chr> <chr> <chr> <chr> <chr> <dbl> <mda> <mda> <mda>
#> 1 4908 independe… indep Afghanis… King… AFG 36 1965 2010 1965
#> 2 4908 independe… indep Afghanis… King… AFG 36 1965 2010 1969
#> 3 4908 independe… indep Afghanis… Isla… AFG 36 1965 2010 2005
#> 4 4908 independe… indep Afghanis… Isla… AFG 36 1965 2010 2010
#> 5 5184 People's … HDK Afghanis… Demo… AFG 36 1988 1988 1988
#> 6 190 Democrati… PDS Albania Repu… ALB 12 1991 2017 1991
#> 7 190 Democrati… PDS Albania Repu… ALB 12 1991 2017 1992
#> 8 190 Democrati… PDS Albania Repu… ALB 12 1991 2017 1996
#> 9 190 Democrati… PDS Albania Repu… ALB 12 1991 2017 1997
#> 10 190 Democrati… PDS Albania Repu… ALB 12 1991 2017 2001
#> # ℹ 11,888 more rows
#> # ℹ 373 more variables: `Geographic Region` <int>, `Geopolitical Region` <int>,
#> # party_gaps <chr>, historical_date <date>, codingstart <dbl>,
#> # gapstart <dbl>, gapend <dbl>, codingend <dbl>, project <dbl>,
#> # COWcode <int>, gap_index <dbl>, v2xpa_antiplural <dbl>,
#> # v2xpa_antiplural_codelow <dbl>, v2xpa_antiplural_codehigh <dbl>,
#> # v2xpa_popul <dbl>, v2xpa_popul_codelow <dbl>, v2xpa_popul_codehigh <dbl>, …
# }