Skip to main content

Posts

Showing posts from May, 2018

Karnataka Election Stats

Karnataka Election Stats... Untitled3 Today is verdict's day for Karnatka Assembly election.There are number of factors that actually lead to the election results. I am putting graphs and bar charts on some of the factors. Here I am tryimng to demonstrate how different stats can be put in visulaization and can make digesting figures easy. In [ ]: First here is the demographic divide of Karnakta . Demographics of a region especially religion plays a vital role in political elections . In [20]: import pandas as pd import matplotlib.pyplot as plt % matplotlib inline df = pd . read_csv ( 'KarnatakaDemographics.csv' ) df newdf = df [ df . columns [ 0 : 2 ]] In [19]: plt . figure ( figsize = ( 16 , 8 )) # plot chart ax1 = plt . subplot ( 121 , aspect = 'equal' ) newdf . plot ( kind = 'pie' , y = 'Percent' ,