Wireless sensor networks (WSNs) have good performance for data transmission, and the data transmission of sensor nodes has the function of symmetry. However, the wireless sensor nodes are facing great pressure in data transmission due to the increasing amount and types of data that easily cause premature energy consumption of some nodes and, thus, affects data transmission. Clustering algorithm is a common method to balance energy consumption, but the existing algorithms fail to balance the network oad effectively for big data transmission. Therefore, an optimal data transmission with data-location integration (ODTD-LI) is proposed for WSNs in this paper. For optimal data transmission, we update the network topology once for one round. In the proposed algorithm, we perform calculations of the optimal cluster heads, clustering and data transmission routing through three steps. We first deploy N homogeneous and symmetry nodes in a square area randomly and calculate the optimal number of cluster heads according to the node ocations. then, the optimal number of cluster heads, energy consumption, the distances and degrees of the nodes are taken into consideration during the clustering phase. Direct communication is carried out within a cluster, and the member nodes of the cluster pass the information directly to the cluster head. Lastly, an optimal hybrid routing from each cluster node to Sink is constructed for data transmission after clustering. The simulations verify the good performance of the proposed algorithm in view of the ifetime, average delay, coverage rate (CR) and oad balance of the network compared with the existing algorithms. Through the research conducted in this paper, we find that our work has good performance for selecting the hybrid routing in the network with the nodes randomly arranged.