circularise function

Circularise a dataset