Open maihao14 opened 5 years ago
I'll take a look at it and reply to you with an answer asap.
Thanks
Are you using the same dataset for plotting? Also, can you tell me a line number for your error? By looking at your error it seems you need to do typecasting, are you correctly passing the 'size' as an int?
Hi again, I download your *.csv and jupyter script. The error occurs at the visualization part: `cases = [] for i in range(len(types)): lim = types[i] df_sub = df.loc[df.type==types[i],:] cases.append(go.Scattergeo( lon = df_sub['longitude'], lat = df_sub['latitude'], text = df_sub['text'],
#autocolorscale = False,
name = types[i] + ' : '+str(len((df_sub))),
marker = dict(
line = dict (color = colors[i],width = 0.5),
#sizemode = 'area',
size = types[i]
#size = len(df_sub)/8324`
thanks, I understood the problem and I am working on it. Reply to you soon.
'size' property is a number and may be specified as
was caused because size = types[i] was returning a string. AttributeError: 'Scattergeo' object has no attribute 'items'
Old:
marker = dict(
fig = dict( data=cases, layout=layout )
New:
marker = go.scattergeo.Marker(
fig = go.Figure( data=cases, layout=layout )
Hi Mantej,
I have seen you have done great work.
However, when I am trying your code at the last part. It reproted an error and cannot yeild the result intersurface you displayed. I am not sure what's going on? Could you have a look at the issue and help me fix that? Many thanks!
`ValueError: Invalid value of type 'builtins.str' received for the 'size' property of scattergeo.marker Received value: 'earthquake'
ValueError Traceback (most recent call last)