function to make a row-map dataset