

def add_building_permit_data(output):
    print('adding building permit information')
    smd_building_permits = csv.reader(open('data/smd-building-permits.csv'), delimiter=',')
    anc_building_permits = csv.reader(open('data/anc-building-permits.csv'), delimiter=',')
    for rec in smd_building_permits:
        smd = anc[0]
        output[smd[0]]['ancs'][smd[1]]['smds'][smd[2:]]['census']['building_permits'] = {
            'value': int(rec[1]),
        }
    for rec in anc_building_permits:
        anc = rec[0]
        output[anc[0]]['ancs'][anc[1]]['census']['building_permits'] = {
            'value': int(rec[1]),
        }

dataset/ETHPy150Open codefordc/ancfinder/scripts/update_anc_database.py add_building_permit_data/VarMisuse@56/112 `rec`->`anc`