generate aggregations in an independent script