Complexity of calculating average across distributed network?
You could rely on the fact that, as @polygeric alluded to, the average of a set of numbers is the average of the averages over any partition of the original numbers. In other words, have each node compute the average of its $D$ numbers, send those $N$ averages somewhere and compute their averages. 

How you do that efficiently will depend on the network topology and the communication protocol.