DallasFormulaRacing / DallasFormulaRacing/PowertrainLib

Flask Callback Processing

Open
#33 0 comments 0 reactions 1 assignee Claimed by @Halbedaiwi View on GitHub
dashboard Hard Task
Dominant language
Python
Stars
11
Forks
2
PR merge metrics
No merged PRs in 30d

Description

Using [Example 2](https://dash.plotly.com/sharing-data-between-callbacks) of the plotly documentation. Implement a step that takes in the current run id callback and outputs a dataframe of all mongo data in that run id. This will reduce the amount of database calls that need to be performed for simple operations.

Example code would work similar to this
```py
@callback(
Output('testing-data', 'data'),
Input('testing-day', 'value'))
def load_data(value):
mongo_data = mongodb.find_documents() # find everything in {testing-day}
return json.dumps(mongo_data)

@callback(
Output('t', 'figure'),
Input('testing-data', 'data'))
def update_graph_1(jsonified_cleaned_data):
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.