download_data function

Download and Process Data Based on Type