A data driven approach for understanding protein folding