Play-by-Play Code Count
Count selected play-by-play codes and identify absent tracked codes.
Description
A play-by-play code count tracks occurrences of chosen normalized event labels.
A play-by-play code count tracks occurrences of chosen normalized event labels. Each tracked entry receives its own count.1
Count selected play-by-play codes and identify absent tracked codes.
When to use Play-by-Play Code Count
Use this tool to count selected play-by-play codes and identify absent tracked codes.
Prepare the text, recorded observations, aligned figures or editorial criteria requested. Confirm what each label, count, timestamp or supplied flag represents before interpreting the result.
How to use Play-by-Play Code Count and understand its results
- Prepare the text, recorded observations, aligned figures or editorial criteria requested. Confirm what each label, count, timestamp or supplied flag represents before interpreting the result.
- Enter playCodes, trackedCodes using the field table and calculation rules, then run the tool.
- Read trackedPlayCount, missingTrackedCodes, countsByTrackedCode. The explanation below defines the units, signs, ordering and any flags or placeholder values.
- If the tool reports an input issue, correct the values and run it again. Apply the stated assumptions when interpreting a successfully returned result.
| Input field | Meaning | Value type; see rules below | Requirement |
|---|---|---|---|
| playCodes | Play-by-play codes | list of string | Required |
| trackedCodes | Codes to track | list of string | Required |
Trim and lowercase event and tracked-code lists. Remove blank tracked codes but keep duplicate tracked entries; blanks in events remain. Return counts aligned with the filtered tracked list, missing labels and total tracked occurrences.
count_i=occurrences of normalized trackedCode_i Units, indexing, boundary conditions and exceptional cases are defined in the calculation rules above.
| Output field | Meaning | Value type |
|---|---|---|
| trackedPlayCount | Tracked play count | integer; minimum: 0 |
| missingTrackedCodes | Tracked codes not observed | list of string |
| countsByTrackedCode | Counts in tracked-code order | list of number |
{
"input": {
"playCodes": [
"TD",
"FG",
"TD",
"PUNT"
],
"trackedCodes": [
"TD",
"FG",
"INT"
]
},
"output": {
"trackedPlayCount": 3,
"missingTrackedCodes": [
"int"
],
"countsByTrackedCode": [
2,
1,
0
]
}
} Limitations and assumptions
Duplicate tracked labels can double-count the reported total. No event feed is parsed, validated or classified.
Numeric inputs must be finite. Follow the calculation-specific rules for overflow, underflow and exceptional cases. Lists are limited to 100,000 entries; the rules above may require smaller limits. Missing required fields, extra fields, wrong value types and violations of the calculation rules are input errors.
Alternative or Complementary methods
Use Box Score Reconciliation: Reconcile period-level scoring with a published team total. For a complementary task, use Churn Reason Summary: Normalize and count supplied churn-reason labels.
References
-
Play-by-Play Code Count — tool.io
Similar or alternative tools
- Box Score Reconciliation
Reconcile period-level scoring with a published team total.
- Churn Reason Summary
Normalize and count supplied churn-reason labels.