Add importance factor
This commit is contained in:
parent
bd804f1464
commit
c75e11204a
8
wsgi.py
8
wsgi.py
@ -249,7 +249,7 @@ def convert_fig_to_svg(fig: plt.Figure) -> str:
|
||||
|
||||
|
||||
@app.route("/")
|
||||
@cache.cached()
|
||||
@cache.cached(query_string=True)
|
||||
def tables():
|
||||
def _print_as_html(df: pd.DataFrame):
|
||||
df = df.astype({"Digitale Befragung": "Int32"})
|
||||
@ -281,9 +281,13 @@ def tables():
|
||||
output_str.append(tfoot)
|
||||
output_str.append(table[idx:])
|
||||
|
||||
importance_factor = float(request.args.get("importance"))
|
||||
if not importance_factor:
|
||||
importance_factor = 1.0
|
||||
|
||||
output_str = []
|
||||
|
||||
fig, df, df_state, timestamp = create_fig()
|
||||
fig, df, df_state, timestamp = create_fig(importance_factor=importance_factor)
|
||||
svg_string = convert_fig_to_svg(fig)
|
||||
plt.close()
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user