-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathreporting.py
More file actions
executable file
·48 lines (36 loc) · 1.08 KB
/
reporting.py
File metadata and controls
executable file
·48 lines (36 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import pandas as pd
import matplotlib.pyplot as plt
import csv
import datetime
# Get dates
today = datetime.date.today()
yesterday = today - datetime.timedelta(days = 1)
today = today.strftime('%d/%m/%Y')
yesterday = yesterday.strftime('%d/%m/%Y')
results = pd.read_csv('yesterdays_results.csv')
bets = pd.read_csv('todays_bets.csv')
# Load file
data = pd.read_csv('bet_tracking.csv')
# Drop yesterday and todays rows as we will be putting them in next
data.drop(today, axis=0, inplace=True)
data.drop(yesterday, axis=0, inplace=True)
# Write in yesterdays results
for row in results:
# Input bets and bet amounts
with open('bet_tracking.csv') as f:
writer = csv.writer(f)
writer.writerow(row)
# Input todays bets
for row in bets:
with open('bet_tracking.csv') as f:
writer = csv.writer(f)
writer.writerow(row)
# Line graph of week, month, quarter, half, full season
def make_graph(date_period, data):
# Data
# X axis
# y axis
# Title
# colors?
# Compare full season with past season/ averages of past seasons
# Save to PDF file