Functions

Measure assessment performance

Calculate assessment performance statistics in accordance with the CCAO Data Science Department’s Standard Operating Procedure on Sales Ratio Studies. The main changes are enforcement of outlier trimming (top and bottom 5% of ratios are always dropped) and a strict minimum sample size (N must be >= 30). Each function outputs a named list containing the statistic, its confidence interval, whether or not the IAAO standard was met, and the number of observations used to calculate the statistic.

ccao_cod() ccao_prd() ccao_prb()

Calculate sales ratio statistics using CCAO SOPs

Format data

Clean and format Property Index Numbers (PINs)

pin_clean()

Remove separators and whitespace from input PIN(s) and warn if invalid

pin_format_pretty()

Add dash separators to input PIN(s)

Lookup values

Convert between township names, assessment years, and triads

town_convert()

Convert from township name to township number and visa versa

town_get_assmnt_year()

Get the nearest assessment year of a township

town_get_triad()

Get Cook County triad name or number based on township name or code

Manage characteristics

Recode/rename characteristic columns, merge HIE data, and fix characteristic errors

chars_288_active()

Return active years given a 288 start date and township

chars_fix_age()

Fix the age variable in CCAO data

chars_sparsify()

Convert ADDCHARS SQL data to a sparse format that can be joined to other data

chars_update()

Update characteristic values using joined values from ADDCHARS

vars_check_class()

Check if a property class falls within its expected square footage and age boundaries

vars_recode()

Replace numerically coded variables with human-readable values

vars_rename()

Bulk rename variables from CCAO SQL to standardized or pretty names and visa versa

Adjust estimated values

Apply post-modeling adjustments to raw model values

val_round_fmv()

Round model values to flat amounts

val_limit_ratios()

Limit excessive sales ratios

Miscellaneous functions

Functions with no other suitable category

ccao_generate_id()

Generate a memorable ID string based on CCAO employee names

Data

Dictionaries

Lookups for numeric codes used in the assessment system

cdu_dict

Data dictionary of codes used to identify specific property situations

class_dict

Data dictionary of Cook County property classes

coe_dict

Data dictionary of Certificate of Error reason codes

town_dict

Data dictionary for CCAO township codes and triads

vars_dict

Data dictionary for CCAO data sets and variables

vars_dict_legacy

Data dictionary for legacy CCAO data and variables

Spatial data

CCAO-specific spatial boundaries. Must load sf library before using

nbhd_shp

Simple features (sf) data frame of CCAO neighborhoods

town_shp

Simple features (sf) data frame of Cook County townships

Sample data

Sample data frames pulled directly from CCAO SQL or Athena

chars_sample_athena

Sample dataset from the vw_card_res_char Athena SQL view

chars_sample_hie

Sample dataset from the ccao.hie Athena SQL table

chars_sample_universe

Sample dataset from the VW_RES_UNIVERSE SQL view

Miscellaneous

Other data used throughout the department or in specific functions

ccao_colors

Official CCAO color palette

chars_cols

List crosswalk of Athena columns and their ADDCHARS equivalents