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"] # square meters
            return ret

    # Add ANC/SMD geographic extents (bounding box) from the GIS server.
    for ward in list(output.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/operator `%` -> `/`