In a directed graph, how to measure whether a node is more "upstream" or "downstream"?
Please clarify what you are looking for in the presence of cycles.  I'd assume the cycles aren't standalone- any node in a cycle could also have inputs from further upstream, and could also send output further downstream. Even in the unweighted case, it seems to me that some nodes in a cycle can be more "upstream" than others.  For instance, most of the nodes in the cycle might be downstream of a set of source nodes.  One node in that cycle might be the only path out of the cycle to a sink.  Surely that node is more "downstream" than the others in the cycle?  

Sorry the above isn't just a comment - I'm too new to have high enough reputation in this group for that. 

So, to give an answer as well.  Take the "flow network" analogy to an extreme.  Imagine each source upstream of the target node puts out a water flow, with dye added at the first instant only. Treat the weights as time delays.  For each node, calculate the first time the dye reaches a given node.  Among all the sinks downstream of your target node, pick either the longest time or the mean time (or itself, if the node is a sink).  The target node's position is then just its early arrival time divided by the sinks' mean or longest arrival time.  Computationally, this earliest dye arrival time is done by some modification of breadth first traversal of the directed graph.  Start at the sources with arrival times of 0, and then each node arrival time is just the minimum over all its predecessors.  (As in any graph traversal, visited and completed nodes have to be remembered so cycles aren't followed more than once. This would also be called shortest distance from a set of nodes to a given set of nodes.  

But note that cycles aren't given any particular special treatment.   If you really want cycles to matter, you could assume that output flows are split equally, and do mixing calculations, so that the dye concentration would decay gradually over time.  But that would seem ridiculously complex, and take time, for probably no benefit.  But in either case, the nodes in cycles won't all have the same value - some will be more "upstream" than others.  

If you really want all the nodes in a cycle to have the same value, you might need a separate pre-processing step to find the directed cycles, and aggregate each cycle into a single node (one for each cycle).  That adds complexity, although it simplifies the shortest distance calculations since then the graph will be acyclic and a trivial breadth first traversal will work.

You probably don't really want to require a global analysis of a graph to get your feature value, although that's what you had to do in your initial analysis too.  If this is something you would run on a regular basis, you could probably just do local updating when changes occur, with limited propagation of earliest arrival times, assuming you could tolerate some "error" in the somewhat arbitrarily-chosen metric anyway.