使用python中的Plotly-Dash通过年份滑块创建具有更改值的地图

时间:2019-01-13 21:25:39

标签: python plotly-dash

使用破折号和python,我拥有一个具有多年功能的数据框,我想创建一个地图,在我们更改年份的幻灯片时更改其点。

          year1    year2     year3
feature1    2        4          5
feature2    2        5          7
feature3    3        4          3

我首先开始执行选择正确值的功能;

@app.callback(dash.dependencies.Output('data-loading', 'children'),
          [dash.dependencies.Input('year', 'value'),
           dash.dependencies.Input('feature', 'value')])

def load_data(year, feature):

    filters = {"year": selected_year,
           "feature": selected_type}

    print(pd.iloc[feature][year])
    return pd.iloc[feature][year]

任何人都可以帮助我,或者给我看一个类似的项目

0 个答案:

没有答案