Construct an emitData helper function for sending collected data to visualizer endpoints