chore(code): Move dataframe generation to module
This commit is contained in:
parent
38254d1605
commit
284a3b9281
3 changed files with 32 additions and 15 deletions
19
article.qmd
19
article.qmd
|
@ -38,12 +38,25 @@ crossref: # to fix the appendix crossrefs being separate from main
|
|||
latex-list-of-description: Appendix B Table
|
||||
---
|
||||
|
||||
|
||||
```{python}
|
||||
#| label: prep-data
|
||||
#| label: standard-imports
|
||||
#| echo: false
|
||||
#| output: false
|
||||
{{< include 01-codechunks/_prep-data.py >}}
|
||||
import src.globals as g
|
||||
from IPython.display import display, Markdown, HTML
|
||||
import numpy as np
|
||||
import pandas as pd
|
||||
from matplotlib import pyplot as plt
|
||||
from tabulate import tabulate
|
||||
import seaborn as sns
|
||||
sns.set_style("whitegrid")
|
||||
```
|
||||
|
||||
```{python}
|
||||
#| label: load-dataframes
|
||||
#| echo: false
|
||||
#| output: false
|
||||
from src.process.generate_dataframes import df, df_by_intervention, validities
|
||||
```
|
||||
|
||||
{{< portrait >}}
|
||||
|
|
|
@ -22,10 +22,24 @@ crossref:
|
|||
---
|
||||
|
||||
```{python}
|
||||
#| label: prep-data
|
||||
#| label: standard-imports
|
||||
#| echo: false
|
||||
#| output: false
|
||||
{{< include 01-codechunks/_prep-data.py >}}
|
||||
import src.globals as g
|
||||
from IPython.display import display, Markdown, HTML
|
||||
import numpy as np
|
||||
import pandas as pd
|
||||
from matplotlib import pyplot as plt
|
||||
from tabulate import tabulate
|
||||
import seaborn as sns
|
||||
sns.set_style("whitegrid")
|
||||
```
|
||||
|
||||
```{python}
|
||||
#| label: load-dataframes
|
||||
#| echo: false
|
||||
#| output: false
|
||||
from src.process.generate_dataframes import df, df_by_intervention, validities
|
||||
```
|
||||
|
||||
<!-- pagebreak to separate from TOC -->
|
||||
|
|
|
@ -1,18 +1,8 @@
|
|||
from pathlib import Path
|
||||
import os
|
||||
import re
|
||||
## standard imports
|
||||
from IPython.display import display, Markdown, HTML
|
||||
import numpy as np
|
||||
import pandas as pd
|
||||
from matplotlib import pyplot as plt
|
||||
import seaborn as sns
|
||||
from tabulate import tabulate
|
||||
import bibtexparser
|
||||
import src.globals as g
|
||||
|
||||
sns.set_style("whitegrid")
|
||||
|
||||
## Creates 3 important data structures:
|
||||
# df: The main dataframe containing all final sample studies
|
||||
# df_by_intervention: The same dataframe but split up by individual interventions per study
|
Loading…
Reference in a new issue