fix(code): Ensure all studies are part of intervention df

Some studies were missing crucial fields (prelim studies mostly) which means they
are dropped from being counted in 'by_intervention' aggregation. While
ultimately those will have to have their fields filled correctly, for now we can
simply ensure all studies are aggregated correctly per intervention.
This commit is contained in:
Marty Oehme 2024-02-15 16:35:37 +01:00
parent 62e3fc94a2
commit d4aa40b277
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A

View file

@ -565,7 +565,9 @@ analysing the main findings per policy area, as well as underscore individual st
#| fig-cap: Available studies by primary type of intervention
by_intervention = (
bib_df.groupby(["author", "year", "title", "design", "method", "representativeness", "citation"])
bib_df
.fillna("")
.groupby(["author", "year", "title", "design", "method", "representativeness", "citation"])
.agg(
{
"intervention": lambda _col: "; ".join(_col),