6

Does anybody know how to assign individual colors to countries using vincent's map visualization?

In particular, after loading the world map as follows:

world_topo="static/custom/world-countries.topo.json"
geo_data = [{'name': 'countries',
         'url': world_topo,
         'feature': 'world-countries'}]
vis = vincent.Map(geo_data=geo_data, scale=200)

I could change the color of the map as follows:

vis.marks[0].properties.update.fill.value = '#084010'

However, I couldn't figure out how to color each country differently, for example assign white (#FFFFFF) to Antarctica.

outis nihil
  • 736
  • 6
  • 16
MajorYel
  • 379
  • 1
  • 5
  • 10

0 Answers0