knitr::opts_chunk$set(echo = TRUE)
UGvoters16 is a package for the counts of Ugandan registered voters for the 2016 presidential election provided by the Electoral Commision (EC) of Uganda. This package contains the number of registered voters by polling station. This "controversial" data was claimed to contain atleast 20,000 "ghost voters" by members of the Ugandan media because the total count from the each polling station are not equal to the totals reported by the Electoral Commission.
Before you can use the data in R, you need to download it from Github using the following commands:
installed.packages("devtools") devtools::install_git("git://github.com/emaasit/UGvoters16.git", branch = "master") library(UGvoters16)
After loading the library, you can create a local data frame using the following command:
df1 <- voters df2 <- analyzed head(df1) head(df2)
You can explore for yourself and see why the Ugandan media claimed it has atleast 20,000 "ghost voters".
# what are the column names names(df1) names(df2) # count the total number of analyzed voter counts sum(df2$ANALYZED_VOTER_COUNT)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.