stats: show downloads chart per-week instead of per-day#58
Merged
Conversation
The bottom subplot of downloads.png reads better as a weekly rate. Since the ActivityWatch/stats analyze_stats.py smoothing fix, --per-day and --per-week both render a 7d-rolling-smoothed line; --per-week restores the weekly magnitude the chart showed before the recent stats refactor.
Greptile SummaryThis PR changes how the downloads stats chart is generated.
Confidence Score: 4/5The changed stats build path is mergeable after tightening the external CLI dependency.
Makefile Important Files Changed
Reviews (1): Last reviewed commit: "stats: show downloads chart per-week ins..." | Re-trigger Greptile |
| mkdir -p img/stats | ||
| mkdir -p stats/out | ||
| cd stats && poetry run python analyze_stats.py --since 2017-07-01 --column downloads --per-day --save ../img/stats/downloads.png | ||
| cd stats && poetry run python analyze_stats.py --since 2017-07-01 --column downloads --per-week --save ../img/stats/downloads.png |
There was a problem hiding this comment.
This command now depends on --per-week being supported by the freshly cloned ActivityWatch/stats checkout, but the stats target clones the external repo at its current default branch without a pinned revision. A build that lands on a checkout without this flag exits from analyze_stats.py argument parsing and stops the site build instead of generating img/stats/downloads.png.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The downloads chart (
img/stats/downloads.png) bottom subplot reads better as a weekly rate (~9k/week) than a daily one (~1.3k/day), matching what it showed before the recent ActivityWatch/stats refactor.Both
--per-dayand--per-weeknow render a 7d-rolling-smoothed line (after the stats-repo smoothing fix), so this is purely a display/magnitude choice. One-line Makefile change.