

def add_geographic_data(output):
    print('adding geographic data')

    def get_gis_data(name, layer):
        gisdata = json.load(urlopen(('http://gis.govtrack.us/boundaries/dc-%s-2013/%s' % (layer, name.lower()))))
        ret = OrderedDict()
        ret['bounds'] = gisdata['extent']
        ret['area'] = gisdata['metadata']['area_sq_m']
        return ret
    for ward in list(smd.values()):
        for anc in list(ward['ancs'].values()):
            anc.update(get_gis_data(anc['anc'], 'anc'))
            for smd in list(anc['smds'].values()):
                smd.update(get_gis_data(smd['smd'], 'smd'))

dataset/ETHPy150Open codefordc/ancfinder/scripts/update_anc_database.py add_geographic_data/VarMisuse@88/141 `output`->`smd`