In [30]:
import pandas as pd
import numpy as np
%pylab inline
figsize(5, 5)
In [31]:
x = np.random.normal(0, 10, 10000)
y = np.random.normal(0, 10, 10000)
In [32]:
df = pd.DataFrame( { 'x' : x, 'y' : y } )
In [33]:
df['y'].hist(bins=30)
Out[33]:
In [34]:
df.head(10)
Out[34]:
In [35]:
df.plot(x='x', y='y', style='o', alpha=.02)
Out[35]:
In [36]:
plt.hexbin(df['x'], df['y'], bins='log', gridsize=50, cmap=plt.cm.hot)
Out[36]:
In [37]:
df = pd.read_csv('taxirides.csv')
In [38]:
df.head(5)
Out[38]:
In [40]:
figsize(15, 15)
In [42]:
df.plot(x='PICKUP_LONG', y='PICKUP_LAT', style='o', alpha=.02)
Out[42]:
In [41]:
plt.hexbin(df['PICKUP_LONG'], df['PICKUP_LAT'], bins='log', gridsize=400, cmap=plt.cm.hot)
Out[41]:
In [ ]: