Data-driven studies of magnetic two-dimensional materials