We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
体验了一下cnmaps,使用还是很友好方便的。之前一直用R画地图,发现python也不错。有个诉求就是(相信也是很多人的诉求):我们经常需要在地图上标记出各个省,乃至各个城市的某项数据(可以是用具体的34,35,89,112等数值,也可以用颜色),不知道作者有没有考虑
The text was updated successfully, but these errors were encountered:
@caozpy 如果是颜色的话,我猜你想要的效果是这种:
import numpy as np from cnmaps import get_adm_maps provinces = get_adm_maps(level='省', engine='geopandas') provinces['发病率'] = np.random.random(len(provinces)) * 100 provinces.plot(column='发病率') plt.savefig('./result.png')
如果是标记数字的话,可能需要增加查找城市坐标点的功能,有这个计划: #11 。
Sorry, something went wrong.
是的,赞
这个其实是 GeoPandas 的地图绘制功能,调用 get_adm_maps 时传入参数 engine='geopandas' 以后,返回的对象是 geopandas.geodataframe.GeoDataFrame 对象,就可以根据 GeoPandas 所支持的功能绘图了。参考示例
get_adm_maps
engine='geopandas'
geopandas.geodataframe.GeoDataFrame
Clarmy
No branches or pull requests
体验了一下cnmaps,使用还是很友好方便的。之前一直用R画地图,发现python也不错。有个诉求就是(相信也是很多人的诉求):我们经常需要在地图上标记出各个省,乃至各个城市的某项数据(可以是用具体的34,35,89,112等数值,也可以用颜色),不知道作者有没有考虑
The text was updated successfully, but these errors were encountered: