Relocated the function that get NY data.

Factorized function in order to enable reuse for different datasets.