text_html_output_1.png
from matplotlib import rcParams

import brewer2mpl

import matplotlib.pyplot as plt

import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

train = pd.read_csv('../input/act_train.csv', parse_dates=['date'])
test = pd.read_csv('../input/act_test.csv', parse_dates=['date'])
ppl = pd.read_csv('../input/people.csv', parse_dates=['date'])
df_train = pd.merge(train, ppl, on='people_id')
df_test = pd.merge(test, ppl, on='people_id')
del train, test, ppl

plus = sum(df_train.loc[:, 'outcome'] == 0)
minus = sum(df_train.loc[:, 'outcome'] == 1)

set2 = brewer2mpl.get_map('Set2', 'qualitative', 8).mpl_colors
font = {'family': 'sans-serif', 'color': 'teal', 'weight': 'bold', 'size': 18}
plt.rc('font', family='serif')
plt.rc('font', size=16)
plt.rc('font', weight='bold')
plt.style.use('seaborn-dark-palette')
fig_size = plt.rcParams['figure.figsize']
fig_size[0] = 6
fig_size[1] = 6
plt.rcParams['figure.figsize'] = fig_size

from matplotlib import rcParams
rcParams['font.size'] = 12
rcParams['text.color'] = 'black'
piechart = plt.pie((minus, plus), labels=('plus', 'minus'), shadow=False, colors=('teal', 'crimson'), explode=(0.08, 0.08), startangle=90, autopct='%1.1f%%')
plt.axis('equal')
plt.title('Animal Shelter Outcome Train Data', y=1.08, fontdict=font)
plt.tight_layout()
plt.savefig('TWP-Status-Groups-train.png', bbox_inches='tight')