Repository navigation
Document handling of negative FRS amounts - #2489
Merged
Merged
Conversation
vahid-ahmadi
left a comment
Collaborator
There was a problem hiding this comment.
Looks right, fine to approve.
@juaristi22, I checked the page's claims against policyengine-uk-data at the pinned commit a43e8c5, and they are accurate. sum_from_positive_fields floors the row sum, not each field (utils/datasets.py:51). sum_positive_variables floors each component. WEEKS_IN_YEAR is 365.25 / 7 (frs.py:50). Council Tax replaces a negative or missing ctannual with the regional band mean. benamt is summed by benefit code with no floor, and ctrebamt is floored at zero. The pinned input_dataframe.py lines are the plain column-to-input loop the page describes.
- nit:
docs/book/index.md:9-12adds a "Survey data" section to the book's front page for this one page. The page already reaches the navigation through theassumptions/*.mdpattern inmyst.yml. A front-page link is fine if you want it found, but a single-link section sits a little oddly between the intro and the demo. This is your call. - nit: the changelog fragment is
added. #2482 useschangedfor a docs-only change. Either is fine. I mention it only for consistency. - nit: the page pins line ranges in two repos. The pins keep the links stable, which is good. Readers should know they describe that commit, not main. The second paragraph says this already, so no change is needed.
What I checked
- Read the full diff, the PR body, #596 and the linked openfisca-uk-data discussion.
- Fetched
datasets/frs.pyandutils/datasets.pyat a43e8c5 and read every cited line range. Readdata/input_dataframe.py:376-409at e1601db. - No law to check: this changes documentation only.
- Hosted CI: 5 checks pass and 4 are skipped, as usual for a docs-only PR. I did not build the docs locally.
- The Reproducer and axiom lines are
n/awith reasons, and the Fix evidence check passes. - No overlap with the other open PRs I checked.
🤖 Generated with Claude Code
vahid-ahmadi
approved these changes
Oct 18, 2026
vahid-ahmadi
left a comment
Collaborator
There was a problem hiding this comment.
Approving, per my review above. The nits can follow.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #596
Documents the existing treatment of negative FRS tax, benefit and transfer amounts, with a link from the book index. The page cites pinned current and historical import code, distinguishes survey fields from model inputs, and explains why the handling varies by field. It does not assign a universal meaning to
-1or change the optional imputation proposal.Validation: formatting, diff, source-link and book-navigation checks passed. The HTML build and rendered page checks passed after retrying a sandbox DNS failure with public MyST template assets and web libraries available. Notebooks were not executed. Model tests were not run for this documentation-only change.
Reproducer: n/a: documentation only; no executable code or dependency changes.
axiom: n/a: documentation and changelog only; no policy rules, parameters or data processing change.