Bonds worth ₹ 121 Billion purchase between Apr 2019 and Jan 2024
Data was downloaded from dataful. Rows without reference number or with status Expired are not considered in this analysis. Hence, there may be a variation between the numbers.of excluded data is available below
Code
highchart() |>hc_chart(type ="sankey", inverted =FALSE) |>hc_add_series(data =list_parse(sankey.dat),nodes =list_parse(nodes),name ="Flow",type ="sankey",nodeWidth =20,linkOpacity =0.5, # Make links semi-transparentstates =list(hover =list(linkOpacity =0.8# Increase opacity on hover ) ) ) |>hc_plotOptions(sankey =list(nodePadding =3, curveFactor =0.6,colors =c("#1f77b4", "#ff7f0e", "#2ca02c"), # Colors for nodeslinkColor ="#d3d3d3"# Default link color (can be rgba for transparency) ) ) |>hc_title(text ="Flow of Electoral Bonds",align ="left",style =list(textDecoration ="underline",color ="#333333",fontWeight ="bold" ) ) |>hc_subtitle(text ="Electoral bond encashment between Apr 16, 2019 and Jan 24, 2024" ) |>hc_tooltip(formatter =JS(" function() { var amount = this.point.weight; // Check if it's a node (will have no 'weight' property) if (typeof amount === 'undefined') { return '<b>' + this.point.name + '</b>'; } // For links if (amount >= 1000000000) { return '<b>' + this.point.from + '</b> to <b>' + this.point.to + '</b>: ₹' + (amount/1000000000).toFixed(2) + 'B'; } else { return '<b>' + this.point.from + '</b> to <b>' + this.point.to + '</b>: ₹' + (amount/1000000).toFixed(2) + 'M'; } } ") ) |>hc_credits(enabled =TRUE,text ="Heteroscedasticity",href ="https://asitavsen.com",style =list(fontSize ="12px") ) |>hc_add_theme(custom_theme) |>hc_exporting(enabled =TRUE,filename ="ElectoralBondFlow" )
86 % (₹ 105 B) of money went to 5 parties. 91 % (₹ 111 B) of money came from 5 states
Code
##| fig-width: 10# Plot amount distribution by political partyplot_hc_pie_chart( amount_by_party, xval ="standardised_political_party_name", yval ="total_amount",series_name ="Amount",theme = custom_theme,title_text ="Amount by Political Party",subtitle_text ="Electoral bond encashment between Apr 16, 2019 and Jan 24, 2024",output_filename ="AmountByPoliticalParty")# Plot amount distribution by stateplot_hc_pie_chart( amount_by_state, xval ="issue_branch_state", yval ="total_amount",series_name ="Amount",theme = custom_theme,title_text ="Amount by State",output_filename ="AmountByState",subtitle_text ="Electoral bond encashment between Apr 16, 2019 and Jan 24, 2024")# Create and plot top purchasers chartplot_hc_pie_chart(rbind( data.comb[, .(total_amount =sum(amount)), by = .(standardised_purchaser_name) ][order(-total_amount)][1:20],data.table(standardised_purchaser_name ="Others",total_amount = data.comb[, .(total_amount =sum(amount)), by = .(standardised_purchaser_name) ][order(-total_amount)][21:.N, sum(total_amount)] ) ),xval ="standardised_purchaser_name",yval ="total_amount",series_name ="Amount",theme = custom_theme,title_text ="Amount by Purchaser",output_filename ="AmountByPurchaser",subtitle_text ="Electoral bond encashment between Apr 16, 2019 and Jan 24, 2024")
>70% of Purchasers are organizations; contributed 96% amount
Highest encashment by BJP but INC had more purchasers (Individuals). Biggest purchase made by MS S N Mohanty (Encashed by Biju Janta Dal) followed by Lakshmi Niwas Mittal (Encashed by BJP). Most purchases (value) were made in Maharashtra.
# Calculate individual party contributions and statisticsind_party <- data.comb[ organisation_or_individual =="Individual", .(total_amount =sum(amount),count = .N,per_count = .N /sum(data.comb[organisation_or_individual =="Individual", .N]) ), by = standardised_political_party_name][order(-total_amount)]# Create combined column and pie charthighchart() |>hc_add_series( ind_party,"column",hcaes(x = standardised_political_party_name, y = total_amount),name ="Amount" ) |>hc_add_series( ind_party,"pie",hcaes(name = standardised_political_party_name, y = count),name ="#Purchasers",dataLabels =list(enabled =FALSE) ) |>hc_plotOptions(series =list(showInLegend =FALSE,colorByPoint =TRUE ),pie =list(center =c("75%", "25%"),size =120,innerSize ="75%",dataLabels =list(enabled =FALSE) ) ) |>hc_yAxis(title =list(text ="Total Purchase (in millions)"), labels =list(formatter =JS("function() { return (this.value / 1000000) + ' M'; }") ) ) |>hc_xAxis(categories = ind_party$standardised_political_party_name) |>hc_tooltip(shared =FALSE,useHTML =TRUE,formatter =JS(" function() { if (this.series.type === 'column') { return '<b>' + this.point.name + '</b>: ₹' + (this.y / 1000000).toFixed(2) + ' M'; } else if (this.series.type === 'pie') { return '<b>' + this.point.name + '</b>: ' + this.y + ' contributors'; } } ") ) |>hc_title(text ="Electoral Bond Purchases by Organizations (Amount and Purchasers)",align ="left",style =list(textDecoration ="underline",color ="#333333",fontWeight ="bold" ) ) |>hc_subtitle(text ="Electoral bond encashment between Apr 16, 2019 and Jan 24, 2024" ) |>hc_credits(enabled =TRUE, text ="Heteroscedasticity",href ="https://asitavsen.com",style =list(fontSize ="12px") ) |>hc_add_theme(custom_theme) |>hc_exporting(enabled =TRUE,filename ="Individuals" )
Code
# Calculate individual contributions and statistics by partyind_amount_count_by_party <- data.comb[ organisation_or_individual =="Individual", .(total_amount =sum(amount),count =uniqueN(standardised_purchaser_name),avg =sum(amount) /uniqueN(standardised_purchaser_name) ), by = standardised_political_party_name][order(-avg)]# Calculate individual contributions by party and purchaserparty_ind_top <- data.comb[ organisation_or_individual =="Individual", .(total_amount =sum(amount)), by = .(standardised_political_party_name, standardised_purchaser_name)][, standardised_political_party_name :=fct_other( standardised_political_party_name,keep =c("Indian National Congress","Bharatiya Janata Party","All India Trinamool Congress","Bharat Rashtra Samithi","Biju Janata Dal" ))]# Get party order by total amountparty_order <- party_ind_top[ , .(range_diff =sum(total_amount)), by = standardised_political_party_name][order(-range_diff), standardised_political_party_name]# Create scatter plothighchart() |>hc_add_series(data = party_ind_top,type ="scatter",hcaes(x ="standardised_political_party_name", y ="total_amount", group ="standardised_political_party_name" ) ) |>hc_xAxis(type ="category",categories = party_order ) |>hc_yAxis(title =list(text ="Number of Contributors"),labels =list(formatter =JS("function() { return this.value / 1000000 + 'M'; }") ) ) |>hc_title(text ="Top individual purchasers by Party",align ="left",style =list(textDecoration ="underline",color ="#333333",fontWeight ="bold" ) ) |>hc_plotOptions(scatter =list(color ="red",marker =list(radius =4,symbol ="circle",lineWidth =1 ),jitter =list(x = .2, y =0) ) ) |>hc_legend(enabled =FALSE) |>hc_tooltip(formatter =JS(" function() { return 'Purchaser: ' + this.point.standardised_purchaser_name + '<br>Contribution: ₹' + (this.point.total_amount/1000000).toFixed(2) + 'M'; } ") ) |>hc_subtitle(text ="Electoral bond encashment between Apr 16, 2019 and Jan 24, 2024" ) |>hc_credits(enabled =TRUE,text ="Heteroscedasticity",href ="https://asitavsen.com",style =list(fontSize ="12px") ) |>hc_add_theme(custom_theme) |>hc_exporting(enabled =TRUE,filename ="IndividualsTop" )
Code
# First apply fct_other, then aggregate properlyparty_ind_state <- data.comb[ organisation_or_individual =="Individual"][, `:=`(issue_branch_state =fct_other( issue_branch_state,keep =c("Maharashtra", "Delhi", "Odisha", "West Bengal", "Telengana", "Rajasthan", "Gujrat"),other_level ="other_states" ),standardised_political_party_name =fct_other( standardised_political_party_name,keep =c("Indian National Congress", "Bharatiya Janata Party","All India Trinamool Congress", "Bharat Rashtra Samithi","Biju Janata Dal"),other_level ="other_parties" ))][, .(total_amount =sum(amount)), by = .(issue_branch_state, standardised_political_party_name)] # This will properly aggregate all combinations# Verify the aggregation#print(party_ind_state[issue_branch_state == "other_states"])# Order states by total amountstate_order <- party_ind_state[, .(state_total =sum(total_amount)), by = issue_branch_state][order(-state_total), issue_branch_state]# Create ordered stacked column charthchart( party_ind_state,"column", hcaes(x = issue_branch_state, y = total_amount, group = standardised_political_party_name)) |>hc_xAxis(categories =as.character(state_order)) |>hc_plotOptions(series =list(stacking ="normal")) |>hc_tooltip(useHTML =TRUE,formatter =JS(" function() { return '<b>' + this.point.issue_branch_state + '</b><br>' + this.point.standardised_political_party_name + ': ₹' + (this.y / 1000000000).toFixed(2) + 'B'; } ") ) |>hc_yAxis(title =list(text ="Total Contribution (in billions)"),labels =list(formatter =JS("function() { return '₹' + this.value / 1000000000 + 'B'; }") ) ) |>hc_title(text ="Purchase in States and parties by Individuals",align ="left",style =list(textDecoration ="underline",color ="#333333",fontWeight ="bold" ) ) |>hc_subtitle(text ="Electoral bond encashment between Apr 16, 2019 and Jan 24, 2024" ) |>hc_credits(enabled =TRUE,text ="Heteroscedasticity",href ="https://asitavsen.com",style =list(fontSize ="12px") ) |>hc_add_theme(custom_theme) |>hc_exporting(enabled =TRUE,filename ="StateIndividuals" )
Code
hchart( party_ind_state,"heatmap",hcaes(x = standardised_political_party_name, y = issue_branch_state,value = total_amount)) |>hc_colorAxis(stops =list(list(0, "#FFFFFF"), # Whitelist(0.1, "#FFE5E5"), # Very light redlist(0.2, "#FFB3B3"), # Lighter redlist(0.3, "#FF8080"), # Light redlist(0.4, "#FF4D4D"), # Medium light redlist(0.5, "#FF1A1A"), # Medium redlist(0.6, "#E60000"), # Medium dark redlist(0.7, "#CC0000"), # Dark redlist(0.8, "#B30000"), # Darker redlist(0.9, "#990000"), # Very dark redlist(1, "#800000") # Deepest red ),type ="linear",min =1,max =max(party_ind_state$total_amount),labels =list(formatter =JS(" function() { return '₹' + (this.value/1000000000).toFixed(1) + 'B'; } ") ) ) |>hc_xAxis(categories =sort(unique(party_ind_state$standardised_political_party_name)), # Alphabetical ordertitle =list(text ="Political Party"),labels =list(rotation =-45) ) |>hc_yAxis(categories =as.character(state_order), # Keeping states ordered by amounttitle =list(text ="State"),reversed =TRUE ) |>hc_tooltip(formatter =JS(" function() { return '<b>' + this.point.issue_branch_state + '</b><br>' + this.point.standardised_political_party_name + '<br>₹' + (this.point.value/1000000000).toFixed(2) + 'B'; } ") ) |>hc_title(text ="Individual Electoral Bond Purchases: State and Party Distribution",align ="left",style =list(textDecoration ="underline",color ="#333333",fontWeight ="bold" ) ) |>hc_subtitle(text ="Electoral bond encashment between Apr 16, 2019 and Jan 24, 2024" ) |>hc_credits(enabled =TRUE,text ="Heteroscedasticity",href ="https://asitavsen.com",style =list(fontSize ="12px") ) |>hc_legend(title =list(text ="Contribution Amount") ) |>hc_add_theme(custom_theme) |>hc_exporting(enabled =TRUE,filename ="StatePartyHeatmap" )
Organizations
Highest encashment by BJP. Highest purchasers also for BJP. Biggest purchase made by Megha Engineering & Infrastructure (Encashed by BJP) followed by Lakshmi Niwas Mittal (Encashed by BJP). Most purchases (value) were made in Telangana.