def update_figure(n_clicks):
    gear_ratios = GetTransmissionRatios.GetTransmissionRatios.get_trans_ratios(
        final_dict)

    transfercase_final_value = GetTransmissionRatios.GetTransmissionRatios.get_tcase_ratios(
        final_dict)

    traces = []
    # transmissionGearRatio = gear_ratios[-1]

    for diff_gear_ratio in WranglerRatiosLookup.wrangler_diff_ratios():
        df = pd.DataFrame(
            Calculate.JeepGearSplitter.calculateSpeedFromRpm(
                diff_gear_ratio,
                tireDiameter=final_dict['tireDiameter'],
                transmissionGearRatio=gear_ratios[-1],
                transferCaseRatio=transfercase_final_value)).transpose()
        df.columns = ['RPM', 'MPH']

        trace = go.Scatter(x=df['RPM'], y=df['MPH'], name=diff_gear_ratio)
        traces.append(trace)

    layout = go.Layout(title='Differential Gear Ratio Comparisons',
                       xaxis={'title': 'RPM'},
                       yaxis={'title': 'MPH'})

    return {'data': traces, 'layout': layout}
import dash
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Input, Output, State
import WranglerRatiosLookup, Calculate

app = dash.Dash()

jeep_model_list = []
for key, value in WranglerRatiosLookup.jeep_model_dict().items():
    jeep_model_list.append({'label': key, 'value': value})

diff_list = []
for diff in WranglerRatiosLookup.wrangler_diff_ratios():
    diff_list.append({'label': str(diff) + ':1', 'value': diff})

app.layout = html.Div([
    dcc.Input(id='mph-in', value=70, debounce=True, type='float'),
    ' Enter MPH',
    html.Div(id='mph-out'),
    dcc.Input(id='rpm-in', value=2666, debounce=True, type='float'),
    ' Enter RPM',
    html.Div(id='rpm-out'),
    dcc.Dropdown(
        id="jeep-dropdown-id",
        options=jeep_model_list,
        value='jk_2012',
    ),
    html.Div(id='jeep-model-div'),
    dcc.RadioItems(id='tranny_id',
                   options=[{