import requests


def get_csv_zip_url(table_id)->str:
    """
    Returns the url for a table_id to extract raw data from Stats Canada.

    Parameters
    --------
    table_id : int
        Statistics Canada Table ID
    
    Returns
    --------
    str
        http address for downloading zipped csv file

    References
    --------
    Statistics Canada developer guide:
        https://www.statcan.gc.ca/eng/developers/wds/user-guide#a12-6
    """
    stats_can_url = 'https://www150.statcan.gc.ca/t1/wds/rest/'
    func = 'getFullTableDownloadCSV/'
    table_id = str(table_id) + '/'
    language = 'en'
    api_call = stats_can_url + func + table_id + language
    response = requests.get(api_call)
    
    return response.json()['object']