One of the major challenges of designing wireless sensor networks data gathering algorithm is to reduce energy consumption, achieve better balanced consumption and prolong the lifetime of sensor network. For the current clustering algorithms of data gathering in wireless sensor networks neglecting the impact of event sources on data spatial correlation, a CS-based dynamic clustering algorithm centred on event source (CS-DCES) is proposed in this paper. Utilizing the model of Euclidean distance spatial correlation and joint sparsity model-1, the nodes that affected by the same event source are clustered together and reconstruct those nodes readings within cluster in order to increase the spatial correlation of data and reduce the number of each cluster measurement. The algorithm exploits the compressive data to calculate the location of event source and clusters dynamically. Moreover, according to simulation, we analyze the three factors that influence the algorithm performance, and they are attenuation coefficient of event sources, distance between event sources and the number of event sources, and finally the application condition of CS-DCES is given. The simulations show that CS-DCES outperforms the existing data gathering algorithms in decreasing communication cost, saving the network energy consumption and extending the network survival time under the same accuracy.