Implement a basic algorithm for sorting data.
Implement bubble sort for an array of integers. Return a new array containing the values in ascending order. Do not use Python's built-in sorting functions.
Input: A list of integers.
Output: A sorted list of integers.
def sort_data(data):