Skip to content

Commit

Permalink
Add parcel status
Browse files Browse the repository at this point in the history
  • Loading branch information
wrridgeway committed Jan 14, 2025
1 parent 1e303c3 commit fbc43c5
Show file tree
Hide file tree
Showing 6 changed files with 124 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dbt/models/default/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions dbt/models/open_data/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
Expand Down
18 changes: 18 additions & 0 deletions dbt/models/open_data/exposures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
34 changes: 34 additions & 0 deletions dbt/models/open_data/open_data.vw_parcel_status.sql
Original file line number Diff line number Diff line change
@@ -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') }}
Original file line number Diff line number Diff line change
@@ -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
Expand Down
64 changes: 64 additions & 0 deletions dbt/models/open_data/schema/open_data.vw_parcel_status.yml
Original file line number Diff line number Diff line change
@@ -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") }}'

0 comments on commit fbc43c5

Please sign in to comment.