title: Is it possible to add a weight/probability to a node in graph theory(using networkx)
body: <p>I'm using networkx(library for python to deal with graphs).  I basically have nodes with various edges but want to see what a path would look like if it used the nodes that were the most connected.</p>
  
  <p>I can use this command to see the number of connections:</p>
  
  <pre><code>len(G.edges(CurrentNode))
  </code></pre>
  
  <p>and I can get the number of edges, but I'm not sure how to apply this to list as a path.  For example, I can add this number as an attribute but I don't think attributes are taken into consideration when finding a path and because I'm adding this after the edges are connected, I cannot add the weights to the edges themselves. The other problem is the higher the score the more I want the path to be followed but with edges I think it follows the lowest weighted edge.</p>
  
  <p>I'm wondering what approach do other people take to find paths based on certain characteristics of the node?  If someone knows how to do this for networkx, great! but I think networkx has many features so if I can get the theory or general approach I'm sure I can find a way to do it in python.</p>
  
  <p>UPDATE: Sorry I might be explaining it wrong.  I understand I can add attributes to nodes, but I'm not sure how to make path decisions based on those attributes.  So in my case, based on certain conditions I am adding edges between nodes. Each group of nodes represents a different day(day1data.., day2data.., day3data..), so I'm connecting a few nodes from day1 to nodes on day2 only if certain rules are matched.    Once I have the edges connected, I want those ones to be considered more heavily when choosing a path.  So I added an attribute 'weight' to each node of the current day which is basically the total number of edges connecting that node.
  My problem is, the weight attribute is not used in any of the path decision making because its an attribute I created and labeled myself(I could create a label named 'abc'='hello world' and it would apply that attribute to the node).  How can I get this weight to be considered when creating the path(the edges are already created so I don't think I can go back and recreate them)?</p>