While an operator was performing excavation operations, a co-worker moved to the edge of the ditch to observe the work progress. When the excavator operator removed the bucket of dirt and pivoted, the counterweights of the excavator struck the worker's shoulder.