Commit graph

25 commits

Author SHA1 Message Date
d5926b2e88
chore(code): Move validity strength bins to validity 2024-07-15 19:34:20 +02:00
cc9749a011
feat(code): Update correct internal validity ranking regexes 2024-02-21 11:30:47 +01:00
51b747a058
fix(data): Fix regions for world economy 2024-02-18 19:00:36 +01:00
b453afd112
feat(code): Allow custom strength of evidence bins
For display in findings summaries we can now allow arbitrary strength
of evidence binning. We simply pass in a dict with the strength (as
float) as the key and the string-representation that should appear
in the table as value.
2024-02-18 16:59:01 +01:00
42222447dc
refactor(code): Move observation data prep to src
Moved the overall metadata, country grouping code to the src directory
somewhat trimming the prep code in the beginning of the manuscript
itself.
2024-02-17 17:30:58 +01:00
e032a5c192
refactor(code): Extract internal validity ranking keywords
Extracted keywords into dict which can be extended with either keywords
or rankings as needed, providing more flexibility.
2024-02-16 17:59:09 +01:00
4e865ee2b5
feat(code): Warn if findings studies do not match available
Since we add the studies that bring findings for the finding tables manually,
this ensures that we spot any mistakes when entering them, or similar
discrepancies on the other side of the raw data.
2024-02-16 17:58:02 +01:00
8cd6dc790d
refactor(code): Move zotero live citations to quarto ext
Instead of it lying in the src directory (where, reasonably, only python
data extraction, processing and modelling code should lie), I turned
the retorque filter into a simple quarto extension.
Could reasonably be repackaged separately from this repo since I believe
other people could profit off it.
2024-02-16 12:06:43 +01:00
fac7d4c86a
refactor(code): Split validity calc and matrix extract
Validity calculation belongs to the modelling, so we put it into the
validity module.

Extracting our matrix is a processing step so we made its own matrix
module and put it in their.
Should hopefully provide better separation of concerns going forward.
2024-02-16 11:25:19 +01:00
8333bbe9be
refactor(code): Rename validity module
From strength of findings to the more general validity module, which can then
in turn contain the 'add_to_findings' function which unsurprisingly adds
validities to findings. Makes more sense to me.
2024-02-16 10:24:31 +01:00
953720ce54
refactor(code): Move finding table validities into model module
All findings tables can use the validities functionality to add strength of
evidence (internal/external) to themselves. Generalized the function to
work for any main findings csv (to dataframe) table not just institional
findings.
2024-02-15 16:32:46 +01:00
588cf4a3c9
fix(code): Differentiate between national and census data 2024-02-14 22:35:35 +01:00
cc472acdee
fix(code): Add logistic regression to regressions 2024-02-14 20:35:10 +01:00
227adb33f8
feat(script): Begin using validities for visualization 2024-02-14 17:30:04 +01:00
41b2d651a6
fix(code): Fix live zotero gen with quarto 1.4
Quarto 1.4 does not like a bare 'zotero' metadata frontmatter key with
sub keys for the filter options. This commit updates the zotero-live
citations filter plugin by retorque and changes its configuration so
it takes settings either through the 'zotero' key or, if that one is
not found, through the 'zoterolive' key. Same options.
2024-02-14 17:29:27 +01:00
157d437611
chore(code): Fix setting with copy warning 2024-02-14 16:18:40 +01:00
72e11a67d7
chore(code): Format code 2024-02-14 16:02:42 +01:00
a0794c6d09
feat(code): Add validity calculation 2024-02-14 15:48:47 +01:00
673cf88c13
fix(code): Fix yaml library overwriting
The yaml loader just being called yaml overwrote loading the external
yaml library in the file itself. Simple fix by renaming module to
yml.py.
2024-01-18 11:07:22 +01:00
4dd8e13d6b
chore(repo): Rename data loading module 2024-01-10 17:27:48 +01:00
75717f837c
chore(code): By default use all processed data 2023-12-22 19:25:24 +01:00
7241b62efe
fix(code): Load data script from anywhere
Allow loading the script both through quarto using full absolute path and through
the command line using (I believe) a relative path.
2023-12-14 18:08:13 +01:00
38099c3358
feat(code): Output data as csv to stdout on script run
When running data python script (`src/data.py`) directly through the command line,
we now use pandas to output the collected data directly as a csv to stdout.
Can then be redirected to e.g. a file to save the data in csv format.
2023-12-14 18:06:39 +01:00
ed3d09b3f7
feat(script): Use extracted data for manuscript
For the first time we use the actual final extracted data from relevant studies
to do analysis on instead of just the intermediate Zotero-provided metadata.

We still inject the intermediate metadata where it may be useful (things like
citation counts and keywords) but otherwise switch to the new data.
2023-12-07 22:34:18 +01:00
a854794a43
chore(repo): Move scripts to src directory 2023-12-07 21:16:12 +01:00