Skip to content

feat: add star-count metric (WatchEvents)#3

Merged
guenhter merged 3 commits into
mainfrom
feature/star-count-metric
Jul 19, 2026
Merged

feat: add star-count metric (WatchEvents)#3
guenhter merged 3 commits into
mainfrom
feature/star-count-metric

Conversation

@guenhter

Copy link
Copy Markdown
Owner

Summary

Adds a sixth language popularity metric: Star count, based on WatchEvent (GitHub's name for starring a repository).

Changes

Backend

  • produce_statistics: accumulates WatchEvent rows into star_counts per repo and writes a new language-ratings-YYYY-MM-star-count.jsonl output file (same proportional formula as the other metrics).
  • pack_statistics: adds star-count to the VALID types list so --type star-count is accepted.

Frontend

  • index.html: adds Star count option to the metric dropdown with a description entry in METRIC_DESC.
  • index.html (bonus fix): when a data file is missing (404 or any fetch error), the chart, table, legend, and month picker are now cleared instead of left showing stale data from the previously selected metric.

Documentation

  • README.md: step 4 comment, step 5 for TYPE in loop, rating files table, combined files table all updated for six metrics.
  • AGENTS.md: description and valid <type> values updated.
  • docs/GITHUB_EVENT_TYPES.md: adds WatchEvent → star-count row; updates "three" → "four" event types.

Notes

  • No changes to filter_archive: WatchEvent rows on active repos already survive the full filter chain.
  • To generate data for existing months, re-run produce_statistics for each month and then pack_statistics --type star-count.

guenhter added 3 commits July 19, 2026 07:16
- produce_statistics: add WatchEvent → star_counts accumulation and
  star-count output file (sixth metric alongside the existing five)
- pack_statistics: add star-count to the VALID types list
- index.html: add Star count option to the metric dropdown and its
  METRIC_DESC entry; clear chart/table/legend/month-picker when data
  fetch fails instead of leaving stale content
- README, AGENTS.md, docs/GITHUB_EVENT_TYPES.md: update all references
  from five to six metrics and list star-count throughout
@guenhter
guenhter merged commit f5d4007 into main Jul 19, 2026
1 check passed
@guenhter
guenhter deleted the feature/star-count-metric branch July 19, 2026 06:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant