一个thenmap api包装器
thenmap的Python项目详细描述
一个简单的thenmap api包装器。
安装
pip install thenmap
使用
>>>fromthenmapimportThenmap>>>api=Thenmap()>>>swedish_municipalities=api["se-7"]>>>swedish_municipalities.geojson# defaults to current local date{{u'crs':{u'type':u'name',...}>>>swedish_municipalities.date="1975-05-03">>>swedish_municipalities.geojson{{u'crs':{u'type':u'name',...}>>>swedish_municipalities.in_which("13.46,59.38")'1780'
要对返回的geodata进行更细粒度的控制,请使用getgeodata:
>>>swedish_municipalities.get_geodata(date="1975-05-03",format="topojson"){{u'crs':{u'type':u'name',...}
有关api的更多信息,请参见http://thenmap.net。
更改日志
- 1.1.0条 -始终只从一个日期获取功能。默认为当前日期 -添加dataset.info方法 -使python3.x兼容
- 1.0.1条 -修正了导入错误
- 1.0.0条 -第一个工作版本