A data-driven approach to modelling structures