From bdb5ccde8838d86bc2fd34ea355b32c988776e60 Mon Sep 17 00:00:00 2001 From: Esther-MacMini Date: Fri, 4 Dec 2026 19:54:08 -0500 Subject: [PATCH] Open the 32-team NFL denominator comparison in webR --- pkgdown/assets/nfl-extra-point-rates.R | 52 ++++++++++++++++++++++++++ pkgdown/index.md | 6 +++ 2 files changed, 58 insertions(+) create mode 100644 pkgdown/assets/nfl-extra-point-rates.R diff --git a/pkgdown/assets/nfl-extra-point-rates.R b/pkgdown/assets/nfl-extra-point-rates.R new file mode 100644 index 0000000..52e19ca --- /dev/null +++ b/pkgdown/assets/nfl-extra-point-rates.R @@ -0,0 +1,52 @@ +# 2025 NFL regular season. Choose a team code below, or "ALL" for the league. +team <- "LV" + +# Count one team in one game. Each team played 17 games. +# Source: nflverse play-by-play, selected and aggregated by ParlayAPI (CC BY 4.0). +# https://github.com/JacobiusMakes/parlayapiR/blob/1046fef55ff1be0a93cd2da99613c2c81724063c/tutorials/nfl-kicker-joins/team-games.csv +season <- read.csv(text = "team,games,with_attempt,with_make +ARI,17,17,17 +ATL,17,15,15 +BAL,17,16,16 +BUF,17,17,16 +CAR,17,16,15 +CHI,17,16,16 +CIN,17,14,13 +CLE,17,14,14 +DAL,17,16,16 +DEN,17,17,17 +DET,17,17,16 +GB,17,16,16 +HOU,17,15,15 +IND,17,17,17 +JAX,17,17,16 +KC,17,14,13 +LA,17,17,17 +LAC,17,15,15 +LV,17,12,12 +MIA,17,13,13 +MIN,17,14,14 +NE,17,17,17 +NO,17,15,15 +NYG,17,16,15 +NYJ,17,12,12 +PHI,17,17,16 +PIT,17,15,15 +SEA,17,16,16 +SF,17,16,16 +TB,17,16,16 +TEN,17,14,14 +WAS,17,16,16", stringsAsFactors = FALSE) + +stopifnot(length(team) == 1, team %in% c("ALL", season$team)) +selected <- if (team == "ALL") season else season[season$team == team, ] +made <- sum(selected$with_make) +denominators <- c(sum(selected$with_attempt), sum(selected$games)) +report <- data.frame( + team = team, + population = c("With a PAT attempt", "All team-games"), + with_a_make = made, + team_games = denominators, + percent = round(100 * made / denominators, 2) +) +print(report, row.names = FALSE) diff --git a/pkgdown/index.md b/pkgdown/index.md index ec19bbc..60020fd 100644 --- a/pkgdown/index.md +++ b/pkgdown/index.md @@ -8,6 +8,12 @@ At 14:00:04 an analyst had seen a price of 1.90. A 2.10 update stamped 14:00:03 [Open the replay tutorial](https://github.com/JacobiusMakes/parlayapiR/tree/main/tutorials/point-in-time). The tutorial appears in [R Weekly, issue 49 of 2026](https://rweekly.org/2026-W49.html). +## How often did an NFL team make an extra point? + +Las Vegas made at least one extra point in 12 games in 2025. Counting only games with an attempt gives 12 of 12. Counting the full schedule gives 12 of 17. [Run the editable 32-team comparison in webR](https://webr.r-wasm.org/latest/#code=eNp1VGFv2zgM%2FSuEtwLO4NhxkrbX4vrBdZM1PTcLmnS7Yh4K2ZETX23JkOT1imH%2FfZTsrCoOByiIKL9H8lGkvv5wGKmpc%2B6wohrSf5Ugw4aXTA0FUVT6d47nNETtERDseU2DZ5o9tpKK4P%2FxCo8R%2Fw7Go%2FExLOcJCLprKyJAUiI58yHecy4pEFCU1JDzLYWMVvzZAy4gdaIkSR0ocK%2F2FCpKdi31U2bAfw4RkHxOnZSl7B3EvGUKOKOdq5KZ%2FQ4l%2BTAj%2Bb47biryQrcQnpov0tfMNW9FTs8BdXynArPRoGH2MtT%2FHqZa0VwhiTD87XYogWgze4EVEQiJVgtw4xguH2DqjwbG516pRp4Hwa5U%2Bzbzc14HNyTnWdnKW%2FJEZdAYKmnKuyCreBaEo%2BlJQYvj46IIMzoiZ5N8O96Ss7OTcJKP8z%2FC0%2FF0dDLJA9UqLkpSSVP3pzJ%2FomL4DxZeBlrhsNOVy%2B8p64qsCyUo2eozV98IXGDhNNYzWO8Zc3wkStG6UZ1RY4opi%2B4WXnjaLbQ2idke40rZZdRZJ7jQup8fkGjF0d3hGyLj64WFjBdLY029cIJWMjtY05RdvfF5NVta0a9mGyvCx0sLeP3p3kpssbyyaDfR3xbtr9iKnUQWLoliy0fy2RhjXCm7XXTAiWHdvuaPGS9nlo%2FlJ8vF8uGjVYPlw43lcXW9sJJaLTYWbz2LLGnruWVsbNGbmZ3Hl2j9%2Bs3BllWiZDsZyTnJsVsk3vg8StazgR4VqXhTFowrt6Jsp%2FauboUBXFxA6HVDclSyI8jdfvy8fljfG9xAt1U%2FENhYZQGGr%2Bk9ftDjgVY4S93%2Bq%2BVCQ033wbeU1QQnHv3ItnYPft%2F%2F7kEMtqWM1yUjRgYCc%2Fe%2F0L53B95bN6a7dcKCNlwozd4SRfxC4Ac3ZdCp7bPRdsMbfJ1UiclfmAJ8Qff4OK2iDfRBdD1QaFXB67ShZkPvkjGZI19L8w5RHg0QT209XUyKjw%2FTQynwBdu64WgEHwwZgrdoGKMWXA1ernI7UR6ynn3WOz9csvPz2y8mf8ty&jz). Select **Run** to see the Raiders, then change `team` to another abbreviation or `ALL` for the league. The script contains the season totals and uses base R. + +[Open the full NFL kicker project](https://github.com/JacobiusMakes/parlayapiR/tree/main/tutorials/nfl-kicker-joins) to rebuild both counts from the game and player files, or [download the short R script](nfl-extra-point-rates.R). + ## Which book offers the better home price? Two fictional books price the same game. North shows +150 on the home side and −175 on the away side. South shows +145 and −165. North offers the higher home return, while South has the lower excess implied probability across both sides.