Code for Section 2 of the paper "Data-driven exploration and continuum modeling of dislocation networks".