---
title: Null impossible and unfilled QBR in the DVOA player passing table
type: task
status: completed
description: >-
  total_quarterback_rating held a corrupt 2018 source value and an unfilled all-zero 2023 column
  from FTN workbooks; the skill-positions importer now nulls QBR outside 0-100 or zero for every
  row, and production rows were repaired.
base_uri: user:task/league/repair-dvoa-player-qbr-scale.md
created_at: '2026-10-27T03:01:35.675Z'
entity_id: c9ad3a92-d63a-485b-b67b-13776e5a3f42
finished_at: '2026-10-27T03:13:40.079Z'
observations:
  - ████████████████████████████████████████████████
owner_identity_uri: █████████████████████████
priority: Medium
public_read: true
relations:
  - relates [[user:task/league/add-dvoa-magnitude-range-check.md]]
tags:
  - user:tag/league-xo-football.md
updated_at: '2026-10-27T03:13:40.079Z'
visibility_analyzed_at: '2026-11-05T23:50:05.065Z'
---

# Repair total_quarterback_rating in the DVOA player passing table

## Overview

- **Defect.** `nfl_dvoa_player_passing_seasonlogs.total_quarterback_rating` (ESPN QBR, 0-100) held 2447764 for 2018 L.Thomas and 0 for all 109 2023 REG rows.
- **Cause.** The stored values matched FTN's 2016-2023 skill-positions workbooks cell for cell. The 2018 cell is corrupt at source, and the 2023 workbook's QBR column is unfilled zeros. Parsing introduced nothing.
- **Not a scale mix.** Every value below 1 belongs to a passer with 1-11 attempts and deeply negative DVOA, so it is a real near-zero QBR.

## Background

- The only writer is the skill-positions UPDATE in `scripts/import-dvoa-player-stats.mjs` (`apply_skill_position_additions`). It is operator-run, with no cron, and does not go through `upsert_dvoa_rows` or the DVOA scale grade.
- A `--dry` run always reports `matched: 0`, because the dry-run skip comes before the match count.

## Design

- `SKILL_POSITION_RANGES` gives QBR a 0-100 range. `format_skill_position_additions` nulls an out-of-range value, or every value when the column is zero for every row. Each cleared value is listed in `cleared`, which the run summary prints.
- The stored rows were repaired with targeted UPDATEs to null, which matches what a re-run of the fixed importer would write.

## Plan

- [x] Null out-of-range and unfilled QBR in `format_skill_position_additions`, with specs. League commit ee90e6508. Verify: the dry runs on the 2018 and 2023 workbooks list exactly L.Thomas and 109 unfilled rows, and 2021 clears nothing.
- [x] Repair production: 2018 L.Thomas and the 2023 REG rows set to null. Verify: no REG value above 100, and 2023 has 0 non-null values.
- [x] Document the column in the DVOA query-trap sheet.
