In-network data aggregation with temporal and spatial correlation