带模板的自动仪表板框架
turbo-dash的Python项目详细描述
turbo_破折号
带模板的自动仪表板框架
快速启动
pip install turbo-dash
目标
turbo_dash
项目的目标是为plotly dash创建一个包装器,它允许
缺乏经验的python开发人员可以快速创建一个简单、干净、交互式、易于操作的仪表板。在
OKRs公司
Objectives | Key Results | Status |
---|---|---|
1. `turbo_dash` requires minimal python, plotly, or dash knowledge to create a fully functional dashboard, as measured by: | i. less than 10 lines of code required per object | grey |
ii. full documentation with examples for every developer-facing object | grey | |
iii. a suite of user-friendly templates that design the layout for the developer | grey | |
2. `turbo_dash` executes commands quickly and displays minimal lag between input and output, as measured by: | i. less than 1s load times for datasets up to 1M rows on a standard laptop CPU | grey |
3. `turbo_dash` doesn't break, as measured by: | i. comprehensive test suite | grey |
ii. full type-hinting with no errors shown by `mypy` | grey |
示例应用程序
./app.py
importturbo_dash# grab our datadf=turbo_dash.data.gapminder()# Here's where all the magic happens. This creates our dashboard.turbo_dashboard=turbo_dash.turbo_dashboard(# templatetemplate='turbo-dark',# dashboard pagesdashboard_page_list=[# App 1turbo_dash.turbo_dashboard_page(# page informationurl='/app1',name='App 1',# datadf=df,# setting our data at the page level allows us to use different datasets for each page# menu filters, i.e. dropdown, slider, etcmenu_filter_list=[turbo_dash.turbo_filter(filter_type='Dropdown-multi',column='country'),turbo_dash.turbo_filter(filter_type='RangeSlider',column='year'),],# outputs, i.e. graphs, images, etcoutput_list=[# bar graph of population vs yearturbo_dash.turbo_output(output_type='bar',x='year',y='pop',color='continent',hover_name='country',),# line graph of life expectancy vs year with an input to change the y axis to a different columnturbo_dash.turbo_output(output_type='line',x='year',y='lifeExp',color='country',chart_input_list=['y'],),],),# App 2turbo_dash.turbo_dashboard_page(# page informationurl='/app2',name='App 2',# datadf=df,# setting our data at the page level allows us to use different datasets for each page# menu filters, i.e. dropdown, slider, etcmenu_filter_list=[turbo_dash.turbo_filter(filter_type='Checklist',column='continent'),],# outputs, i.e. graphs, images, etcoutput_list=[# line graph of gdpPercap vs yearturbo_dash.turbo_output(output_type='line',x='year',y='gdpPercap',color='country',),],),# Playgroundturbo_dash.turbo_dashboard_page(# page informationurl='/playground',name='Playground',# datadf=df,# setting our data at the page level allows us to use different datasets for each page# menu filters, i.e. dropdown, slider, etcmenu_filter_list=[turbo_dash.turbo_filter(filter_type='Checklist',column='continent'),turbo_dash.turbo_filter(filter_type='Dropdown-multi',column='country'),turbo_dash.turbo_filter(filter_type='RangeSlider',column='year'),],# outputs, i.e. graphs, images, etcoutput_list=[# line graph of gdpPercap vs yearturbo_dash.turbo_output(output_type='line',x='year',y='gdpPercap',color='country',chart_input_list=['output_type','x','y','z','color','size','hover_name','hover_data','locations','locationmode','projection',],),],),],)# Execute the code in a development environment. For deploying in production, see the "Deploying in Production" # section of the README here: https://github.com/turbo3136/turbo_dash/blob/master/README.mdif__name__=='__main__':server=turbo_dashboard.run_dashboard(app_name=__name__)
截图
附录1:
游乐场:
在生产中部署
我所做的(可能不稳定和愚蠢):
- 项目
标签: