Fanteakwa North Elections

Patrick Mensah

2023-08-12

Reading the file

# Read the Excel file
data <- read_excel("Fanteakwa_North.xlsx")

Structure of the dataset

str(data)
## tibble [130 × 15] (S3: tbl_df/tbl/data.frame)
##  $ Polling_Station_Number: Factor w/ 130 levels "E270101","E270102",..: 1 2 3 4 5 6 7 8 9 10 ...
##  $ Electoral_Area        : Factor w/ 28 levels "Abaase","Abooso",..: 15 15 15 15 9 9 9 11 11 11 ...
##  $ Location              : Factor w/ 130 levels "A M E Zion Prim Begoro 1",..: 94 113 59 60 91 92 89 16 15 20 ...
##  $ NPP                   : num [1:130] NA NA NA NA NA NA NA NA NA NA ...
##  $ NDC                   : num [1:130] NA NA NA NA NA NA NA NA NA NA ...
##  $ GUM                   : num [1:130] NA NA NA NA NA NA NA NA NA NA ...
##  $ CPP                   : num [1:130] NA NA NA NA NA NA NA NA NA NA ...
##  $ GFP                   : num [1:130] NA NA NA NA NA NA NA NA NA NA ...
##  $ GCPP                  : num [1:130] NA NA NA NA NA NA NA NA NA NA ...
##  $ APC                   : num [1:130] NA NA NA NA NA NA NA NA NA NA ...
##  $ LPG                   : num [1:130] NA NA NA NA NA NA NA NA NA NA ...
##  $ PNC                   : num [1:130] NA NA NA NA NA NA NA NA NA NA ...
##  $ PPP                   : num [1:130] NA NA NA NA NA NA NA NA NA NA ...
##  $ NDP                   : num [1:130] NA NA NA NA NA NA NA NA NA NA ...
##  $ Independent           : num [1:130] NA NA NA NA NA NA NA NA NA NA ...

Checking for duplicates

# Finding duplicate records#### 
duplicate_rows <- data[duplicated(data) | duplicated(data, fromLast = TRUE), ]

# Check if there are duplicate records
if (nrow(duplicate_rows) == 0) {
  cat("There are no duplicate records.\n")
} else {
  cat("Number of duplicate records:", nrow(duplicate_rows), "\n")
  print(duplicate_rows)
}
## There are no duplicate records.

Total polling station in Fanteakwa North

# Calculate the total number of Polling stations in Fanteakwa North 
total_observations <- nrow(data)

# Display the total number of observations
cat("Total number of Polling Stations in Fanteakwa North is ", total_observations, "\n")
## Total number of Polling Stations in Fanteakwa North is  130

Why 130 instead of 129 Polling stations

# Filter records where Polling_Station_Number is "E2701sps"
records_e2701sps <- data %>%
  filter(Polling_Station_Number == "E2701sps")

# Display the filtered records
print(records_e2701sps)
## # A tibble: 1 × 15
##   Polling_Station_Number Electoral_Area Location     NPP   NDC   GUM   CPP   GFP
##   <fct>                  <fct>          <fct>      <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 E2701sps               Begoro-zongo   Local Cou…    NA    NA    NA    NA    NA
## # ℹ 7 more variables: GCPP <dbl>, APC <dbl>, LPG <dbl>, PNC <dbl>, PPP <dbl>,
## #   NDP <dbl>, Independent <dbl>

Polling stations in each Electoral Area

## # A tibble: 28 × 2
##    Electoral_Area   Polling_Station_Count
##    <fct>                            <int>
##  1 Dominase                             8
##  2 Nteso/Ntanoam                        8
##  3 Obuase                               8
##  4 Abooso                               7
##  5 Amotare/Agyamamu                     7
##  6 Mpaem                                7
##  7 Mission                              6
##  8 Opare                                6
##  9 Bonterase                            5
## 10 Dedesewurako                         5
## 11 Miaso                                5
## 12 Odortom                              5
## 13 Odumasi East                         5
## 14 Ahomahomasu                          4
## 15 Akoradarko                           4
## 16 Akwamu/Kotoku                        4
## 17 Asirebuso                            4
## 18 Koradaso                             4
## 19 Abaase                               3
## 20 Addokrom                             3
## 21 Begoro-zongo                         3
## 22 Besebuom                             3
## 23 Feyiase                              3
## 24 Obooho                               3
## 25 Onuku                                3
## 26 Sekyere                              3
## 27 Odumasi West                         2
## 28 Paramanteng                          2

Number of Polling Stations in Each Electoral Area

Generating numbers for each political party

