def calc_ttr(df_ttr):
    """Calculates travel time reliability.
    Args: df_ttr, a pandas dataframe.
    Returns: df_ttr, a pandas dataframe with new ttr column.
    """
    # Working vehicle occupancy assumptions:
    VOCt = 1
    df_ttr['VOLt'] = df_ttr['pct_truck'] * df_ttr['dir_aadt'] * 365
    df_ttr['ttr'] = df_ttr['miles'] * df_ttr['VOLt'] * VOCt
    
    return df_ttr