Skip to content

Commit

Permalink
Update statistics script
Browse files Browse the repository at this point in the history
  • Loading branch information
jvsguerra committed Jun 10, 2024
1 parent 13e3bbc commit df01bd4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/statistics.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import calendar
import datetime
import math

import matplotlib.pyplot as plt
import numpy
Expand Down Expand Up @@ -125,7 +126,7 @@ def plot_last_month(data: Usage) -> None:
ax.axhline(y=avg, color="red", linestyle="--", label="Average jobs per day")

# Customize
ymin, ymax = 0, round(count.max().values[0] / 100) * 100
ymin, ymax = 0, math.ceil(count.max().values[0] / 100) * 100
ax.grid(which="major", axis="y", linestyle="--")
ax.set_ylabel("Jobs", size=20)
ax.set_ylim(ymin, ymax + 1)
Expand Down Expand Up @@ -194,7 +195,7 @@ def plot_last_12_months(data: Usage) -> None:
ax.axhline(y=avg, color="red", linestyle="--", label="Average jobs per month")

# Customize
ymin, ymax = 0, (round(count.max().values[0] / 100) * 100) + 50
ymin, ymax = 0, math.ceil(count.max().values[0] / 250) * 250
ax.grid(which="major", axis="y", linestyle="--")
ax.set_ylabel("Jobs", size=20)
ax.set_ylim(ymin, ymax + 1)
Expand Down Expand Up @@ -255,7 +256,7 @@ def plot_per_year(data: Usage) -> None:
ax.axhline(y=avg, color="red", linestyle="--", label="Average jobs per year")

# Customize
ymin, ymax = 0, (round(count.max().values[0] / 100) * 100) + 100
ymin, ymax = 0, (math.ceil(count.max().values[0] / 1000) * 1000)
ax.grid(which="major", axis="y", linestyle="--")
ax.set_ylabel("Jobs", size=20)
ax.set_ylim(ymin, ymax + 1)
Expand Down

0 comments on commit df01bd4

Please sign in to comment.