In [9]:
import pandas as pd
import matplotlib
import numpy
%matplotlib inline
In [10]:
df = pd.read_excel("2013_NYC_CD_MedianIncome_Recycle.xlsx")
In [11]:
df.head()
Out[11]:
In [12]:
df.corr()
Out[12]:
In [13]:
df.plot(kind='scatter', x='MdHHIncE', y='RecycleRate')
Out[13]:
The visualisation of the data shows a clear positive correlation between the household income and the recycling rate, which is confirmed by r = 0.884783.