Wireless sensor networks have drawn much attention due to their ability to monitor ecosystems and wildlife habitats. In such systems, the data should be intelligently collected to avoid human intervention. For this, we propose a network infrastructure in which the sensor nodes are designated as “data-generating” or “data-storage” nodes. Data-generating nodes take measurements, whereas data-storage nodes make themselves available to compute and store checksums of data received from nearby data-generating nodes. We propose a spatially-clustered architecture for our storage nodes and a coding scheme that allows a data collector to recover all original data by querying only a small random subset of storage nodes from each cluster. The size of such a subset is equal to the number of data-generating nodes that the cluster serves. When the clustering structure of the storage nodes is unknown, we show that recovering of the original data is still possible if a random subset of the righ...