使用高德地图API

1.如上图,首先向高德api进行请求,利用pandas进行数据处理。


2.如上图,输入我们在高德地图账号注册完成后在项目中申请并获得的key。

3.如上图,我本次选取了限制在广州(440100)内的医院。

4.如上图,创建一个列表用于存放数据。

5.如上图,构建一个pg_no

6.如上图,利用while循环寻找内容,至break停止。使用requests向高德api请求地理逆地理编码,然后用extend从高德api中获得的结果存入pois。

7.如上图,对数据依照idname、type、typecode、location等进行分类。



8.产出json档 output.json ,产出tsv档 output.tsv ,如图。
网友评论