Inferring social network structure in ecological systems from spatio-temporal data streams