def get_plot_title(l_table, adm_key, adm_value):
    """Determine plot title for a given area based on adm code and lookup table.

    For ADM0 and ADM1 plots, uses names. For ADM2 plots, the ADM1 name is
    included in addition to the ADM2 name.

    Parameters
    ----------
    l_table : pandas.DataFrame
        Dataframe containing information relating different geographic
        areas
    adm_key : str
        Admin level key
    adm_value : int
        Admin code value for area

    Returns
    -------
    plot_title : str
        Formatted string to use for plot title
    """
    plot_title = l_table.loc[l_table[adm_key] == adm_value][adm_key + "_name"].values[0]

    # If admin2-level, get admin1-level as well
    if adm_key == "adm2":

        admin1_name = l_table.loc[l_table[adm_key] == adm_value]["adm1_name"].values[0]
        plot_title = admin1_name + " : " + plot_title

    return plot_title