import matplotlib.pyplot as plt
import seaborn as sns
lis = []
one = ('cases', 'Poverty')
lis.append(one)
two = ('deaths', 'Poverty')
lis.append(two)
three = ('cases', 'IncomePerCap')
lis.append(three)
four = ('deaths', 'IncomePerCap')
lis.append(four)
five = ('Dec_Cases', 'Poverty')
lis.append(five)
six = ('Dec_Cases', 'Poverty')
lis.append(six)
seven = ('Dec_Cases', 'IncomePerCap')
lis.append(seven)
eight = ('Dec_Cases', 'IncomePerCap')
lis.append(eight)

oregondf = df.loc[df.index.get_level_values('state') == 'Oregon']

# For Oregon Data
oregon = []
for row in lis:
    graph = (oregondf[row[0]].corr(df[row[1]]), row[0], row[1])
    oregon.append(graph)

for i in oregon:
    R = i[0]
    print("R values", R)
    if (R > 0.5 or R < -0.5):
        plt.figure()
        sns.scatterplot(data=oregondf, x=i[1], y=i[2])

# USA
all=[]
for row in lis:
    R=(df[row[0]].corr(df[row[1]]),row[0],row[1])
    all.append(R)

for i in all:
    R=i[0]
    print("R values", R)
    if(R>0.5 or R<-0.5):
        plt.figure()
        sns.scatterplot(data=df,x=i[1],y=i[2]) #for others
ec015b8dd5d1dc234cf6ba6e1fef6135feb7a04c
<mask token>

<mask token>
lis.append(one)
<mask token>
lis.append(two)
<mask token>
lis.append(three)
<mask token>
lis.append(four)
<mask token>
lis.append(five)
<mask token>
lis.append(six)
<mask token>
lis.append(seven)
<mask token>
lis.append(eight)
<mask token>
for row in lis:
    graph = oregondf[row[0]].corr(df[row[1]]), row[0], row[1]
    oregon.append(graph)
for i in oregon:
    R = i[0]
    print('R values', R)
    if R > 0.5 or R < -0.5:
        plt.figure()
        sns.scatterplot(data=oregondf, x=i[1], y=i[2])
<mask token>
for row in lis:
    R = df[row[0]].corr(df[row[1]]), row[0], row[1]
    all.append(R)
for i in all:
    R = i[0]
    print('R values', R)
    if R > 0.5 or R < -0.5:
        plt.figure()
        sns.scatterplot(data=df, x=i[1], y=i[2])

<mask token>
lis = []
one = 'cases', 'Poverty'
lis.append(one)
two = 'deaths', 'Poverty'
lis.append(two)
three = 'cases', 'IncomePerCap'
lis.append(three)
four = 'deaths', 'IncomePerCap'
lis.append(four)
five = 'Dec_Cases', 'Poverty'
lis.append(five)
six = 'Dec_Cases', 'Poverty'
lis.append(six)
seven = 'Dec_Cases', 'IncomePerCap'
lis.append(seven)
eight = 'Dec_Cases', 'IncomePerCap'
lis.append(eight)
oregondf = df.loc[df.index.get_level_values('state') == 'Oregon']
oregon = []
for row in lis:
    graph = oregondf[row[0]].corr(df[row[1]]), row[0], row[1]
    oregon.append(graph)
for i in oregon:
    R = i[0]
    print('R values', R)
    if R > 0.5 or R < -0.5:
        plt.figure()
        sns.scatterplot(data=oregondf, x=i[1], y=i[2])
all = []
for row in lis:
    R = df[row[0]].corr(df[row[1]]), row[0], row[1]
    all.append(R)
for i in all:
    R = i[0]
    print('R values', R)
    if R > 0.5 or R < -0.5:
        plt.figure()
        sns.scatterplot(data=df, x=i[1], y=i[2])

import matplotlib.pyplot as plt
import seaborn as sns
lis = []
one = 'cases', 'Poverty'
lis.append(one)
two = 'deaths', 'Poverty'
lis.append(two)
three = 'cases', 'IncomePerCap'
lis.append(three)
four = 'deaths', 'IncomePerCap'
lis.append(four)
five = 'Dec_Cases', 'Poverty'
lis.append(five)
six = 'Dec_Cases', 'Poverty'
lis.append(six)
seven = 'Dec_Cases', 'IncomePerCap'
lis.append(seven)
eight = 'Dec_Cases', 'IncomePerCap'
lis.append(eight)
oregondf = df.loc[df.index.get_level_values('state') == 'Oregon']
oregon = []
for row in lis:
    graph = oregondf[row[0]].corr(df[row[1]]), row[0], row[1]
    oregon.append(graph)
for i in oregon:
    R = i[0]
    print('R values', R)
    if R > 0.5 or R < -0.5:
        plt.figure()
        sns.scatterplot(data=oregondf, x=i[1], y=i[2])
all = []
for row in lis:
    R = df[row[0]].corr(df[row[1]]), row[0], row[1]
    all.append(R)
for i in all:
    R = i[0]
    print('R values', R)
    if R > 0.5 or R < -0.5:
        plt.figure()
        sns.scatterplot(data=df, x=i[1], y=i[2])

import matplotlib.pyplot as plt
import seaborn as sns
lis = []
one = ('cases', 'Poverty')
lis.append(one)
two = ('deaths', 'Poverty')
lis.append(two)
three = ('cases', 'IncomePerCap')
lis.append(three)
four = ('deaths', 'IncomePerCap')
lis.append(four)
five = ('Dec_Cases', 'Poverty')
lis.append(five)
six = ('Dec_Cases', 'Poverty')
lis.append(six)
seven = ('Dec_Cases', 'IncomePerCap')
lis.append(seven)
eight = ('Dec_Cases', 'IncomePerCap')
lis.append(eight)

oregondf = df.loc[df.index.get_level_values('state') == 'Oregon']

# For Oregon Data
oregon = []
for row in lis:
    graph = (oregondf[row[0]].corr(df[row[1]]), row[0], row[1])
    oregon.append(graph)

for i in oregon:
    R = i[0]
    print("R values", R)
    if (R > 0.5 or R < -0.5):
        plt.figure()
        sns.scatterplot(data=oregondf, x=i[1], y=i[2])

# USA
all=[]
for row in lis:
    R=(df[row[0]].corr(df[row[1]]),row[0],row[1])
    all.append(R)

for i in all:
    R=i[0]
    print("R values", R)
    if(R>0.5 or R<-0.5):
        plt.figure()
        sns.scatterplot(data=df,x=i[1],y=i[2]) #for others