In [42]:
# http://stackoverflow.com/questions/19410042/how-to-make-ipython-notebook-inline-matplotlib-graphics
%matplotlib inline
from stojaki import rack_locations, waw_suburbs
import seaborn as sns
In [43]:
len(waw_suburbs.Suburbs)
Out[43]:
In [40]:
df = rack_locations.as_dataframe()
df.drop('suburb_id', 1).head(10)
Out[40]:
In [37]:
df['racks_count'].sum()
Out[37]:
In [47]:
grouped_by_suburb = df['racks_count'].groupby(df['suburb_name']).agg(sum)
grouped_by_suburb.sort()
grouped_by_suburb.plot(kind='barh', figsize=(10,10), fontsize=15)
plt.xlabel('Racks', fontsize=15)
plt.ylabel('')
plt.xticks(fontsize=15)
Out[47]:
In [48]:
grouped_by_suburb
Out[48]:
In [ ]: