Most meters show one number: 46% used. That's a fact, and on its own it tells you almost nothing. 46% used on day two of seven means you'll hit the cap by Thursday. 46% on day six means you paid for a lot of capacity you won't use.
What turns the number into an answer is a second line: where you'd be if you spent evenly from reset to reset. Above the line, you're running hot. Below it, you're leaving some on the table. It works the same for a weekly AI plan allowance, a monthly API quota, a cloud budget or an ad budget.
This post builds that chart from a log your script already keeps, or easily could.
What the meter leaves out
- The vendor's usage page shows the bar and the reset time and leaves the math to you.
- A spreadsheet can do the math, and it'll go stale the first week you forget to paste in a number.
- A one-off chart from an AI assistant answers the question once. The question comes back every hour.
You want something that updates on its own and that you can open from your phone.
The idea
You need two things on every row: the share used, and the share of the period that has passed. The second one is the even-pace line, and it's pure arithmetic:
$ \text{pace} = \frac{\text{now} - \text{reset}}{\text{period length}} \times 100 $
Two more numbers fall out of the same inputs:
- Projected at reset: used divided by the share of time elapsed. 46% used with 62% of the week gone projects to about 74%.
- Needed per day to use it all: what's left divided by the days left.
The dashboard
Three visuals, each holding one JSON document.
A line with two series, used and even pace:
{
"xKey": "at",
"curve": "monotone",
"series": [
{ "key": "used", "label": "Used (%)" },
{ "key": "pace", "label": "Even pace (%)" }
],
"data": [
{ "at": "Mon 12:00", "used": 4, "pace": 7.1 },
{ "at": "Tue 12:00", "used": 15, "pace": 21.4 },
{ "at": "Wed 12:00", "used": 27, "pace": 35.7 },
{ "at": "Thu 12:00", "used": 38, "pace": 50 },
{ "at": "Fri 08:00", "used": 46, "pace": 61.9 }
]
}
A KPI for the projection, with the gap to even pace as the delta:
{
"label": "Projected at reset",
"value": 0.74,
"format": "percent",
"delta": -15.9,
"deltaFormat": "number",
"deltaLabel": "points vs even pace"
}
format: "percent" multiplies by 100, so 0.74 shows as 74%. The delta is plain points, so it uses number.
A gauge for what you'd need per day to finish at 100%:
{ "label": "Needed per day to use it all", "value": 20.6, "min": 0, "max": 100, "suffix": "%" }
Logging the meter
This is the part only you can write, because every provider exposes usage differently. Some have an API or an export. For others, the only source is the usage page itself, read by a small script or an agent. Whatever reads it, have it append one line per reading to a file:
{ "at": "2026-10-16T08:00:00+00:00", "used_pct": 46 }
One reading an hour is plenty. A week of hourly readings is 168 rows, well under a line chart's 500.
The push script
Python 3.9 or later, plus requests (pip install requests). RESET_ANCHOR is any past reset time; the script rolls it forward to the current period, so you set it once.
# push_pace.py
import json
import os
from datetime import datetime, timedelta, timezone
import requests
KEY = os.environ["OC_KEY"]
PERIOD = timedelta(days=7)
ANCHOR = datetime.fromisoformat(os.environ["RESET_ANCHOR"]) # e.g. 2026-10-12T00:00:00+00:00
LOG = "usage.jsonl"
def push(url, document):
r = requests.put(url, json=document, headers={"Authorization": f"Bearer {KEY}"}, timeout=10)
if not r.ok:
raise SystemExit(f"{r.status_code} {r.text}") # a 422 names the bad field
now = datetime.now(timezone.utc)
start = ANCHOR + PERIOD * ((now - ANCHOR) // PERIOD)
end = start + PERIOD
rows = []
with open(LOG) as f:
for line in f:
entry = json.loads(line)
at = datetime.fromisoformat(entry["at"])
if start <= at < end:
rows.append({
"at": at.strftime("%a %H:%M"),
"used": round(entry["used_pct"], 1),
"pace": round((at - start) / PERIOD * 100, 1),
})
if not rows:
raise SystemExit("No readings in this period yet")
used = rows[-1]["used"]
elapsed = (now - start) / PERIOD
days_left = (end - now) / timedelta(days=1)
projected = used / elapsed if elapsed > 0 else 0
needed = (100 - used) / days_left if days_left > 0 else 0
push(os.environ["OC_LINE_URL"], {
"xKey": "at",
"curve": "monotone",
"series": [
{"key": "used", "label": "Used (%)"},
{"key": "pace", "label": "Even pace (%)"},
],
"data": rows,
})
push(os.environ["OC_PROJECTED_URL"], {
"label": "Projected at reset",
"value": round(projected / 100, 3),
"format": "percent",
"delta": round(used - elapsed * 100, 1),
"deltaFormat": "number",
"deltaLabel": "points vs even pace",
})
push(os.environ["OC_NEEDED_URL"], {
"label": "Needed per day to use it all",
"value": round(min(max(needed, 0), 100), 1),
"min": 0,
"max": 100,
"suffix": "%",
})
API push is part of Solo ($10 a month). Create a key under Account → API keys; it starts with oc_live_. Each visual's push URL comes from Push from code → Copy push URL in the editor. Put the key and the three URLs in environment variables.
Run it a few minutes after the logger, every hour:
5 * * * * cd /home/me/pace && python3 push_pace.py >> push.log 2>&1
If you'd rather not keep a machine on, a scheduled GitHub Actions workflow can run the same script, as long as it can reach the log. Schedule dashboard updates with cron or GitHub Actions covers both.
Things to know
- Each push replaces the whole document. The script rebuilds the period's rows from the log every time, so a missed hour fixes itself on the next run.
- The chart stops at now. Every row needs a number for every series, so you can't draw the pace line out to the reset without inventing future usage. The projection KPI covers the future instead.
- Labels are whatever you send. The script formats times in UTC. Convert to your own zone before formatting if you'd rather read local time.
- The gauge is capped at 100. Late in a period, "needed per day" can go past 100% of the allowance, which mostly means "you won't use it all". The cap keeps the dial readable.
Honest limits
- The dashboard computes nothing. Pace, projection and the daily number all come from the script, which is where you'd fix them if they look wrong.
- Reading the meter is on you. There's no built-in connector to any usage page or billing API.
- There's no dashed-line style. The even-pace line is simply a second series in its own color.
- A periodic reading misses spikes between readings. For a weekly quota, hourly is fine. For a quota that resets every few hours, read more often.
Try it
Create a free dashboard and paste the line document above to see whether two lines make the answer obvious. Paste new numbers by hand for a week, then switch to Solo and let the script do it hourly.