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("/")
|
||||
def tables(
|
||||
url: str = "https://beschaeftigtenbefragung.verdi.de/",
|
||||
default_tag: str = "bez_data_2",
|
||||
):
|
||||
tag = request.args.get("tag")
|
||||
if tag is None:
|
||||
tag = default_tag
|
||||
df = construct_dataframe(url=url, tag=tag, grouped=False)
|
||||
df = construct_dataframe(
|
||||
url=url,
|
||||
tag="bez_data_0",
|
||||
grouped=False,
|
||||
special_tag="stud",
|
||||
)
|
||||
|
||||
df_state = construct_dataframe(
|
||||
url=url,
|
||||
tag="bez_data_2",
|
||||
grouped=False,
|
||||
no_processing=True
|
||||
)
|
||||
|
||||
output_str = []
|
||||
|
||||
@ -47,9 +55,7 @@ def tables(
|
||||
output_str.append(tfoot)
|
||||
output_str.append(table[idx:])
|
||||
|
||||
_print_as_html(
|
||||
df.groupby("Bundesland", as_index=False)[["Digitale Befragung"]].sum()
|
||||
)
|
||||
_print_as_html(df_state)
|
||||
_print_as_html(df)
|
||||
|
||||
return render_template("base.html", tables="\n".join(output_str))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user