-
Notifications
You must be signed in to change notification settings - Fork 4
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
Conversation
dbt/models/sale/schema.yml
Outdated
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") }}' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was actually outdated
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
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!
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. |
There was a problem hiding this comment.
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.
There was a problem hiding this 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> |
There was a problem hiding this comment.
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!
dbt/models/shared_columns.md
Outdated
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. |
There was a problem hiding this comment.
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:
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".
dbt/models/shared_columns.md
Outdated
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. |
There was a problem hiding this comment.
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:
and therefor does recieve a boolean value. | |
and therefore does receive a boolean value. |
dbt/models/sale/schema.yml
Outdated
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") }}' |
There was a problem hiding this comment.
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") }}'
dbt/models/shared_columns.md
Outdated
## 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 %} |
There was a problem hiding this comment.
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:
## 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 %} |
dbt/models/shared_columns.md
Outdated
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. |
There was a problem hiding this comment.
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.
The original intent of this PR was to improve the docs; specifically explaining the
null
case forsv_is_outlier
.However we also had not updated the docs to reflect the changes made in this PR from this issue.