fix(script): Fix screening numbers

This commit is contained in:
Marty Oehme 2024-02-21 17:24:13 +01:00
parent 5f94649c8f
commit 621da670a8
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A

View file

@ -417,17 +417,25 @@ and the sources will be added to the sample to undergo the same screening proces
#| echo: false #| echo: false
#| output: asis #| output: asis
FULL_RAW_SAMPLE_NOTHING_REMOVED = 2396
FULL_SAMPLE_DUPLICATES_REMOVED = 2381
nr_database_query_raw = len(bib_sample_raw_db.entries) nr_database_query_raw = len(bib_sample_raw_db.entries)
nr_out_duplicates = FULL_RAW_SAMPLE_NOTHING_REMOVED - FULL_SAMPLE_DUPLICATES_REMOVED nr_snowballing_raw = 2240
nr_other_sources = (FULL_SAMPLE_DUPLICATES_REMOVED + nr_out_duplicates) - nr_database_query_raw
all_keywords = [entry["keywords"] for entry in bib_sample.entries if "keywords" in entry.fields_dict.keys()] all_keywords = [entry["keywords"] for entry in bib_sample.entries if "keywords" in entry.fields_dict.keys()]
nr_database_deduplicated = len([1 for kw in all_keywords if "sample::database" in kw])
nr_snowballing_deduplicated = len([1 for kw in all_keywords if "sample::snowballing" in kw])
nr_out_superseded = len([1 for kw in all_keywords if "out::superseded" in kw]) nr_out_superseded = len([1 for kw in all_keywords if "out::superseded" in kw])
nr_out_title = len([1 for kw in all_keywords if "out::title" in kw])
nr_out_abstract = len([1 for kw in all_keywords if "out::abstract" in kw]) FULL_RAW_SAMPLE_NOTHING_REMOVED = nr_database_query_raw + nr_snowballing_raw
nr_out_fulltext = len([1 for kw in all_keywords if "out::full-text" in kw]) FULL_SAMPLE_DUPLICATES_REMOVED = nr_database_deduplicated + nr_snowballing_deduplicated + nr_out_superseded
NON_ZOTERO_CAPTURE_TITLE_REMOVAL = 1150
NON_ZOTERO_CAPTURE_ABSTRACT_REMOVAL = 727
NON_ZOTERO_CAPTURE_FULLTEXT_REMOVAL = 348
nr_out_duplicates = FULL_RAW_SAMPLE_NOTHING_REMOVED - FULL_SAMPLE_DUPLICATES_REMOVED
nr_out_title = len([1 for kw in all_keywords if "out::title" in kw]) + NON_ZOTERO_CAPTURE_TITLE_REMOVAL
nr_out_abstract = len([1 for kw in all_keywords if "out::abstract" in kw]) + NON_ZOTERO_CAPTURE_ABSTRACT_REMOVAL
nr_out_fulltext = len([1 for kw in all_keywords if "out::full-text" in kw]) + NON_ZOTERO_CAPTURE_FULLTEXT_REMOVAL
nr_out_language = len([1 for kw in all_keywords if "out::language" in kw]) nr_out_language = len([1 for kw in all_keywords if "out::language" in kw])
nr_extraction_done = len([1 for kw in all_keywords if "done::extracted" in kw]) nr_extraction_done = len([1 for kw in all_keywords if "done::extracted" in kw])
@ -441,15 +449,15 @@ print(f"""
%%| fig-width: 6 %%| fig-width: 6
flowchart TD; flowchart TD;
search_db["Records identified through database searching (n={nr_database_query_raw})"] --> starting_sample; search_db["Records identified through database searching (n={nr_database_query_raw})"] --> starting_sample;
search_prev["Records identified through other sources (n={nr_other_sources})"] --> starting_sample["Starting sample (n={FULL_RAW_SAMPLE_NOTHING_REMOVED})"]; search_prev["Records identified through other sources (n={nr_snowballing_raw})"] --> starting_sample["Starting sample (n={FULL_RAW_SAMPLE_NOTHING_REMOVED})"];
starting_sample -- "Duplicate removal ({nr_out_duplicates+nr_out_superseded} removed) "--> dedup["Records after duplicates removed (n={len(bib_sample.entries)})"]; starting_sample -- "Duplicate removal ({nr_out_duplicates+nr_out_superseded} removed) "--> dedup["Records after duplicates removed (n={FULL_SAMPLE_DUPLICATES_REMOVED})"];
dedup -- "Title screening ({nr_out_title} excluded)" --> title_screened["Records after titles screened (n={len(bib_sample.entries) - nr_out_title})"]; dedup -- "Title screening ({nr_out_title} excluded)" --> title_screened["Records after titles screened (n={FULL_SAMPLE_DUPLICATES_REMOVED - nr_out_title})"];
title_screened -- "Abstract screening ({nr_out_abstract} excluded)"--> abstract_screened["Records after abstracts screened (n={len(bib_sample.entries)-nr_out_title-nr_out_abstract})"]; title_screened -- "Abstract screening ({nr_out_abstract} excluded)"--> abstract_screened["Records after abstracts screened (n={FULL_SAMPLE_DUPLICATES_REMOVED-nr_out_title-nr_out_abstract})"];
abstract_screened -- " Language screening ({nr_out_language} excluded) "--> language_screened["Records after language screened (n={len(bib_sample.entries)-nr_out_title-nr_out_abstract-nr_out_language})"]; abstract_screened -- " Language screening ({nr_out_language} excluded) "--> language_screened["Records after language screened (n={FULL_SAMPLE_DUPLICATES_REMOVED-nr_out_title-nr_out_abstract-nr_out_language})"];
language_screened -- " Full-text screening ({nr_out_fulltext} excluded) "--> full-text_screened["Full-text articles assessed for eligibility (n={nr_extraction_done})"]; language_screened -- " Full-text screening ({nr_out_fulltext} excluded) "--> full-text_screened["Full-text articles assessed for eligibility (n={nr_extraction_done})"];
{t3} {t3}
@ -478,7 +486,7 @@ For a full list of validity ranks, see @apptbl-validity-external and @apptbl-val
nr_relevant = len([1 for kw in all_keywords if "relevant" in kw]) nr_relevant = len([1 for kw in all_keywords if "relevant" in kw])
``` ```
The query execution results in an initial sample of `{python} nr_database_query_raw` potential studies identified from the database search as well as `{python} nr_other_sources` potential studies from other sources, leading to a total initial number of `{python} FULL_RAW_SAMPLE_NOTHING_REMOVED`. The query execution results in an initial sample of `{python} nr_database_query_raw` potential studies identified from the database search as well as `{python} nr_snowballing_raw` potential studies from other sources, leading to a total initial number of `{python} FULL_RAW_SAMPLE_NOTHING_REMOVED`.
This accounts for all identified studies without duplicate removal, without controlling for literature that has been superseded or applying any other screening criteria. This accounts for all identified studies without duplicate removal, without controlling for literature that has been superseded or applying any other screening criteria.
Of these, `{python} nr_relevant` have been identified as potentially relevant studies for the purposes of this scoping review, from which `{python} nr_extraction_done` have been extracted. Of these, `{python} nr_relevant` have been identified as potentially relevant studies for the purposes of this scoping review, from which `{python} nr_extraction_done` have been extracted.