##  Polling_Station_Number          Electoral_Area                     Location  
##  E270101 :  1           Dominase        : 8     A M E Zion Prim Begoro 1:  1  
##  E270102 :  1           Nteso/Ntanoam   : 8     A M E Zion Prim Begoro 2:  1  
##  E270103 :  1           Obuase          : 8     A Prim Sch Abooso       :  1  
##  E270104 :  1           Abooso          : 7     Abaase ''A''begoro      :  1  
##  E2701sps:  1           Amotare/Agyamamu: 7     Abaase ''B''begoro      :  1  
##  E270201 :  1           Mpaem           : 7     Abease Begoro           :  1  
##  (Other) :124           (Other)         :85     (Other)                 :124  
##       NPP             NDC             GUM             CPP       
##  Min.   :  4.0   Min.   : 19.0   Min.   : 10.0   Min.   :  5.0  
##  1st Qu.:160.2   1st Qu.:234.8   1st Qu.:112.5   1st Qu.:107.0  
##  Median :366.5   Median :455.0   Median :212.5   Median :188.5  
##  Mean   :385.8   Mean   :426.6   Mean   :216.0   Mean   :194.7  
##  3rd Qu.:600.0   3rd Qu.:613.2   3rd Qu.:317.5   3rd Qu.:301.5  
##  Max.   :799.0   Max.   :796.0   Max.   :400.0   Max.   :399.0  
##                                                                 
##       GFP              GCPP            APC             LPG        
##  Min.   :  7.00   Min.   :  1.0   Min.   :  4.0   Min.   :  1.00  
##  1st Qu.: 94.75   1st Qu.:104.2   1st Qu.: 78.0   1st Qu.: 92.25  
##  Median :181.50   Median :229.5   Median :199.5   Median :172.00  
##  Mean   :186.97   Mean   :211.6   Mean   :200.6   Mean   :184.72  
##  3rd Qu.:261.25   3rd Qu.:318.2   3rd Qu.:319.5   3rd Qu.:283.25  
##  Max.   :395.00   Max.   :398.0   Max.   :400.0   Max.   :399.00  
##                                                                   
##       PNC             PPP             NDP         Independent   
##  Min.   :  3.0   Min.   :  0.0   Min.   :  8.0   Min.   :  3.0  
##  1st Qu.: 95.0   1st Qu.:111.5   1st Qu.:107.2   1st Qu.: 83.0  
##  Median :197.5   Median :223.5   Median :200.5   Median :191.5  
##  Mean   :192.9   Mean   :213.8   Mean   :199.0   Mean   :187.0  
##  3rd Qu.:289.5   3rd Qu.:314.0   3rd Qu.:277.5   3rd Qu.:279.8  
##  Max.   :400.0   Max.   :400.0   Max.   :399.0   Max.   :400.0  
## 

Total votes for each political party

Creating new polling stations

## # A tibble: 133 × 15
##    Polling_Station_Number Electoral_Area Location    NPP   NDC   GUM   CPP   GFP
##    <chr>                  <chr>          <chr>     <dbl> <dbl> <dbl> <dbl> <dbl>
##  1 E270101                Koradaso       Market C…   414   237   169   300    22
##  2 E270102                Koradaso       Presby S…   462   763   133     9   114
##  3 E270103                Koradaso       D.A Prim…   178   338   198   169    87
##  4 E270104                Koradaso       D.A Prim…   525    38   360   279   131
##  5 E2701sps               Begoro-zongo   Local Co…   194   136   175   347   185
##  6 E270201                Begoro-zongo   Local Co…   117   454   400   208   250
##  7 E270202                Begoro-zongo   Islamic …   298   737   244   314   202
##  8 E270301                Bonterase      Anglican…   228   559   308   136   245
##  9 E270302                Bonterase      Anglican…   243   588   103   308   245
## 10 E270303                Bonterase      Apostoli…    13    82   308   394   177
## # ℹ 123 more rows
## # ℹ 7 more variables: GCPP <dbl>, APC <dbl>, LPG <dbl>, PNC <dbl>, PPP <dbl>,
## #   NDP <dbl>, Independent <dbl>

Manchester SHS

# Assuming there is a new Polling station called 'Manchester Shs' in Koradaso Electoral Area
# but due to some confusions that happens, the figures for both NPP and NDC are not yet. 



# New polling station data
new_polling_station <- data.frame(
  Polling_Station_Number = 'E272811',
  Electoral_Area = 'Koradaso',
  Location = 'Manchester SHS',
  NPP = NA,  # NPP votes not available
  NDC = NA,  # NDC votes not available
  GUM = 153,
  CPP = 7,
  GFP = 3,
  GCPP = 4,
  APC = 130,
  LPG = 20,
  PNC = 112,
  PPP = 613,
  NDP = 7,
  Independent = 27  
)

# Add new polling station to the data dataset
data <- bind_rows(data, new_polling_station)

# Print the updated dataset
print(data)
## # A tibble: 134 × 15
##    Polling_Station_Number Electoral_Area Location    NPP   NDC   GUM   CPP   GFP
##    <chr>                  <chr>          <chr>     <dbl> <dbl> <dbl> <dbl> <dbl>
##  1 E270101                Koradaso       Market C…   414   237   169   300    22
##  2 E270102                Koradaso       Presby S…   462   763   133     9   114
##  3 E270103                Koradaso       D.A Prim…   178   338   198   169    87
##  4 E270104                Koradaso       D.A Prim…   525    38   360   279   131
##  5 E2701sps               Begoro-zongo   Local Co…   194   136   175   347   185
##  6 E270201                Begoro-zongo   Local Co…   117   454   400   208   250
##  7 E270202                Begoro-zongo   Islamic …   298   737   244   314   202
##  8 E270301                Bonterase      Anglican…   228   559   308   136   245
##  9 E270302                Bonterase      Anglican…   243   588   103   308   245
## 10 E270303                Bonterase      Apostoli…    13    82   308   394   177
## # ℹ 124 more rows
## # ℹ 7 more variables: GCPP <dbl>, APC <dbl>, LPG <dbl>, PNC <dbl>, PPP <dbl>,
## #   NDP <dbl>, Independent <dbl>

Updating NPP and NDC in Manchester SHS

# After recounting the ballots, we got the new figures for NPP and NDC we have to update the figures
# Update NPP and NDC figures for Manchester SHS
data[data$Polling_Station_Number == 'E272811', 'NPP'] <- 203
data[data$Polling_Station_Number == 'E272811', 'NDC'] <- 5000

# Print the updated dataset
print(data)
## # A tibble: 134 × 15
##    Polling_Station_Number Electoral_Area Location    NPP   NDC   GUM   CPP   GFP
##    <chr>                  <chr>          <chr>     <dbl> <dbl> <dbl> <dbl> <dbl>
##  1 E270101                Koradaso       Market C…   414   237   169   300    22
##  2 E270102                Koradaso       Presby S…   462   763   133     9   114
##  3 E270103                Koradaso       D.A Prim…   178   338   198   169    87
##  4 E270104                Koradaso       D.A Prim…   525    38   360   279   131
##  5 E2701sps               Begoro-zongo   Local Co…   194   136   175   347   185
##  6 E270201                Begoro-zongo   Local Co…   117   454   400   208   250
##  7 E270202                Begoro-zongo   Islamic …   298   737   244   314   202
##  8 E270301                Bonterase      Anglican…   228   559   308   136   245
##  9 E270302                Bonterase      Anglican…   243   588   103   308   245
## 10 E270303                Bonterase      Apostoli…    13    82   308   394   177
## # ℹ 124 more rows
## # ℹ 7 more variables: GCPP <dbl>, APC <dbl>, LPG <dbl>, PNC <dbl>, PPP <dbl>,
## #   NDP <dbl>, Independent <dbl>

New total votes for each political party

#Finding the new total votes for each political party####
# Calculate the new total votes for each political party
total_votes <- data %>%
  summarise_at(vars(NPP:Independent), sum, na.rm = TRUE)

# Print the new total votes
print(total_votes)
## # A tibble: 1 × 12
##     NPP   NDC   GUM   CPP   GFP  GCPP   APC   LPG   PNC   PPP   NDP Independent
##   <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>       <dbl>
## 1 52479 62507 28367 25520 25068 27682 26593 24280 25228 28690 26149       24417

New bar chart

Checking for duplicates again

## There are no duplicate records.

Deleting all new polling stations

## # A tibble: 6 × 15
##   Polling_Station_Number Electoral_Area Location     NPP   NDC   GUM   CPP   GFP
##   <chr>                  <chr>          <chr>      <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 E272802                Mpaem          D/A Prim …   325   647   247   304   219
## 2 E272803                Mpaem          D A Prim …   783    54   288   390   179
## 3 E272804                Mpaem          D A Prim …   279   216    47    60   221
## 4 E272805                Mpaem          D A Prim …   799   596   330   107   323
## 5 E272806                Mpaem          Abuakwa      788   556    99   291    89
## 6 E272807                Mpaem          Akakpokope   566   657   107   372   121
## # ℹ 7 more variables: GCPP <dbl>, APC <dbl>, LPG <dbl>, PNC <dbl>, PPP <dbl>,
## #   NDP <dbl>, Independent <dbl>

Finding percentages of votes

## Overall Percentage of Votes:
## NPP: 13.78 %
## NDC: 15.24 %
## GUM: 7.71 %
## CPP: 6.95 %
## GFP: 6.68 %
## GCPP: 7.56 %
## APC: 7.17 %
## LPG: 6.6 %
## PNC: 6.89 %
## PPP: 7.63 %
## NDP: 7.11 %
## Independent: 6.68 %

Stacked bar for the percentages of votes

Pie Chart

The New Patriotic party

## # A tibble: 130 × 4
##    Polling_Station_Number Electoral_Area Location                      NPP
##    <chr>                  <chr>          <chr>                       <dbl>
##  1 E270101                Koradaso       Market Center Koradaso        414
##  2 E270102                Koradaso       Presby Shs Begoro             462
##  3 E270103                Koradaso       D.A Prim Akrumso              178
##  4 E270104                Koradaso       D.A Prim. Opesika             525
##  5 E2701sps               Begoro-zongo   Local Council Office,Begoro   194
##  6 E270201                Begoro-zongo   Local Council Offices         117
##  7 E270202                Begoro-zongo   Islamic Kg School Begoro      298
##  8 E270301                Bonterase      Anglican Prim A Begoro        228
##  9 E270302                Bonterase      Anglican Jhs Begoro           243
## 10 E270303                Bonterase      Apostolic Church Begoro        13
## # ℹ 120 more rows

The NPP top 5

## # A tibble: 5 × 4
##   Polling_Station_Number Electoral_Area Location                  NPP
##   <chr>                  <chr>          <chr>                   <dbl>
## 1 E272805                Mpaem          D A Prim Sch Adakope      799
## 2 E272507                Dominase       Omafele                   791
## 3 E272806                Mpaem          Abuakwa                   788
## 4 E272503                Dominase       D A Prim Sch Yokperm      784
## 5 E272803                Mpaem          D A Prim Sch Tramleveme   783

Summary Statistics of the NPP

## Total number of votes NPP had in Fanteakwa North is: 50154
## Maximum number of votes NPP had in Fanteakwa North is: 799
## Minimum number of votes NPP had in Fanteakwa North is: 4
## Average number of votes NPP had in Fanteakwa North is: 385.8
## Polling station with the maximum NPP votes:
## # A tibble: 1 × 4
##   Polling_Station_Number Electoral_Area Location               NPP
##   <chr>                  <chr>          <chr>                <dbl>
## 1 E272805                Mpaem          D A Prim Sch Adakope   799
## 
## Polling station with the minimum NPP votes:
## # A tibble: 1 × 4
##   Polling_Station_Number Electoral_Area Location                   NPP
##   <chr>                  <chr>          <chr>                    <dbl>
## 1 E272801                Mpaem          Presby Primary Sch Mpaem     4

NPP Total votes Per electoral area

## # A tibble: 28 × 2
##    Electoral_Area   Total_NPP_Votes
##    <chr>                      <dbl>
##  1 Dominase                    3877
##  2 Obuase                      3593
##  3 Mpaem                       3544
##  4 Mission                     3115
##  5 Amotare/Agyamamu            2562
##  6 Odortom                     2522
##  7 Asirebuso                   2147
##  8 Besebuom                    2124
##  9 Nteso/Ntanoam               2118
## 10 Opare                       1908
## # ℹ 18 more rows

NPP Average votes Per electoral area

## # A tibble: 28 × 2
##    Electoral_Area Avg_NPP_Votes
##    <chr>                  <dbl>
##  1 Besebuom                708 
##  2 Paramanteng             581 
##  3 Sekyere                 578.
##  4 Odumasi West            554.
##  5 Asirebuso               537.
##  6 Mission                 519.
##  7 Mpaem                   506.
##  8 Odortom                 504.
##  9 Dominase                485.
## 10 Obooho                  478.
## # ℹ 18 more rows

National Democratic Party (NDC)

## # A tibble: 130 × 4
##    Polling_Station_Number Electoral_Area Location                      NDC
##    <chr>                  <chr>          <chr>                       <dbl>
##  1 E270101                Koradaso       Market Center Koradaso        237
##  2 E270102                Koradaso       Presby Shs Begoro             763
##  3 E270103                Koradaso       D.A Prim Akrumso              338
##  4 E270104                Koradaso       D.A Prim. Opesika              38
##  5 E2701sps               Begoro-zongo   Local Council Office,Begoro   136
##  6 E270201                Begoro-zongo   Local Council Offices         454
##  7 E270202                Begoro-zongo   Islamic Kg School Begoro      737
##  8 E270301                Bonterase      Anglican Prim A Begoro        559
##  9 E270302                Bonterase      Anglican Jhs Begoro           588
## 10 E270303                Bonterase      Apostolic Church Begoro        82
## # ℹ 120 more rows

NDC Top 5 Polling stations

Summary statistics of the NDC

## Total number of votes NDC had in Fanteakwa North is: 55452
## Maximum number of votes NDC had in Fanteakwa North is: 796
## Minimum number of votes NDC had in Fanteakwa North is: 19
## Average number of votes NDC had in Fanteakwa North is: 426.5538
## Polling station with the maximum NDC votes:
## # A tibble: 1 × 4
##   Polling_Station_Number Electoral_Area   Location                NDC
##   <chr>                  <chr>            <chr>                 <dbl>
## 1 E272401                Amotare/Agyamamu R/C Prim Sch Agyamamu   796
## 
## Polling station with the minimum NDC votes:
## # A tibble: 1 × 4
##   Polling_Station_Number Electoral_Area Location                       NDC
##   <chr>                  <chr>          <chr>                        <dbl>
## 1 E270505                Obuase         S D A Prim Sch Obuase Begoro    19

NDC Total votes per Electoral area

NDC average votes per Electoral area

NPP and NDC Votes and Differences

## # A tibble: 130 × 7
##    Polling_Station_Number Electoral_Area Location      NPP   NDC Vote_Difference
##    <chr>                  <chr>          <chr>       <dbl> <dbl>           <dbl>
##  1 E270701                Abaase         Abaase ''A…   372    83             289
##  2 E270702                Abaase         Abaase ''B…   142   522            -380
##  3 E270703                Abaase         Opoku Stre…   543   632             -89
##  4 E272301                Abooso         A Prim Sch…    66   645            -579
##  5 E272302                Abooso         R/C Prim S…   662   346             316
##  6 E272303                Abooso         Ampasakyi …    84   128             -44
##  7 E272304                Abooso         D A Prim S…   164   217             -53
##  8 E272305                Abooso         D A Prim S…   647   617              30
##  9 E272306                Abooso         D/A Prim S…    50   697            -647
## 10 E272307                Abooso         Amanfroso …    73   336            -263
## # ℹ 120 more rows
## # ℹ 1 more variable: Winner <chr>

NPP and NDC winners at Polling station levels

## # A tibble: 2 × 2
##   Winner  Count
##   <chr>   <int>
## 1 NDC Won    68
## 2 NPP Won    62

Polling stations where NPP and NDC won with the highest and least differences

## NPP won with the highest difference at:
## # A tibble: 1 × 17
##   Polling_Station_Number Electoral_Area Location     NPP   NDC   GUM   CPP   GFP
##   <chr>                  <chr>          <chr>      <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 E272803                Mpaem          D A Prim …   783    54   288   390   179
## # ℹ 9 more variables: GCPP <dbl>, APC <dbl>, LPG <dbl>, PNC <dbl>, PPP <dbl>,
## #   NDP <dbl>, Independent <dbl>, Vote_Difference <dbl>, Winner <chr>
## 
## NPP won with the least difference at:
## # A tibble: 1 × 17
##   Polling_Station_Number Electoral_Area Location     NPP   NDC   GUM   CPP   GFP
##   <chr>                  <chr>          <chr>      <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 E270603                Sekyere        Near Ofor…   554   553   197   351   107
## # ℹ 9 more variables: GCPP <dbl>, APC <dbl>, LPG <dbl>, PNC <dbl>, PPP <dbl>,
## #   NDP <dbl>, Independent <dbl>, Vote_Difference <dbl>, Winner <chr>
## 
## NDC won with the highest difference at:
## # A tibble: 1 × 17
##   Polling_Station_Number Electoral_Area Location     NPP   NDC   GUM   CPP   GFP
##   <chr>                  <chr>          <chr>      <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 E271903                Akwamu/Kotoku  D/A Prim …    88   793   114   310    64
## # ℹ 9 more variables: GCPP <dbl>, APC <dbl>, LPG <dbl>, PNC <dbl>, PPP <dbl>,
## #   NDP <dbl>, Independent <dbl>, Vote_Difference <dbl>, Winner <chr>
## 
## NDC won with the least difference at:
## # A tibble: 1 × 17
##   Polling_Station_Number Electoral_Area Location     NPP   NDC   GUM   CPP   GFP
##   <chr>                  <chr>          <chr>      <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 E271706                Nteso/Ntanoam  Nteso No 2   515   521    93   187   184
## # ℹ 9 more variables: GCPP <dbl>, APC <dbl>, LPG <dbl>, PNC <dbl>, PPP <dbl>,
## #   NDP <dbl>, Independent <dbl>, Vote_Difference <dbl>, Winner <chr>

Competitive Electoral Areas

## Number of instances where NPP or NDC won by a close margin: 3
## Number of instances where NPP or NDC won by a significant margin: 119
## # A tibble: 3 × 6
##   Polling_Station_Number Electoral_Area Location       NPP   NDC Vote_Difference
##   <chr>                  <chr>          <chr>        <dbl> <dbl>           <dbl>
## 1 E270603                Sekyere        Near Oforiw…   554   553               1
## 2 E271706                Nteso/Ntanoam  Nteso No 2     515   521              -6
## 3 E272604                Odortom        D A Prim Sc…   665   672              -7

NPP and NDC Votes per Electoral Area

## # A tibble: 28 × 5
##    Electoral_Area  Total_NPP_Votes Total_NDC_Votes Vote_Difference Winning_Party
##    <chr>                     <dbl>           <dbl>           <dbl> <chr>        
##  1 Abaase                     1057            1237            -180 NDC          
##  2 Abooso                     1746            2986           -1240 NDC          
##  3 Addokrom                   1090             824             266 NPP          
##  4 Ahomahomasu                1179            1795            -616 NDC          
##  5 Akoradarko                 1021            1316            -295 NDC          
##  6 Akwamu/Kotoku              1208            2282           -1074 NDC          
##  7 Amotare/Agyama…            2562            3850           -1288 NDC          
##  8 Asirebuso                  2147            1519             628 NPP          
##  9 Begoro-zongo                609            1327            -718 NDC          
## 10 Besebuom                   2124             859            1265 NPP          
## 11 Bonterase                  1521            1962            -441 NDC          
## 12 Dedesewurako               1894            1572             322 NPP          
## 13 Dominase                   3877            3632             245 NPP          
## 14 Feyiase                     998            1479            -481 NDC          
## 15 Koradaso                   1579            1376             203 NPP          
## 16 Miaso                      1119            1646            -527 NDC          
## 17 Mission                    3115            3031              84 NPP          
## 18 Mpaem                      3544            3262             282 NPP          
## 19 Nteso/Ntanoam              2118            3156           -1038 NDC          
## 20 Obooho                     1435            1352              83 NPP          
## 21 Obuase                     3593            2320            1273 NPP          
## 22 Odortom                    2522            2307             215 NPP          
## 23 Odumasi East               1461            2936           -1475 NDC          
## 24 Odumasi West               1109             692             417 NPP          
## 25 Onuku                       721             963            -242 NDC          
## 26 Opare                      1908            3527           -1619 NDC          
## 27 Paramanteng                1162             982             180 NPP          
## 28 Sekyere                    1735            1262             473 NPP

Number of Electoral Areas won by NPP, NDC, and ties

## Number of Electoral Areas won by NPP: 14
## Number of Electoral Areas won by NDC: 14
## Number of ties:

NPP and NDC average number of votes per Electoral Area

## # A tibble: 28 × 4
##    Electoral_Area   Avg_NPP_Votes Avg_NDC_Votes Average_Difference
##    <chr>                    <dbl>         <dbl>              <dbl>
##  1 Abaase                    352.          412.              -60  
##  2 Abooso                    249.          427.             -177. 
##  3 Addokrom                  363.          275.               88.7
##  4 Ahomahomasu               295.          449.             -154  
##  5 Akoradarko                255.          329               -73.8
##  6 Akwamu/Kotoku             302           570.             -268. 
##  7 Amotare/Agyamamu          366           550              -184  
##  8 Asirebuso                 537.          380.              157  
##  9 Begoro-zongo              203           442.             -239. 
## 10 Besebuom                  708           286.              422. 
## 11 Bonterase                 304.          392.              -88.2
## 12 Dedesewurako              379.          314.               64.4
## 13 Dominase                  485.          454                30.6
## 14 Feyiase                   333.          493              -160. 
## 15 Koradaso                  395.          344                50.8
## 16 Miaso                     224.          329.             -105. 
## 17 Mission                   519.          505.               14.0
## 18 Mpaem                     506.          466                40.3
## 19 Nteso/Ntanoam             265.          394.             -130. 
## 20 Obooho                    478.          451.               27.7
## 21 Obuase                    449.          290               159. 
## 22 Odortom                   504.          461.               43  
## 23 Odumasi East              292.          587.             -295  
## 24 Odumasi West              554.          346               208. 
## 25 Onuku                     240.          321               -80.7
## 26 Opare                     318           588.             -270. 
## 27 Paramanteng               581           491                90  
## 28 Sekyere                   578.          421.              158.

Checking for over voting

