title: Assign color to NetworkX node based on column name
body: <p>I am attempting to build a network graph using NetworkX and Bokeh. I am using the NetworkX <code>from_pandas_edgelist</code> function to add data for the graph. I would like to color the node of the graph based on the column in the initial data input. </p>
  
  <p>The <code>relation</code> DataFrame is as follows:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>company   client
  
  Google    AT&amp;T
  Google    Cisco       
  Amazon    Facebook
  Amazon    Snap
  Amazon    Microsoft
  Apple     Intel
  Apple     IBM
  Apple     Visa</code></pre>
  </div>
  </div>
  </p>
  
  <p>The above snippet is only a portion of the DataFrame.</p>
  
  <p>I would like all of the nodes from <code>company</code> to return in a different color to <code>client</code>. </p>
  
  <p>The code below produces a network graph where all nodes are the same color.  </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>G=nx.from_pandas_edgelist(relation, 'company', 'client')
  
  # Show with Bokeh
  plot = Plot(plot_width=1000, plot_height=800,
              x_range=Range1d(-1.1, 1.1), y_range=Range1d(-1.1, 1.1))
  plot.title.text = "Company - Client Network"
  
  node_hover_tool = HoverTool(tooltips=[("Company Name", "@index")])
  plot.add_tools(node_hover_tool, BoxZoomTool(), ResetTool())
  
  graph_renderer = from_networkx(G, nx.spring_layout, scale=1, center=(0, 0))
  
  graph_renderer.node_renderer.glyph = Circle(size=20)
  
  graph_renderer.edge_renderer.glyph = MultiLine(line_color="red", line_alpha=0.8, line_width=1)
  plot.renderers.append(graph_renderer)
  
  output_file("interactive_graphs.html")
  show(plot)</code></pre>
  </div>
  </div>
  </p>
  
  <p>Any assistance anyone could provide would be greatly appreciated.</p>