Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove -Inf from sales.mydec #697

Merged
merged 2 commits into from
Jan 6, 2025

Conversation

wrridgeway
Copy link
Member

@wrridgeway wrridgeway commented Jan 6, 2025

We have ~150 -Inf values for the senior homestead exemption that are introduced by taking the max exemption values within sales in the mydec data when there are only NULLs:

image

This didn't use to be an issue, but apparently the mydec data has some rows with NULL for exemption values now.

This PR makes sure any -Inf values are re-coded back to NULL for all exemption columns.

@wrridgeway wrridgeway marked this pull request as ready for review January 6, 2025 17:07
@wrridgeway wrridgeway requested a review from a team as a code owner January 6, 2025 17:07
Copy link
Contributor

@jeancochrane jeancochrane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very tricky bug, thanks! For context, the R docs explain why the maximum of an empty set is -Inf:

The minimum and maximum of a numeric empty set are +Inf and -Inf (in this order!) which ensures transitivity, e.g., min(x1, min(x2)) == min(x1, x2).

Co-authored-by: Jean Cochrane <jeancochrane@users.noreply.github.com>
@wrridgeway wrridgeway merged commit 9becd94 into master Jan 6, 2025
7 checks passed
@wrridgeway wrridgeway deleted the remove-infinity-from-mydec-exemption-values branch January 6, 2025 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants