aggregate_data function

Aggregate source data