Read these carefully
In [1]:
# Run the following to import necessary packages and import dataset. Do not use any additional plotting libraries.
import pandas as pd
from modules.util_politicians import evaluate, toggle_display
dataset = "dataset/politicians.csv"
df = pd.read_csv(dataset)
df.head()
Out[1]:
In [5]:
d_politicians, d_economy, d_outliers = toggle_display('Democrats')
Toggle the variables above and run the evaluate()
function until you find a publishable result!
In [10]:
# Part 1 Democrats
d_pval, d_corr = evaluate(df, 'Democrats', d_politicians, d_economy, d_outliers, 1)
In [ ]:
r_politicians, r_economy, r_outliers = toggle_display('republican')
Toggle the variables above and run evaluate
until you find a publishable result!
In [ ]:
# Part 1 Republicans
r_pval, r_corr = evaluate(df, 'Republicans', r_politicians, r_economy, r_outliers, 1)
If you found that both parties impact the economy positively or negatively, try again below to show that one party is better than the other on the economy. If you already found one party is better than the other, try again below to find the opposite relationship.
In [ ]:
d_politicians_clue, d_economy_clue, d_outliers_clue = toggle_display('Democrats')
In [ ]:
# Part 2 Democrats
d_pval_clue, d_corr_clue = evaluate(df, 'Democrats', d_politicians_clue, d_economy_clue, d_outliers_clue, 2)
In [ ]:
r_politicians_clue, r_economy_clue, r_outliers_clue = toggle_display('republican')
In [ ]:
# Part 2 Republicans
r_pval_clue, r_corr_clue = evaluate(df, 'Republicans', r_politicians_clue, r_economy_clue, r_outliers_clue, 2)
In [ ]: