Thanks a lot great video and finally explained/written in easy understandable way(not like a lot of others that are over complicated ). Much appreciated helped a lot with my own US election project!
I added state names that appear on the map, so it visually displays the abbreviation for each state: # add state abbreviations fig.add_scattergeo( locations=data_for_map['id'], locationmode='USA-states', text=data_for_map['id'], mode='text', textfont=dict( color='white', )) You can add this before doing fig.show()
Thanks a lot great video and finally explained/written in easy understandable way(not like a lot of others that are over complicated ). Much appreciated helped a lot with my own US election project!
Thanks Richard, am glad i could help
Thank you very much for this wonderful video. You helped me a lot.
Why couldn't you write locations= 'state' in place of 'usa_state_code'
well that's another way to do it! will try it out.
Not a single person is able to add annotations on the states like the name amd the data.
I added state names that appear on the map, so it visually displays the abbreviation for each state:
# add state abbreviations
fig.add_scattergeo(
locations=data_for_map['id'],
locationmode='USA-states',
text=data_for_map['id'],
mode='text',
textfont=dict(
color='white',
))
You can add this before doing fig.show()