

def add_abra_data(output):
    print('adding liquor license information')
    abra_data = json.loads(open('data/abra-licenses.json').read())
    for rec in abra_data:
        anc = rec
        output[anc[0]]['ancs'][anc[1]]['census']['liquor_licenses'] = {
            'value': abra_data[rec]['number'],
        }
        for rec in abra_data[rec]['smds']:
            smd = rec
            output[smd[0]]['ancs'][smd[1]]['smds'][output[2:]]['census']['liquor_licenses'] = {
                'value': abra_data[rec[:2]]['smds'][rec]['number'],
            }

dataset/ETHPy150Open codefordc/ancfinder/scripts/update_anc_database.py add_abra_data/VarMisuse@117/185 `smd`->`output`