Factored out some of the functions of creating map elemented so they can be reused with other datasets.