Fix appeals vignette EAV aggregation method #50
+17
−2
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.
While reviewing possible reasons for Appeals vignette agency totals issue #46 , an error was identified in the way the appeals vignette adds pre-appeal EAV back into the base for taxing districts. Currently the code aggregates the EAV difference between stages at the tax code level, while it should aggregate up to the agency. This results in agencies that cover multiple tax codes to have their agency rates vary across tax codes, while agencies should have a uniform tax rate regardless of the tax code.
This PR adjusts the code to ensure the EAV difference within each tax code is summed across all tax codes of an agency. This fix does help in aligning the summed amount taxed by agencies between stages, which was the issue identified in issue #46 (this flagged that taxes collected by Cook County in 2021 would be 16% higher in the mailed stage than the board stage, when they both should theoretically remain close to that agency's extension). With this adjustment, the entirety of taxes paid Cook County for the mailed and board stages vary by 3.8% rather than 16%.