The Internet of Things (IoT) now uses the Wireless Sensor Network (WSN) as a platform to sense and communicate data. The increase in the number of embedded and interconnected devices on the Internet has resulted in a need for software solutions to manage them proficiently in an elegant and scalable manner. Also, these devices can generate massive amounts of data, resulting in a classic Big Data problem that must be stored and processed. Large volumes of information have to be produced by using IoT applications, thus raising two major issues in big data analytics. To ensure an efficient form of mining of both spatial and temporal data, a sensed sample has to be collected. So for this work, a new strategy to remove redundancy has been proposed. This classifies all forms of collected data to be either relevant or irrelevant in choosing suitable information even before they are forwarded to the base station or the cluster head. A Low-Energy Adaptive Clustering Hierarchy (LEACH) is a cluster-based routing protocol that uses cluster formation. The LEACH chooses one head from the network sensor nodes, such as the Cluster Head (CH), to rotate the role to a new distributed energy load. The CHs were chosen randomly with the possibility of all CHs being concentrated in one locality. The primary idea behind such dynamic clustering was them resulted in more overheads due to changes in the CH and advertisements. Therefore, the LEACH was not suitable for large networks. Here, Particle Swarm Optimization (PSO) and River Formation Dynamics are used to optimize the CH selection (RFD). The results proved that the proposed method to have performed better compared to other methods.