I HAVE MADE IT GUYS ! haha
I’ll share how I made it works soon$
Edit:
here is my figure dict (I am not using “frames”):
{
‘data’: [{
‘type’: ‘scattergeo’,
‘lon’: [118.8586, 117.2461],
‘lat’: [32.915, 32.0361],
‘hoverinfo’: ‘text’,
‘text’: 'Jiangsu>Anhui: 1.84 by gas_transmission ',
‘mode’: ‘lines’,
‘line’: {
‘width’: 5.359301185066551,
‘color’: ‘#8465A9’
},
‘legendgroup’: ‘gas_transmission’,
‘name’: ‘gas_transmission:Jiangsu’,
‘opacity’: 0.6
},
a line
{
‘type’: ‘scattergeo’,
‘lon’: [120.498],
‘lat’: [29.0918],
‘hoverinfo’: ‘text’,
‘text’: ‘Zhejiang: 0.76 of lng_import (gas)’,
‘mode’: ‘markers’,
‘marker’: {
‘symbol’: ‘dot’,
‘opacity’: 0.6,
‘size’: 2.806030050747952,
‘color’: ‘blue’
},
‘legendgroup’: ‘lng_import’,
‘name’: ‘lng_import’
}
a marker
etc…
],
‘layout’: {
‘title’: ‘Energy Flow’,
‘showlegend’: True,
‘width’: ‘900’,
‘height’: ‘600’,
‘hovermode’: ‘closest’,
‘geo’: {
‘scope’: ‘world’,
‘showland’: True,
‘showcountries’: True,
‘showsubunits’: True,
‘showocean’: True,
‘oceancolor’: ‘#aec6cf’,
‘subunitcolor’: ‘blue’,
‘countrycolor’: ‘green’,
‘countrywidth’: 0.5,
‘subunitwidth’: 0.5,
‘lonaxis’: {
‘range’: [80.77808, 130.26872]
},
‘lataxis’: {
‘range’: [16.25295, 51.66675]
},
‘landcolor’: ‘rgb(255,255,255)’
},
‘sliders’: [{
‘active’: ‘2010’,
‘currentvalue’: {
‘visible’: True,
‘prefix’: 'Timestep: ’
},
‘pad’: {
‘t’: 50
},
‘steps’: [{
‘method’: ‘restyle’,
‘args’: [‘visible’, [True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]],
‘label’: ‘2010’
},
{}
for each step, define to true all the scattergeo dict you want to be visible, false to all the others
etc …
]
}]
}
}