Skip to content

Commit

Permalink
style: removed some lines
Browse files Browse the repository at this point in the history
  • Loading branch information
taglitis committed Oct 26, 2018
1 parent 9c4d94b commit 2755ed9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
9 changes: 4 additions & 5 deletions function_soccer.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def db_work():
"""
path = "./input/"
database = path + "database_soccer.sqlite"
database = "database_soccer.sqlite"
conn = sqlite3.connect(database)

# extract list of countries
Expand Down Expand Up @@ -70,7 +70,7 @@ def db_team_attributes():
"""

path = "./input/"
database = path + "database_soccer.sqlite"
database = "database_soccer.sqlite"
conn = sqlite3.connect(database)


Expand Down Expand Up @@ -137,10 +137,9 @@ def team_attributes_compare(goals_home_vs_away):
#merge goals and attributes
team_attributes_goals_ave= home_away_goals_ave.merge(team_attributes_ave, left_on='id', right_on='id', how='inner')
#plot it
fig, ax1 = plt.subplots()
pd.plotting.scatter_matrix(team_attributes_goals_ave.drop(columns = 'id'))
plt.savefig('./plots/mattix.png', dpi=600)
fig.clf()
plt.clf()
#plot 3 scatter plot from matrix
plt.subplot(3,1,1)
plt.scatter(team_attributes_goals_ave['pl_passing'], team_attributes_goals_ave['total_goals'])
Expand Down Expand Up @@ -278,7 +277,7 @@ def improved_teams(goals_home_vs_away):

def ave_goals_home_vs_away(countries, goals_home_vs_away):
"""
comparison of goals when teap plays at home vs aways
comparison of goals when team plays at home vs aways
INPUT:
countries, goals_home_vs_away
Expand Down
1 change: 0 additions & 1 deletion main_soccer.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@


def main():
path_goals_home_vs_away = './datasets/goals_home_vs_away.csv'
countries, goals_home_vs_away = fc.db_work() #obtain data sets from DB
#find averages for when teams play home and aways
# print(goals_home_vs_away)
Expand Down

0 comments on commit 2755ed9

Please sign in to comment.