diff --git a/dbt/models/default/docs.md b/dbt/models/default/docs.md index 4cd61e9b8..108e837cf 100644 --- a/dbt/models/default/docs.md +++ b/dbt/models/default/docs.md @@ -128,7 +128,7 @@ View containing aggregate land square footage for all PINs. View containing building permits organized by PIN, with extra metadata recorded by CCAO permit specialists during the permit processing workflow. -**Primary Key**: `pin`, `date_issued` +**Primary Key**: `pin`, `permit_number` {% enddocs %} # vw_pin_sale diff --git a/dbt/models/open_data/docs.md b/dbt/models/open_data/docs.md index 333a418e7..6e7a3e431 100644 --- a/dbt/models/open_data/docs.md +++ b/dbt/models/open_data/docs.md @@ -28,6 +28,12 @@ Thin wrapper around `proximity.vw_pin10_proximity` that powers the `Parcel Proxi Thin wrapper around `default.vw_pin_sale` that powers the `Parcel Sales` open data asset {% enddocs %} +# vw_parcel_status + +{% docs view_vw_parcel_status %} +Thin wrapper around `default.vw_pin_status` that powers the `Parcel Status` open data asset +{% enddocs %} + # vw_parcel_universe_current {% docs view_vw_parcel_universe_current %} diff --git a/dbt/models/open_data/exposures.yml b/dbt/models/open_data/exposures.yml index 7e45a8153..4a54f05f1 100644 --- a/dbt/models/open_data/exposures.yml +++ b/dbt/models/open_data/exposures.yml @@ -106,6 +106,24 @@ exposures: Use cases: Alone, sales data can be used to characterize real estate markets. Sales paired with characteristics can be used to find comparable properties or as an input to an automated modeling application. Sales paired with assessments can be used to calculate sales ratio statistics. Outliers can be easily removed using filters constructed from class, township, and year variables. + - name: parcel_status + label: Parcel Status + type: dashboard + url: https://datacatalog.cookcountyil.gov/Property-Taxation/Assessor-Parcel-Status/uuu4-fqy8 + depends_on: + - ref('open_data.vw_parcel_status') + owner: + name: Data Department + meta: + test_row_count: true + asset_id: uuu4-fqy8 + primary_key: + - pin + - year + description: | + Collection of various different PIN-level physical and assessment-related + statuses collected and documented across the CCAO and Data Department. + Constructs the Data Department's AHSAP indicator. - name: parcel_universe_current_year label: Parcel Universe (Current Year) diff --git a/dbt/models/open_data/open_data.vw_parcel_status.sql b/dbt/models/open_data/open_data.vw_parcel_status.sql new file mode 100644 index 000000000..fa477f887 --- /dev/null +++ b/dbt/models/open_data/open_data.vw_parcel_status.sql @@ -0,0 +1,34 @@ +-- Copy of defualt.vw_pin_status that feeds the "Parcel Status" open data asset. + +/* The following columns are not included in the open data asset, or are +currently hidden: + ward_name +*/ + +SELECT + CONCAT(pin, year) AS row_id, + pin, + year, + class, + is_corner_lot, + is_ahsap, + is_exempt, + is_zero_bill, + is_parking_space, + parking_space_flag_reason, + is_common_area, + is_leasehold, + is_mixed_use, + is_railroad, + is_weird, + weird_flag_reason, + oby_cdu_code, + oby_cdu_description, + comdat_cdu_code, + comdat_cdu_description, + dweldat_cdu_code, + dweldat_cdu_description, + pardat_note, + is_filler_class, + is_filler_pin +FROM {{ ref('default.vw_pin_status') }} diff --git a/dbt/models/open_data/open_data.vw_parcel_universe_current.sql b/dbt/models/open_data/open_data.vw_parcel_universe_current.sql index d6e25451a..2bc6144e7 100644 --- a/dbt/models/open_data/open_data.vw_parcel_universe_current.sql +++ b/dbt/models/open_data/open_data.vw_parcel_universe_current.sql @@ -1,4 +1,4 @@ --- Most-recent-year-only copy of defualt.vw_pin_universe. Feed the "Parcel +-- Most-recent-year-only copy of defualt.vw_pin_universe. Feeds the "Parcel -- Universe (Current Year)" open data asset. /* The following columns are not included in the open data asset, or are diff --git a/dbt/models/open_data/schema/open_data.vw_parcel_status.yml b/dbt/models/open_data/schema/open_data.vw_parcel_status.yml new file mode 100644 index 000000000..fa838f7fc --- /dev/null +++ b/dbt/models/open_data/schema/open_data.vw_parcel_status.yml @@ -0,0 +1,64 @@ +models: + - name: open_data.vw_parcel_status + description: '{{ doc("view_vw_parcel_status") }}' + + columns: + - name: class + description: '{{ doc("shared_column_class") }}' + - name: comdat_cdu_code + description: CDU from `iasworld.comdat` table + - name: comdat_cdu_description + description: CDU code description for `comdat_cdu_description` + - name: dweldat_cdu_code + description: CDU from `iasworld.dweldat` table + - name: dweldat_cdu_description + description: CDU code description for `dweldat_cdu_description` + - name: is_ahsap + description: '{{ doc("shared_column_is_ahsap") }}' + - name: is_common_area + description: '{{ doc("shared_column_is_common_area") }}' + - name: is_corner_lot + description: '{{ doc("shared_column_is_corner_lot") }}' + - name: is_exempt + description: Property tax exempt parcel indicator + - name: is_filler_class + description: Parcel has a placeholder class of '999' + - name: is_filler_pin + description: Parcel has a placeholder PIN that contains '999' + - name: is_leasehold + description: | + Leasehold parcel indicator. A leasehold is a form of land + tenure or property tenure where one party buys the right to occupy + land or a building for a given time. The CCAO records leaseholds as + a value of '8' for the 11th digit of a parcel's PIN. + - name: is_mixed_use + description: | + Parcel has both an explicitly residental class in dweldat or oby and a + commercial class in comdat, or a residential class in dweldat and a + commercial class in oby. + - name: is_parking_space + description: '{{ doc("shared_column_is_parking_space") }}' + - name: is_railroad + description: Parcel is class 'RR' + - name: is_weird + description: Parcel is in `ccao.pin_test` + - name: is_zero_bill + description: Parcel with a $0 property tax bill indicator + - name: oby_cdu_code + description: CDU from `iasworld.oby` table + - name: oby_cdu_description + description: CDU code description for `oby_cdu_code` + - name: pardat_note + description: Pardat note field 2 + - name: parking_space_flag_reason + description: '{{ doc("shared_column_parking_space_flag_reason") }}' + - name: pin + description: '{{ doc("shared_column_pin") }}' + - name: row_id + description: '{{ doc("shared_column_row_id") }}' + - name: weird_flag_reason + description: | + Test type field from `ccao.test_pin`. Describes why a given parcel + is used for testing. + - name: year + description: '{{ doc("shared_column_year") }}' \ No newline at end of file