feat(script): Add structural findings table

This commit is contained in:
Marty Oehme 2024-07-29 09:50:05 +02:00
parent 6ece5f2735
commit 7b31ac15f6
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A

View file

@ -530,6 +530,54 @@ but in turn increases overall labour force participation and employment.[^ciepli
## Structural factors
{{< portrait >}}
::: {#tbl-findings-structural}
```{python}
# | label: tbl-findings-structural
from src.model import validity
from src.model.validity import strength_for # Careful: ruff org imports will remove
findings_structural = pd.read_csv(f"{g.SUPPLEMENTARY_DATA}/findings-structural.csv")
fd_df = validity.add_to_findings(findings_structural, df_by_intervention)
outp = Markdown(
tabulate(
fd_df[
[
"area of policy",
"internal_validity",
"external_validity",
"findings",
"channels",
]
].fillna(""),
showindex=False,
headers=[
"area of policy",
"internal strength",
"external strength",
"main findings",
"channels",
],
tablefmt="grid",
)
)
del findings_structural, fd_df
outp # type: ignore[ReportUnusedExpression]
```
Note: Each main finding is presented with an internal strength of evidence and an external strength of evidence which describe the combined validities of the evidence base for the respective finding.
Validities are segmented to a weak (-) evidence base under a validity ranking of `{python} strength_for(r"\+")`,
evidential (+) from `{python} strength_for(r"\+")` and under `{python} strength_for(r"\++")` and strong evidence base (++) for `{python} strength_for(r"\++")` and above.
Summary of main findings for structural policies
:::
{{< landscape >}}
## Agency factors
# Robustness of evidence