## # A tibble: 130 × 19
##     Polling_Station_Number Electoral_Area Location   NPP   NDC   GUM   CPP   GFP
##     <chr>                  <chr>          <chr>    <dbl> <dbl> <dbl> <dbl> <dbl>
##   1 E270101                Koradaso       Market …   414   237   169   300    22
##   2 E270102                Koradaso       Presby …   462   763   133     9   114
##   3 E270103                Koradaso       D.A Pri…   178   338   198   169    87
##   4 E270104                Koradaso       D.A Pri…   525    38   360   279   131
##   5 E2701sps               Begoro-zongo   Local C…   194   136   175   347   185
##   6 E270201                Begoro-zongo   Local C…   117   454   400   208   250
##   7 E270202                Begoro-zongo   Islamic…   298   737   244   314   202
##   8 E270301                Bonterase      Anglica…   228   559   308   136   245
##   9 E270302                Bonterase      Anglica…   243   588   103   308   245
##  10 E270303                Bonterase      Apostol…    13    82   308   394   177
##  11 E270304                Bonterase      Salvati…   373   695   318   107   250
##  12 E270305                Bonterase      Dansor …   664    38   198     7    47
##  13 E270401                Mission        Presby …   601   195   209   113   130
##  14 E270402                Mission        Presby …   602   768   348   260    32
##  15 E270403                Mission        Begoro …   767   679   400    28   161
##  16 E270404                Mission        Adawso …   708   285   224   305   321
##  17 E270405                Mission        Foundat…    90   605   257   325    63
##  18 E270406                Mission        Apinto     347   499   176    73   167
##  19 E270501                Obuase         Osuben …   648   783   385   281   275
##  20 E270502                Obuase         Osuben …   354   343   140    72    77
##  21 E270503                Obuase         Old Sto…    25   309    23   266   152
##  22 E270504                Obuase         Mfum St…   518   458   129   374   198
##  23 E270505                Obuase         S D A P…   425    19   164   261    94
##  24 E270506                Obuase         A M E Z…   648   194   190   223   378
##  25 E270507                Obuase         A M E Z…   765   163    75   203   341
##  26 E270508                Obuase         Distric…   210    51   376   210   220
##  27 E270601                Sekyere        Sekyere…   589   533   268   218   183
##  28 E270602                Sekyere        Apeanin…   592   176   169   183   160
##  29 E270603                Sekyere        Near Of…   554   553   197   351   107
##  30 E270701                Abaase         Abaase …   372    83   361   154   241
##  31 E270702                Abaase         Abaase …   142   522   233   118   180
##  32 E270703                Abaase         Opoku S…   543   632   367   343   301
##  33 E270801                Odumasi West   Abease …   489   391    63    66    23
##  34 E270802                Odumasi West   Apeboos…   620   301    79   109   315
##  35 E270901                Odumasi East   Odumasi…   774   596    35   133   228
##  36 E270902                Odumasi East   Odumasi…    22   705   290    35   223
##  37 E270903                Odumasi East   Sda Jhs…   308   618   252    54   272
##  38 E270904                Odumasi East   R C Jhs…   134   588   342   239   186
##  39 E270905                Odumasi East   R C Pri…   223   429   322   378   170
##  40 E271001                Opare          D A Jhs…   165   709    47   119    22
##  41 E271002                Opare          D A Pri…   216   760   110   349   217
##  42 E271003                Opare          D A Pri…   289   711   278   303   300
##  43 E271004                Opare          D A Pri…   580   427   392     9   135
##  44 E271005                Opare          Salvati…    71   671   316   152    78
##  45 E271006                Opare          Akwaawa    587   249   294    99   163
##  46 E271101                Obooho         D/A Pri…   574   428   221   104   236
##  47 E271102                Obooho         D/A Jhs…   140   397   286   280    66
##  48 E271103                Obooho         Teyemuni   721   527   221   387   294
##  49 E271201                Onuku          D/A Pri…   152   380    72   179   217
##  50 E271202                Onuku          D A Pri…   293   544   291   277   283
##  51 E271203                Onuku          D/A Pri…   276    39   225   372   208
##  52 E271301                Akoradarko     D A Pri…   462   521   277   240    86
##  53 E271302                Akoradarko     D A Pri…    40   472   377    23   180
##  54 E271303                Akoradarko     Amoafoa…   430   199   171   166   357
##  55 E271304                Akoradarko     Bommoden    89   124   296    46   137
##  56 E271401                Ahomahomasu    D/A Pri…   315   264   347   190   364
##  57 E271402                Ahomahomasu    D/A Jhs…   222   774    92    36   357
##  58 E271403                Ahomahomasu    Cmb She…   527   185   124   173    40
##  59 E271404                Ahomahomasu    Tadieso    115   572   298    53   391
##  60 E271501                Besebuom       R/C Pri…   605   251    38   302   128
##  61 E271502                Besebuom       Besebuom   773   457   236   206   335
##  62 E271503                Besebuom       D/A Pri…   746   151   164   399   373
##  63 E271601                Addokrom       D/A Pri…   455    53   106    18   231
##  64 E271602                Addokrom       D/A Pri…   597   537    32   199   333
##  65 E271603                Addokrom       Cmb She…    38   234    82   158   395
##  66 E271701                Nteso/Ntanoam  Ntanoam    158   288   395   377   217
##  67 E271702                Nteso/Ntanoam  Marfokr…   751   184   353    36   327
##  68 E271703                Nteso/Ntanoam  Darkwak…   208   764   276   102   126
##  69 E271704                Nteso/Ntanoam  Kronkro…   373   412   208   243    40
##  70 E271705                Nteso/Ntanoam  D/A Pri…    33   626    75    47   263
##  71 E271706                Nteso/Ntanoam  Nteso N…   515   521    93   187   184
##  72 E271707                Nteso/Ntanoam  D/A Pri…    12   308   290   392   200
##  73 E271708                Nteso/Ntanoam  D/A Pri…    68    53    29   138    51
##  74 E271801                Paramanteng    D/A Pri…   754   204   216   298   224
##  75 E271802                Paramanteng    D/A Pri…   408   778   174   370    66
##  76 E271901                Akwamu/Kotoku  D/A Pri…   307   536   373   157   167
##  77 E271902                Akwamu/Kotoku  D/A Jhs…   277   563   322   188   257
##  78 E271903                Akwamu/Kotoku  D/A Pri…    88   793   114   310    64
##  79 E271904                Akwamu/Kotoku  D A Pri…   536   390   376   188   390
##  80 E272001                Feyiase        D/A Pri…   290   408   337    56    28
##  81 E272002                Feyiase        D A Jhs…   423   726    95   381    19
##  82 E272003                Feyiase        D/A Pri…   285   345   357    37   205
##  83 E272101                Miaso          D/A Pri…   670   159   169    83   123
##  84 E272102                Miaso          D/A Pri…   120   467    95   318    79
##  85 E272103                Miaso          D A Pri…   109   508    25   173   262
##  86 E272104                Miaso          D A Pri…   157    56   396   333   227
##  87 E272105                Miaso          D A Pri…    63   456   229   325    44
##  88 E272201                Asirebuso      D Aprim…   482   616   147   129   331
##  89 E272202                Asirebuso      D A Pri…   476   356   349   119   280
##  90 E272203                Asirebuso      D Aprim…   479   278   391   199    90
##  91 E272204                Asirebuso      D A Pri…   710   269   201   330   140
##  92 E272301                Abooso         A Prim …    66   645    80    20   137
##  93 E272302                Abooso         R/C Pri…   662   346   337   198    93
##  94 E272303                Abooso         Ampasak…    84   128   231    86   126
##  95 E272304                Abooso         D A Pri…   164   217   242    71   267
##  96 E272305                Abooso         D A Pri…   647   617   105   314     7
##  97 E272306                Abooso         D/A Pri…    50   697   374   201   326
##  98 E272307                Abooso         Amanfro…    73   336    10   164   270
##  99 E272401                Amotare/Agyam… R/C Pri…   177   796   112    80    82
## 100 E272402                Amotare/Agyam… Cmb She…   361    25   363    54   234
## 101 E272403                Amotare/Agyam… D/A Pri…   235   538   385   133   166
## 102 E272404                Amotare/Agyam… Presby …   609   518   140   243   254
## 103 E272405                Amotare/Agyam… D A Pri…   329   756    30     5    86
## 104 E272406                Amotare/Agyam… R C Pri…   725   665   114   127   121
## 105 E272407                Amotare/Agyam… Osubuer    126   552   277   366   389
## 106 E272501                Dominase       D A Pri…   211   723    93   155    70
## 107 E272502                Dominase       D A Jhs…   685   389   201   287   259
## 108 E272503                Dominase       D A Pri…   784   497    15    48    80
## 109 E272504                Dominase       R C Pri…   309   221   196   226   263
## 110 E272505                Dominase       Sabisea…   743   670   177   238    66
## 111 E272506                Dominase       D A Pri…   242   656   176   339   363
## 112 E272507                Dominase       Omafele    791   420    11   192   383
## 113 E272508                Dominase       Amakom     112    56    65   196   237
## 114 E272601                Odortom        D A Pri…   618   659    49   302   269
## 115 E272602                Odortom        Penteco…   476   162   203   147   133
## 116 E272603                Odortom        D A Pri…   150   237   174   385   136
## 117 E272604                Odortom        D A Pri…   665   672   372   189   160
## 118 E272605                Odortom        Penteco…   613   577   133   111   115
## 119 E272701                Dedesewurako   R C Pri…   766   515   383   190    45
## 120 E272702                Dedesewurako   R C Jhs…   159   329   121   118    63
## 121 E272703                Dedesewurako   D A Jhs…   390   224   398   114    18
## 122 E272704                Dedesewurako   D A Pri…   154   388   314     9   228
## 123 E272705                Dedesewurako   D A Pri…   425   116   258   114    97
## 124 E272801                Mpaem          Presby …     4   536   352    58   128
## 125 E272802                Mpaem          D/A Pri…   325   647   247   304   219
## 126 E272803                Mpaem          D A Pri…   783    54   288   390   179
## 127 E272804                Mpaem          D A Pri…   279   216    47    60   221
## 128 E272805                Mpaem          D A Pri…   799   596   330   107   323
## 129 E272806                Mpaem          Abuakwa    788   556    99   291    89
## 130 E272807                Mpaem          Akakpok…   566   657   107   372   121
## # ℹ 11 more variables: GCPP <dbl>, APC <dbl>, LPG <dbl>, PNC <dbl>, PPP <dbl>,
## #   NDP <dbl>, Independent <dbl>, Total_Valid_Votes_Cast <dbl>,
## #   Total_Registered_Voters <int>, Voting_Difference <chr>,
## #   Vote_Discrepancy <dbl>

Checking for over votings

## Number of over voting instances: 28
## # A tibble: 28 × 19
##    Polling_Station_Number Electoral_Area  Location   NPP   NDC   GUM   CPP   GFP
##    <chr>                  <chr>           <chr>    <dbl> <dbl> <dbl> <dbl> <dbl>
##  1 E271904                Akwamu/Kotoku   D A Pri…   536   390   376   188   390
##  2 E271402                Ahomahomasu     D/A Jhs…   222   774    92    36   357
##  3 E272806                Mpaem           Abuakwa    788   556    99   291    89
##  4 E272302                Abooso          R/C Pri…   662   346   337   198    93
##  5 E272503                Dominase        D A Pri…   784   497    15    48    80
##  6 E270404                Mission         Adawso …   708   285   224   305   321
##  7 E270402                Mission         Presby …   602   768   348   260    32
##  8 E272404                Amotare/Agyama… Presby …   609   518   140   243   254
##  9 E272506                Dominase        D A Pri…   242   656   176   339   363
## 10 E270603                Sekyere         Near Of…   554   553   197   351   107
## # ℹ 18 more rows
## # ℹ 11 more variables: GCPP <dbl>, APC <dbl>, LPG <dbl>, PNC <dbl>, PPP <dbl>,
## #   NDP <dbl>, Independent <dbl>, Total_Valid_Votes_Cast <dbl>,
## #   Total_Registered_Voters <int>, Voting_Difference <chr>,
## #   Vote_Discrepancy <dbl>