总结指定区域内地点的Google地图属性
places-summarized的Python项目详细描述
汇总的地点
Places summared是googlemaps的placesapi的包装器,它总结了 指定坐标附近位置的属性。在
安装
使用pip汇总的安装位置
$ pip install places-summarized
要求
- 谷歌地图API密钥。在
- Python3
使用
本例使用googlemapsapi键。在
importpprintfromplaces_summarized.clientimportClientpp=pprint.PrettyPrinter(indent=4)client=Client(key='your-key')# Google Sydney officessummary=client.places_summary(location=(-33.8670522,151.1957362),radius=1000)pp.pprint(summary.result())# Print the ratings of the locations of type "point_of_interest."# You can find the full list of types# at: https://developers.google.com/places/web-service/supported_typesprint(summary.ratings_by_type('point_of_interest'))# Print the average price level of all the placesprint(summary.average_price_level())
或者,您可以不使用密钥,使用TestClient
来测试它。在
文件
去做。。。:/也许你想帮忙?在
致谢
- “Pin”图标取自Freepik on Flaticon。在
- “Barchat”图标取自Gregor Cresnar on Flaticon。在
- 项目
标签: