Advertisement
Guest User

Untitled

a guest
Aug 23rd, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. for k in range(len(geo_data['features'])):
  2. county_coords=np.array(geo_data['features'][k]['geometry']['coordinates'][0])
  3. m, M =county_coords[:,0].min(), county_coords[:,0].max()
  4. lons.append(0.5*(m+M))
  5. m, M =county_coords[:,1].min(), county_coords[:,1].max()
  6. lats.append(0.5*(m+M))
  7.  
  8. data = [dict(type='scattermapbox',
  9. lat=lats,
  10. lon=lons,
  11. mode='markers',
  12. text=text_win,
  13. marker=dict(size=1, color='white'),
  14. showlegend=False,
  15. hoverinfo='text'
  16. )]
  17.  
  18. for a in range(1,len(text_list)):
  19. data.append(dict(type='scattermapbox',
  20. lat=lats,
  21. lon=lons,
  22. mode='markers',
  23. text=text_list[a],
  24. marker=dict(size=1, color='white'),
  25. showlegend=False,
  26. hoverinfo='text'
  27. ))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement