test_geocoders.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:skills-ml 作者: workforce-data-initiative 项目源码 文件源码
def test_cbsa_finder_twohits():
    s3_conn = boto.connect_s3()
    s3_conn.create_bucket('geobucket')
    shapefile_name = 'tests/sample_cbsa_shapefile.shp'
    finder = S3CachedCBSAFinder(
        s3_conn=s3_conn,
        cache_s3_path='geobucket/cbsas.json',
        shapefile_name=shapefile_name
    )
    sample_input = {
        "bbox": {
            "northeast": [38.00, -81.05],
            "southwest": [35.13, -88.18]
        },
    }
    assert finder.query(sample_input) == (
        '40080',
        'Richmond-Berea, KY Micro Area',
    )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号