Code to reduce full 22GB dataset