mattyschell / geodatabase-buildings

Creative Commons Zero v1.0 Universal
2 stars 0 forks source link

Disallow construction year null on constructed buildings #42

Open mattyschell opened 1 year ago

mattyschell commented 1 year ago

The proposal:

  1. Review all constructed buildings with construction_year null. Populate a construction_year.

  2. Add a constraint or QA to buildings to prevent buildings with ( status = ‘constructed’ AND construction_year is NULL) from being allowed in the future

mattyschell commented 1 year ago

The correct count of buildings that are constructed but do not have a construction year is 10,000+

select count(*)
from bldg.building_evw a
where a.construction_year is null
and last_status_type = 'Constructed'

COUNT(*)
--------
   10420

last_status_type 'constructed' buildings with unknown construction_year appear to be a permanent, expected condition. In which case the second part of the proposal is the only valid enhancement.

Consider QA to prevent new last_status_type 'constructed buildings with no constructed_year.