Load Landesbezirk table
This commit is contained in:
parent
ca64496aba
commit
4e8a8b50d3
22
wsgi.py
22
wsgi.py
@ -9,12 +9,20 @@ app = Flask(__name__)
|
|||||||
@app.route("/")
|
@app.route("/")
|
||||||
def tables(
|
def tables(
|
||||||
url: str = "https://beschaeftigtenbefragung.verdi.de/",
|
url: str = "https://beschaeftigtenbefragung.verdi.de/",
|
||||||
default_tag: str = "bez_data_2",
|
|
||||||
):
|
):
|
||||||
tag = request.args.get("tag")
|
df = construct_dataframe(
|
||||||
if tag is None:
|
url=url,
|
||||||
tag = default_tag
|
tag="bez_data_0",
|
||||||
df = construct_dataframe(url=url, tag=tag, grouped=False)
|
grouped=False,
|
||||||
|
special_tag="stud",
|
||||||
|
)
|
||||||
|
|
||||||
|
df_state = construct_dataframe(
|
||||||
|
url=url,
|
||||||
|
tag="bez_data_2",
|
||||||
|
grouped=False,
|
||||||
|
no_processing=True
|
||||||
|
)
|
||||||
|
|
||||||
output_str = []
|
output_str = []
|
||||||
|
|
||||||
@ -47,9 +55,7 @@ def tables(
|
|||||||
output_str.append(tfoot)
|
output_str.append(tfoot)
|
||||||
output_str.append(table[idx:])
|
output_str.append(table[idx:])
|
||||||
|
|
||||||
_print_as_html(
|
_print_as_html(df_state)
|
||||||
df.groupby("Bundesland", as_index=False)[["Digitale Befragung"]].sum()
|
|
||||||
)
|
|
||||||
_print_as_html(df)
|
_print_as_html(df)
|
||||||
|
|
||||||
return render_template("base.html", tables="\n".join(output_str))
|
return render_template("base.html", tables="\n".join(output_str))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user