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

Add standard deviation requirement for ptax outliters #22

Merged
merged 8 commits into from
Sep 26, 2023

Conversation

wagnerlmichael
Copy link
Member

@wagnerlmichael wagnerlmichael commented Sep 25, 2023

All scripts tested. Added parameter input for which standard deviations to use with ptax outlier. Original ptax flag preserved.

Closes #15

@wagnerlmichael wagnerlmichael changed the title 15 ptax flag sd update 15 Add standard deviation requirement for ptax outliters Sep 26, 2023
@wagnerlmichael wagnerlmichael changed the title 15 Add standard deviation requirement for ptax outliters Add standard deviation requirement for ptax outliters Sep 26, 2023
Comment on lines 100 to 103
group_string = "_".join(groups)
df["ptax_flag_original"] = df["sale_filter_ptax_flag"]

df["sale_filter_ptax_flag"] = df.apply(
Copy link
Member

Choose a reason for hiding this comment

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

suggestion (non-blocking): Rather than overwriting the original column, I would just change the SQL ingest query to return sale_filter_ptax_flag AS ptax_flag_original, then create a new column named ptax_flag_w_deviation (or similar).

Copy link
Member Author

Choose a reason for hiding this comment

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

Good call, should now be implemented.

Comment on lines +103 to +108

df["ptax_flag_w_deviation"] = df["ptax_flag_original"] & (
(df[f"sv_price_deviation_{group_string}"] >= ptax_sd[1])
| (df[f"sv_price_deviation_{group_string}"] <= -ptax_sd[0])
| (df[f"sv_price_per_sqft_deviation_{group_string}"] >= ptax_sd[1])
| (df[f"sv_price_per_sqft_deviation_{group_string}"] <= -ptax_sd[0])
Copy link
Member

Choose a reason for hiding this comment

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

praise: Nice fixup!

@wagnerlmichael wagnerlmichael merged commit 06c3b8b into main Sep 26, 2023
@wagnerlmichael wagnerlmichael deleted the 15-ptax-flag-sd-update branch September 26, 2023 21:59
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.

PTAX Flag update
2 participants