def get_neighborhood_from_id(neighborhood_id): json_map = json.loads(get_polygon_map('app/data/intersect/zipcode_neighborhood_intersect.shp')) neighbor_map = {'type': json_map['type'], 'features': list()} for (index, entry) in enumerate(json_map.get('features')): if int(entry['properties']['REGIONID']) == int(neighborhood_id): neighbor_map['features'].append(entry) return neighbor_map
def intersect_shape_data(): # intersect_neighborhood_with_zipcode() json_map = get_polygon_map('app/data/intersect/zipcode_neighborhood_intersect.shp') return json.dumps(json_map)
def zipcode_shapedata(): json_map = get_polygon_map('app/data/zipcode/cb_2014_us_zcta510_500k.shp') return json.dumps(json_map)
def neighborhood_shapedata(): json_map = get_polygon_map('app/data/neighborhood/ZillowNeighborhoods-AZ.shp') return json.dumps(json_map)