Skip to content

Commit

Permalink
change word count to absolute, not /1000
Browse files Browse the repository at this point in the history
  • Loading branch information
HM Rando committed Sep 2, 2021
1 parent 199b8ca commit 37c9270
Show file tree
Hide file tree
Showing 5 changed files with 722 additions and 720 deletions.
6 changes: 3 additions & 3 deletions analyze-ms-stats/calc-manuscript-stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def analyze_commit(commit):
references = json.loads(subprocess.getoutput(referencesCommand))
num_ref = len(references)

return([date, clean_date, num_authors, word_count/1000, num_ref])
return([date, clean_date, num_authors, word_count, num_ref])

def main(args):
'''Extract statistics from the output branch log'''
Expand All @@ -36,7 +36,7 @@ def main(args):
pool.close()
pool.join()

# Convert dictionary to dataframe
# Convert dictionary to dataframe & flip index to be chronological
growthdata = pd.DataFrame.from_dict(commitData, orient="index",
columns=["Date", "clean_date", "Authors", "Word Count", "References"])
manuscript_stats = growthdata.iloc[0].to_dict()
Expand All @@ -48,9 +48,9 @@ def main(args):
# Plot the data
axes = growthdata.plot(kind='line', linewidth=2, subplots=True)
for ax in axes:
ax.set_ylabel('Count')
ax.get_yaxis().set_major_formatter(matplotlib.ticker.FuncFormatter(
lambda x, p: format(int(x), ',')))
ax.set_ylabel('Count')
ax.set_ylim(bottom=0)
ax.spines['top'].set_visible(False)
ax.spines['right'].set_visible(False)
Expand Down
2 changes: 1 addition & 1 deletion analyze-ms-stats/calc-manuscript-stats.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ python analyze-ms-stats/calc-manuscript-stats.py $COMMIT_LIST $OUTPUT_JSON $OUTP

# Clean up temporary files
echo "Clean up temporary files"
rm ./references_tmp.json ./variables_tmp.json analyze-ms-stats/output-commits.txt
rm analyze-ms-stats/output-commits.txt
2 changes: 1 addition & 1 deletion analyze-ms-stats/manuscript_stats.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"Authors": "52",
"Date": "2021-08-27",
"References": "1585",
"Word Count": "134.698",
"Word Count": "134698",
"clean_date": "August 27, 2021"
}
Binary file modified content/images/manuscript_stats.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 37c9270

Please sign in to comment.