{"id":14066040,"url":"https://github.com/sportsdataverse/cfb4th","last_synced_at":"2025-07-25T10:33:14.291Z","repository":{"id":41466974,"uuid":"409322973","full_name":"sportsdataverse/cfb4th","owner":"sportsdataverse","description":"A set of functions to analyze NCAA Football 4th Downs.","archived":false,"fork":false,"pushed_at":"2023-05-01T04:25:49.000Z","size":11482,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-08-13T07:11:02.656Z","etag":null,"topics":["cfb","cfb-analytics","cfbfastr","sportsdataverse"],"latest_commit_sha":null,"homepage":"http://cfb4th.sportsdataverse.org/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sportsdataverse.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-22T18:59:49.000Z","updated_at":"2024-07-30T03:23:40.000Z","dependencies_parsed_at":"2024-08-13T07:10:18.973Z","dependency_job_id":"34daf75f-5627-4164-b3d1-ef7d9265adfd","html_url":"https://github.com/sportsdataverse/cfb4th","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sportsdataverse%2Fcfb4th","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sportsdataverse%2Fcfb4th/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sportsdataverse%2Fcfb4th/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sportsdataverse%2Fcfb4th/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sportsdataverse","download_url":"https://codeload.github.com/sportsdataverse/cfb4th/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227568033,"owners_count":17787565,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cfb","cfb-analytics","cfbfastr","sportsdataverse"],"created_at":"2024-08-13T07:04:54.661Z","updated_at":"2024-12-01T13:29:34.854Z","avatar_url":"https://github.com/sportsdataverse.png","language":"R","funding_links":[],"categories":["R"],"sub_categories":[],"readme":"---\r\noutput: github_document\r\n---\r\n\r\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\r\n\r\n```{r rdmesetup, include = FALSE}\r\nknitr::opts_chunk$set(\r\n  collapse = TRUE,\r\n  comment = \"#\u003e\",\r\n  fig.path = \"man/figures/README-\",\r\n  out.width = \"100%\"\r\n) \r\n```\r\n\r\n# cfb4th \u003ca href='https://cfb4th.sportsdataverse.org'\u003e\u003cimg src='https://raw.githubusercontent.com/sportsdataverse/cfb4th/main/man/figures/logo.png' align=\"right\" width=\"25%\" min-width=\"120px\" /\u003e\u003c/a\u003e\r\n\r\n\u003c!-- badges: start --\u003e\r\n[![Version-Number](https://img.shields.io/github/r-package/v/sportsdataverse/cfb4th?label=cfb4th\u0026logo=R\u0026style=for-the-badge)](https://github.com/sportsdataverse/cfb4th/)\r\n[![R-CMD-check](https://img.shields.io/github/actions/workflow/status/sportsdataverse/cfb4th/R-CMD-check.yaml?branch=main\u0026label=R-CMD-Check\u0026logo=R\u0026logoColor=white\u0026style=for-the-badge)](https://github.com/sportsdataverse/cfb4th/actions/workflows/R-CMD-check.yaml)\r\n[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg?style=for-the-badge\u0026logo=github)](https://lifecycle.r-lib.org/articles/stages.html#experimental)[![Contributors](https://img.shields.io/github/contributors/sportsdataverse/cfb4th?style=for-the-badge)](https://github.com/sportsdataverse/cfb4th/graphs/contributors)\r\n[![Twitter Follow](https://img.shields.io/twitter/follow/aisports_4th.svg?color=blue\u0026label=%40aisports_4th\u0026logo=twitter\u0026style=for-the-badge)](https://twitter.com/aisports_4th)\r\n\r\n\u003c!-- badges: end --\u003e\r\n\r\nThis is the package that powers the [A.I. Sports College Football 4th Down Model](https://kazink.shinyapps.io/cfb_fourth_down/) discussed in [this UteZone article.](https://247sports.com/college/utah/LongFormArticle/Utah-Fourth-Downs-2020-159851937/) The model is heavily based on the work and [code](https://www.nfl4th.com/) produced by [Ben Baldwin](https://twitter.com/benbbaldwin) for his [4th Down Calculator for the NFL](https://rbsdm.com/stats/fourth_calculator/)\r\n\r\n## **Installation**\r\n\r\n\u003c!-- You can install the released version of cfb4th from [CRAN](https://CRAN.R-project.org) with: --\u003e\r\n\r\n\u003c!-- ``` r --\u003e\r\n\u003c!-- install.packages(\"cfb4th\") --\u003e\r\n\u003c!-- ``` --\u003e\r\n\r\n\u003c!-- And the development version from [GitHub](https://github.com/) with: --\u003e\r\n\r\n\u003c!-- ``` r --\u003e\r\n\u003c!-- # install.packages(\"devtools\") --\u003e\r\n\u003c!-- devtools::install_github(\"sportsdataverse/cfb4th\") --\u003e\r\n\u003c!-- ``` --\u003e\r\n\r\nYou can install the development version of cfb4th from [GitHub](https://github.com/sportsdataverse/cfb4th) with:\r\n\r\n``` r\r\n# install.packages(\"devtools\")\r\ndevtools::install_github(\"sportsdataverse/cfb4th\")\r\n```\r\n\r\n## **Features**\r\n\r\n* The **go for it** model gives probabilities for possibilities of yards gained and includes the possibility of earning a first down via defensive penalty\r\n* The **punt** model includes the possibility for getting blocked, returned for a touchdown, or fumbled on the return\r\n* The **field goal** model is a simple model of field goal % by distance and roof type\r\n\r\n## **Current limitations**\r\n\r\nThere are some edge cases that are not accounted for. These should only make a marginal difference to the recommendations as they are largely edge cases (e.g. the possibility for a field goal to be blocked and returned).\r\n\r\n* The **go for it** model does not allow for the possibility of a turnover return. However, long returns are extremely rare: For example, in 2018 and 2019 in the NFL there were only four defensive touchdowns on plays where teams went for fourth downs out of 1,236 plays, and all of these happened when the game was well in hand for the other team. Additionally, it assumes that a touchdown is worth 7 points and doesn't account for go-for-2 situations (Future Work)\r\n* The **punt** model doesn’t account for the punter or returner, ignores penalties on returns and ignores the potential for blocked punts to be returned for touchdowns\r\n* The **field goal** model doesn’t account for who the kicker is, what the weather is (only relevant for outdoor games), or the possibility of a kick being blocked and returned for a touchdown\r\n\r\n## **Get Started**\r\n\r\nTo get started with cfb4th please see [this article](https://cfb4th.sportsdataverse.org/articles/cfb4th.html). \r\n\r\n\r\n* [The logic of the shiny app](https://github.com/Kazink36/cfb_fourth_down/blob/main/app.R)\r\n\r\n* [The code that powers the bot](https://github.com/Kazink36/cfb_fourth_down/tree/main/bot)\r\n\r\n* [The bot can be found on twitter here.](https://twitter.com/aisports_4th)\r\n\r\n## **Our Authors**\r\n\r\n-   [Jared Lee](https://twitter.com/JaredDLee) \u003c/br\u003e\r\n\u003ca href=\"https://twitter.com/JaredDLee\" target=\"blank\"\u003e\u003cimg src=\"https://img.shields.io/twitter/follow/JaredDLee?color=blue\u0026label=%40JaredDLee\u0026logo=twitter\u0026style=for-the-badge\" alt=\"@JaredDLee\" /\u003e\u003c/a\u003e\r\n\u003ca href=\"https://github.com/Kazink36\" target=\"blank\"\u003e\u003cimg src=\"https://img.shields.io/github/followers/Kazink36?color=eee\u0026logo=Github\u0026style=for-the-badge\" alt=\"@Kazink36\" /\u003e\u003c/a\u003e\r\n\r\n-   [Sebastian Carl](https://twitter.com/mrcaseb)                   \r\n\u003ca href=\"https://twitter.com/mrcaseb\" target=\"blank\"\u003e\u003cimg src=\"https://img.shields.io/twitter/follow/mrcaseb?color=blue\u0026label=%40mrcaseb\u0026logo=twitter\u0026style=for-the-badge\" alt=\"@mrcaseb\" /\u003e\u003c/a\u003e\r\n\u003ca href=\"https://github.com/mrcaseb\" target=\"blank\"\u003e\u003cimg src=\"https://img.shields.io/github/followers/mrcaseb?color=eee\u0026logo=Github\u0026style=for-the-badge\" alt=\"@mrcaseb\" /\u003e\u003c/a\u003e\r\n\r\n-   [Ben Baldwin](https://twitter.com/benbbaldwin)                   \r\n\u003ca href=\"https://twitter.com/benbbaldwin\" target=\"blank\"\u003e\u003cimg src=\"https://img.shields.io/twitter/follow/benbbaldwin?color=blue\u0026label=%40benbbaldwin\u0026logo=twitter\u0026style=for-the-badge\" alt=\"@benbbaldwin\" /\u003e\u003c/a\u003e\r\n\u003ca href=\"https://github.com/guga31bb\" target=\"blank\"\u003e\u003cimg src=\"https://img.shields.io/github/followers/guga31bb?color=eee\u0026logo=Github\u0026style=for-the-badge\" alt=\"@guga31bb\" /\u003e\u003c/a\u003e\r\n\r\n\r\n## **Citations**\r\n\r\nTo cite the [**`cfb4th`**](https://cfb4th.sportsdataverse.org/) R package in publications, use:\r\n\r\nBibTex Citation\r\n```bibtex\r\n@misc{lee_et_al_2021_cfb4th,\r\n  author = {Jared Lee and Sebastian Carl and Ben Baldwin},\r\n  title = {cfb4th: The SportsDataverse's R Package for College Football 4th Down Modeling.},\r\n  url = {https://cfb4th.sportsdataverse.org/},\r\n  year = {2021}\r\n}\r\n```\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsportsdataverse%2Fcfb4th","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsportsdataverse%2Fcfb4th","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsportsdataverse%2Fcfb4th/lists"}