def _get_area_url(**kwargs):
    """Get url for QCEW data by area.

    Parameters
    ----------
    year : string
        'YYYY'
    qtr : string
        Use `a` for annual averages.
    area : string
        For all area codes and titles see:
        http://www.bls.gov/cew/doc/titles/area/area_titles.htm.

    Returns
    -------
    string
        URL that will be used for main function.

    """
    for arg in ['year', 'qtr', 'area']:
        if arg not in kwargs:
            raise ValueError('Must specify {}'.format(arg))
    url = 'http://data.bls.gov/cew/data/api/[YEAR]/[QTR]/area/[AREA].csv'
    url = url.replace('[YEAR]', kwargs.get('year'))
    url = url.replace('[QTR]', kwargs.get('qtr').lower())
    url = url.replace('[AREA]', kwargs.get('area').upper())
    return url
