我想在地图上形象化加拿大商店的策略.我已经为美国商店做到了.我只想将其复制到加拿大.我认为位置模式,范围和投影应该改变,但我不知道该用哪个值.我将不胜感激任何帮助.
def visualize_geo_store_canada(stores_info_df,fig_name='store_strategy_Canada_map',title = 'Stores Strategy'):
data = [ dict(
type = 'scattergeo',##### WHAT TO REPLACE? ########
#locationmode = 'USA-states',###############################
lon = stores_info_df['LONGITUDE'],lat = stores_info_df['LATITUDE'],text = stores_info_df['STRATEGY'],mode = 'markers',marker = dict(
colorscale= 'Jet',color = stores_info_df['STRATEGY'],colorbar = dict(
title = 'Strategy',titleside = 'top',tickmode = 'array',)
))]
layout = dict(
title = title,geo = dict(
##### WHAT TO REPLACE? ########
#scope='usa',#projection=dict( type='albers usa' ),###############################
showland = True,landcolor = "rgb(250,250,250)",subunitcolor = "rgb(217,217,217)",countrycolor = "rgb(217,countrywidth = 0.5,subunitwidth = 0.5
),)
fig = dict(data=data,layout=layout)
plotly.offline.iplot(fig,validate=False)