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', ax=ax1, autopct='%1.1f%%',
startangle=180, shadow=True, labels=df['Religion'], legend = True, fontsize=14)
Out[19]:
Comments
Post a Comment