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

Improve sales val dbt docs #607

Merged
merged 5 commits into from
Sep 24, 2024
Merged

Improve sales val dbt docs #607

merged 5 commits into from
Sep 24, 2024

Conversation

wagnerlmichael
Copy link
Member

@wagnerlmichael wagnerlmichael commented Sep 24, 2024

The original intent of this PR was to improve the docs; specifically explaining the null case for sv_is_outlier.

However we also had not updated the docs to reflect the changes made in this PR from this issue.

Comment on lines 30 to 34
description: '{{ doc("shared_column_sv_outlier_reason1") }}'
- name: sv_outlier_reason2
description: '{{ doc("shared_column_sv_outlier_reason") }}'
description: '{{ doc("shared_column_sv_outlier_reason2") }}'
- name: sv_outlier_reason3
description: '{{ doc("shared_column_sv_outlier_reason") }}'
description: '{{ doc("shared_column_sv_outlier_reason3") }}'
Copy link
Member Author

Choose a reason for hiding this comment

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

This was actually outdated

Copy link
Contributor

Choose a reason for hiding this comment

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

[Nitpick, blocking] One small tweak here: Since the three outlier columns all share the same text for their descriptions, it actually fits our established style patterns for dbt docs to share a single description for them! So we can revert this change and just update the description for shared_column_sv_outlier_reason below.

- name: sv_outlier_reason1
  description: '{{ doc("shared_column_sv_outlier_reason") }}'
- name: sv_outlier_reason2
  description: '{{ doc("shared_column_sv_outlier_reason") }}'
- name: sv_outlier_reason2
  description: '{{ doc("shared_column_sv_outlier_reason") }}'

@@ -879,7 +879,7 @@ Parcel has an active homeowner exemption

{% docs shared_column_is_ahsap %}
Affordable Housing Special Assessment Program indicator. For more information on
AHSAP, see: https://www.cookcountyassessor.com/affordable-housing
AHSAP, see: <https://www.cookcountyassessor.com/affordable-housing>
Copy link
Member Author

Choose a reason for hiding this comment

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

Maybe a pre-commit thing is doing this. I can remove the arrows and --no-verify?

Copy link
Contributor

@jeancochrane jeancochrane Sep 24, 2024

Choose a reason for hiding this comment

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

[Praise] I think it's fine to keep the arrows!

Comment on lines +18 to +20
Rolling window period used to calculate grouping statistics
for flagging this sale. As of Sep 2024, ~1 year is the rolling window.
The month of the sale and the prior 11 months are used.
Copy link
Member Author

Choose a reason for hiding this comment

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

This might be a little more clear.

@wagnerlmichael wagnerlmichael marked this pull request as ready for review September 24, 2024 16:24
@wagnerlmichael wagnerlmichael requested a review from a team as a code owner September 24, 2024 16:24
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.

Thanks for this! My only real concern is that we collapse the sv_outlier_reason descriptions into one shared description, given that they're all the same. Once that's done and you've resolved the rest of my comments to your liking, feel free to merge.

@@ -879,7 +879,7 @@ Parcel has an active homeowner exemption

{% docs shared_column_is_ahsap %}
Affordable Housing Special Assessment Program indicator. For more information on
AHSAP, see: https://www.cookcountyassessor.com/affordable-housing
AHSAP, see: <https://www.cookcountyassessor.com/affordable-housing>
Copy link
Contributor

@jeancochrane jeancochrane Sep 24, 2024

Choose a reason for hiding this comment

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

[Praise] I think it's fine to keep the arrows!

filters on type of sale or time frame of sale, is
excluded completely from the sales-val model pipeline
and therefor does recieve a boolean value.

NOTE: Outlier flags only exist for sales _after_ 2014.
Copy link
Contributor

Choose a reason for hiding this comment

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

[Suggestion, non-blocking] Maybe we could make the connection here explicit:

Suggested change
NOTE: Outlier flags only exist for sales _after_ 2014.
NOTE: Outlier flags only exist for sales _after_ 2014.
Sales before 2014 will have a null value for this column.

Also, is the date range inclusive of 2014? If not, the above text should read "Sales including and before 2014".

A null value represents an observation that, due to
filters on type of sale or time frame of sale, is
excluded completely from the sales-val model pipeline
and therefor does recieve a boolean value.
Copy link
Contributor

Choose a reason for hiding this comment

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

[Nitpick, non-blocking] Two small typos here:

Suggested change
and therefor does recieve a boolean value.
and therefore does receive a boolean value.

Comment on lines 30 to 34
description: '{{ doc("shared_column_sv_outlier_reason1") }}'
- name: sv_outlier_reason2
description: '{{ doc("shared_column_sv_outlier_reason") }}'
description: '{{ doc("shared_column_sv_outlier_reason2") }}'
- name: sv_outlier_reason3
description: '{{ doc("shared_column_sv_outlier_reason") }}'
description: '{{ doc("shared_column_sv_outlier_reason3") }}'
Copy link
Contributor

Choose a reason for hiding this comment

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

[Nitpick, blocking] One small tweak here: Since the three outlier columns all share the same text for their descriptions, it actually fits our established style patterns for dbt docs to share a single description for them! So we can revert this change and just update the description for shared_column_sv_outlier_reason below.

- name: sv_outlier_reason1
  description: '{{ doc("shared_column_sv_outlier_reason") }}'
- name: sv_outlier_reason2
  description: '{{ doc("shared_column_sv_outlier_reason") }}'
- name: sv_outlier_reason2
  description: '{{ doc("shared_column_sv_outlier_reason") }}'

Comment on lines 1356 to 1390
## sv_outlier_reason1

{% docs shared_column_sv_outlier_reason1 %}
One of three possible reasons that a sale is
flagged as on outlier. The priority for
sv_outlier_reason$n column filling is
ptax outlier > price outlier > characteric outlier.

See the [model-sales-val](https://github.com/ccao-data/model-sales-val)
repository for a list of possible flags.
{% enddocs %}

## sv_outlier_reason2

{% docs shared_column_sv_outlier_reason2 %}
One of three possible reasons that a sale is
flagged as on outlier. The priority for
sv_outlier_reason$n column filling is
ptax outlier > price outlier > characteric outlier.

See the [model-sales-val](https://github.com/ccao-data/model-sales-val)
repository for a list of possible flags.
{% enddocs %}

## sv_outlier_reason3

{% docs shared_column_sv_outlier_reason3 %}
One of three possible reasons that a sale is
flagged as on outlier. The priority for
sv_outlier_reason$n column filling is
ptax outlier > price outlier > characteric outlier.

See the [model-sales-val](https://github.com/ccao-data/model-sales-val)
repository for a list of possible flags.
{% enddocs %}
Copy link
Contributor

Choose a reason for hiding this comment

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

[Nitpick, blocking] Per my comment above, we can collapse these into one description given that they share the exact same text:

Suggested change
## sv_outlier_reason1
{% docs shared_column_sv_outlier_reason1 %}
One of three possible reasons that a sale is
flagged as on outlier. The priority for
sv_outlier_reason$n column filling is
ptax outlier > price outlier > characteric outlier.
See the [model-sales-val](https://github.com/ccao-data/model-sales-val)
repository for a list of possible flags.
{% enddocs %}
## sv_outlier_reason2
{% docs shared_column_sv_outlier_reason2 %}
One of three possible reasons that a sale is
flagged as on outlier. The priority for
sv_outlier_reason$n column filling is
ptax outlier > price outlier > characteric outlier.
See the [model-sales-val](https://github.com/ccao-data/model-sales-val)
repository for a list of possible flags.
{% enddocs %}
## sv_outlier_reason3
{% docs shared_column_sv_outlier_reason3 %}
One of three possible reasons that a sale is
flagged as on outlier. The priority for
sv_outlier_reason$n column filling is
ptax outlier > price outlier > characteric outlier.
See the [model-sales-val](https://github.com/ccao-data/model-sales-val)
repository for a list of possible flags.
{% enddocs %}
## sv_outlier_reason
{% docs shared_column_sv_outlier_reason %}
One of three possible reasons that a sale is
flagged as on outlier. The priority for
sv_outlier_reason$n column filling is
ptax outlier > price outlier > characteristic outlier.
See the [model-sales-val](https://github.com/ccao-data/model-sales-val)
repository for a list of possible flags.
{% enddocs %}

One of three possible reasons that a sale is
flagged as on outlier. The priority for
sv_outlier_reason$n column filling is
ptax outlier > price outlier > characteric outlier.
Copy link
Contributor

Choose a reason for hiding this comment

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

[Nitpick, non-blocking] Small typo here, characteric should be characteristic. No suggestion for this change, since I include this fix in my bigger-picture suggestion below.

@wagnerlmichael wagnerlmichael merged commit 01802aa into master Sep 24, 2024
7 checks passed
@wagnerlmichael wagnerlmichael deleted the improve-sales-val-docs branch September 24, 2024 18:36
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