From 3b6ed7a79ba2bebabf9a456f81769bed279b48fe Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Sat, 9 Dec 2023 18:50:43 +0100 Subject: [PATCH] feat(code): Add quick data querying notebook Added a notebook which has the sole point of quickly allowing me to grab and look at the data of the processed sample I am creating. I.e. quickly list and uniq all interventions/outcomes/inequalities, doing a tiny calculation or similar. --- 00-notebooks/yml-grab.qmd | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 00-notebooks/yml-grab.qmd diff --git a/00-notebooks/yml-grab.qmd b/00-notebooks/yml-grab.qmd new file mode 100644 index 0000000..9d6feb4 --- /dev/null +++ b/00-notebooks/yml-grab.qmd @@ -0,0 +1,23 @@ +--- +bibliography: 02-data/supplementary/lib.bib +title: Grab yml +--- + +```{python} +import pandas as pd +from src import data + +df = data.from_yml() +``` + +Get interventions: + +```{python} +df['intervention'].str.split(";").explode().str.strip().value_counts() +``` + +Get inequalities: + +```{python} +df['inequality'].str.split(";").explode().str.strip().value_counts() +```