Commit graph

36 commits

Author SHA1 Message Date
Marty Oehme 0d723dbfdf
chore(code): Rename prisma calculation variables
Renamed intermediate calculation vars from long and redundant names to
slightly shorter and more coherent versions.
2024-07-16 17:53:37 +02:00
Marty Oehme b230228095
chore(code): Remove unnecessary seaborn import 2024-07-16 17:47:41 +02:00
Marty Oehme c5df5c01a2
chore(repo): Move yml files to extracted data dir 2024-07-16 17:46:31 +02:00
Marty Oehme 3ec7dcd1bb
chore(repo): Move zotero references to reference dir 2024-07-16 17:46:31 +02:00
Marty Oehme 4f9acd0816
chore(repo): Move references to reference data dir
Begin restructuring data dir by separating out references into their own
data sub-dir containing only references and bibtex files.
2024-07-16 15:59:41 +02:00
Marty Oehme b4730f6ea8
fix(repo): Rename all references to data and output dir 2024-07-15 21:43:30 +02:00
Marty Oehme 284a3b9281
chore(code): Move dataframe generation to module 2024-07-15 21:15:09 +02:00
Marty Oehme 38254d1605
feat(code): Add prisma calculation 2024-07-15 21:11:53 +02:00
Marty Oehme 0d05ed981a
chore(code): Create globals singleton 2024-07-15 20:42:57 +02:00
Marty Oehme d2c25a9033
chore(code): Refactor data preparation into process module 2024-07-15 20:42:11 +02:00
Marty Oehme 740350eacd
chore(code): Refactor data processing into module 2024-07-15 20:40:50 +02:00
Marty Oehme d5926b2e88
chore(code): Move validity strength bins to validity 2024-07-15 19:34:20 +02:00
Marty Oehme cc9749a011
feat(code): Update correct internal validity ranking regexes 2024-02-21 11:30:47 +01:00
Marty Oehme 51b747a058
fix(data): Fix regions for world economy 2024-02-18 19:00:36 +01:00
Marty Oehme 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
Marty Oehme 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
Marty Oehme 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
Marty Oehme 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
Marty Oehme 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
Marty Oehme 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
Marty Oehme 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
Marty Oehme 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
Marty Oehme 588cf4a3c9
fix(code): Differentiate between national and census data 2024-02-14 22:35:35 +01:00
Marty Oehme cc472acdee
fix(code): Add logistic regression to regressions 2024-02-14 20:35:10 +01:00
Marty Oehme 227adb33f8
feat(script): Begin using validities for visualization 2024-02-14 17:30:04 +01:00
Marty Oehme 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
Marty Oehme 157d437611
chore(code): Fix setting with copy warning 2024-02-14 16:18:40 +01:00
Marty Oehme 72e11a67d7
chore(code): Format code 2024-02-14 16:02:42 +01:00
Marty Oehme a0794c6d09
feat(code): Add validity calculation 2024-02-14 15:48:47 +01:00
Marty Oehme 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
Marty Oehme 4dd8e13d6b
chore(repo): Rename data loading module 2024-01-10 17:27:48 +01:00
Marty Oehme 75717f837c
chore(code): By default use all processed data 2023-12-22 19:25:24 +01:00
Marty Oehme 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
Marty Oehme 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
Marty Oehme 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
Marty Oehme a854794a43
chore(repo): Move scripts to src directory 2023-12-07 21:16:12 +01:00