npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@jackemcpherson/tipper

v3.1.1

Published

AFL match prediction CLI combining MOV-Elo with player-level PAV ratings

Downloads

612

Readme

tipper

CI npm

AFL match prediction CLI combining MOV-Elo ratings with player-level PAV (Player Approximate Value). Runs as a Cloudflare Worker backed by a D1 database.

Setup

npm install -g @jackemcpherson/tipper

# Auth: uses wrangler's OAuth token automatically
wrangler login

If wrangler login isn't available, set CLOUDFLARE_API_TOKEN instead.

Usage

# Backtest the current model across historical seasons
tipper backtest

# Backtest a specific config
tipper backtest --config pavfix-blend-w06

# Predict upcoming matches
tipper predict --season 2026 --round-number 8

# Bootstrap-compare two configs
tipper compare --config-a pavfix-blend-w06 --config-b elo-only-tuned-v1b

# Manage configs
tipper config list
tipper config show pavfix-blend-w06
tipper config current
tipper config promote pavfix-blend-w06 --reason "v2: corrected PAV blend"
tipper config create new-config --from pavfix-blend-w06
tipper config diff config-a config-b

Development

bun run build        # Compile TypeScript
bun run typecheck    # Type-check without emitting
bun run test         # Run tests (vitest)
bun run check        # Lint + format (biome)
bun run format       # Auto-format

Architecture

Two parallel state machines joined by a read-only predictor:

  • Elo — MOV-Elo rating system (FiveThirtyEight-style margin-of-victory multiplier). Tracks team strength over time.
  • PAV — Round-by-round player approximate value using the HPN formula with a fixed pool of 100 points per team per zone per season. Captures player-level quality that Elo misses.
  • Blend — Weighted combination: rating = 0.6 * elo + 0.4 * (slope * pav). The calibration slope (6.986) converts PAV into Elo-equivalent units.

The engine is pure functions with no I/O. All data access goes through the Cloudflare Worker, which reads from D1 and passes pre-fetched data to the engine.

Current model (v2)

Model:  pavfix-blend-w06
Type:   MOV-Elo + PAV (corrected defence formula)

Parameters:
  K-factor:            25
  Home advantage:      160 Elo points (11.2 scoreboard points)
  Regression to mean:  0.10
  MOV multiplier:      538_log
  Sigma:               36
  Blend weight (Elo):  0.6
  PAV cal. slope:      6.986

Performance (2021-2025, 1062 matches):
  Tip%:      66.1%
  LogLoss:   0.8607
  Brier:     0.2060

Out-of-sample (2026, 63 matches):
  Tip%:      77.8%
  LogLoss:   0.8029

See docs/ for the full tuning reports (Tasks 1-18).