Skip to content

Commit a462293

Browse files
added code for the Bat Graph - WIP
1 parent 6a40d94 commit a462293

1 file changed

Lines changed: 21 additions & 2 deletions

File tree

src/analysis/analysis.py

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,27 @@ def create_box_plot():
7878
plt.show()
7979

8080

81-
create_size_impact_plot()
82-
create_box_plot()
81+
def create_avg_commit_size_plot():
82+
# Read data from the repo_data csv
83+
repo_data = read_csv("repo_data")
84+
85+
# Initialize arrays to store percentages for each repo
86+
before_avg = 0
87+
during_avg = 0
88+
after_avg = 0
89+
90+
# Iterate through each repo and update the before, during and after averages
91+
for repo in repo_data:
92+
before_avg = (before_avg + float(repo['Avg Before Commit Size'])) / 2
93+
during_avg = (during_avg + float(repo['Avg During Commit Size'])) / 2
94+
after_avg = (after_avg + float(repo['Avg After Commit Size'])) / 2
95+
96+
plt.bar(["Before", "During", "After"], [before_avg, during_avg, after_avg], align='center')
97+
plt.show()
98+
99+
#create_size_impact_plot()
100+
#create_box_plot()
101+
create_avg_commit_size_plot()
83102

84103
'''
85104

0 commit comments

Comments
 (0)