Data driven analysis of Galactic cosmic rays in the heliosphere: diffusion of cosmic protons and nuclei