I want to create a heatmap of say, provincial population of China and I found this guide to a similar problem http://sensitivecities.com/so-youd-like-to-make-a-map-using-python-EN.html#.Ut3k7bS-thF here.
I have no problem going through the example code though I have to admit that I don't thoroughly understand them all. However when I was trying to mimic the example by using the shapefile of China, the code ran ok till the following
In [6]:
df_map = pd.DataFrame({
'poly': [Polygon(xy) for xy in m.china],
'ward_name': [ward['NAME'] for ward in m.china_info]})
It generates an error that says
ValueError: A LinearRing must have at least 3 coordinate tuples
Can someone please explain to me what causes this error?