I would to like create a simple choropleth map of the world with respect to pisa score of different countries. Hence my DataFrame looks like:
merged = merged[['geometry','Avg_score']]
merged.head()
To plot choropleth map:
fig, ax = plt.subplots(1,figsize=(15, 10))
ax.axis('off')
ax.set_title('Education Ranking', fontdict={'fontsize': '35', 'fontweight' : '3'})
merged.plot(column='Avg_score', cmap='Blues_r', scheme='User_Defined',
classification_kwds=dict(bins=[325,416,463,499,591]),
edgecolor = 'black', linewidth=0.7, ax=ax,legend= True)
leg = ax.get_legend()
leg.set_bbox_to_anchor((1, 0.7, 0.2, 0.2))
plt.show()
However, I get the following error: 'Line2D' object has no property 'column'. A similar post can be found here: 'Line2D' object has no property 'kind' . In anycase this problem is not fully addressed here! Any help would be highly appreciated as I am stuck here far too long.