aboutsummaryrefslogtreecommitdiff
path: root/reproduce/analysis
diff options
context:
space:
mode:
authorMohammad Akhlaghi <mohammad@akhlaghi.org>2020-02-16 04:03:20 +0000
committerMohammad Akhlaghi <mohammad@akhlaghi.org>2020-02-16 04:03:20 +0000
commitf51082b27e47e552658000689161c150d9c9a70e (patch)
tree3619594b8a977f64dcdf5e31eb36e580e69acb58 /reproduce/analysis
parent13cb65a2eab708b0bd4777601331b3e83e96beac (diff)
Two values from the input dataset are now written into the paper
This was done just to get going with describing the analysis process.
Diffstat (limited to 'reproduce/analysis')
-rw-r--r--reproduce/analysis/make/menke2020.mk17
1 files changed, 15 insertions, 2 deletions
diff --git a/reproduce/analysis/make/menke2020.mk b/reproduce/analysis/make/menke2020.mk
index df87080..4dd9897 100644
--- a/reproduce/analysis/make/menke2020.mk
+++ b/reproduce/analysis/make/menke2020.mk
@@ -48,7 +48,8 @@ $(mk20tab3): $(indir)/menke-etal-2020.xlsx | $(mk20dir)
echo "# Column 1: YEAR [counter, i16] Year of journal's publication." > $@.tmp
echo "# Column 2: NUM_PAPERS [counter, i16] Number of studied papers in that journal." >> $@.tmp
echo "# Column 3: NUM_ID_TOOLS [counter, i16] Number of software/tools that were identified." >> $@.tmp
- awk 'NR>1{printf("%-6d%-5d%d\n", $$2, $$3, $$(NF-1)*$$NF)}' \
+ echo "# Column 4: JOURNAL_NAME [string, str150] Name of journal." >> $@.tmp
+ awk 'NR>1{printf("%-10d%-10d%-10d %s\n", $$2, $$3, $$(NF-1)*$$NF, $$1)}' \
FPAT='([^,]+)|("[^"]+")' $(indir)/$$base.csv >> $@.tmp
# Set the temporary file as the final target. This was done so if
@@ -62,4 +63,16 @@ $(mk20tab3): $(indir)/menke-etal-2020.xlsx | $(mk20dir)
# Main LaTeX macro file
$(mtexdir)/menke2020.tex: $(mk20tab3) | $(mtexdir)
- touch $@
+
+ # Count the total number of papers in their study.
+ v=$$(awk '!/^#/{c+=$$2} END{print c}' $(mk20tab3))
+ echo "\newcommand{\menkenumpapers}{$$v}" > $@
+
+ # Count how many unique journals there were in the study. Note that
+ # the `31' comes because we put 10 characters for each numeric
+ # column and separated the last numeric column from the string
+ # column with a space. If the number of numeric columns change in
+ # the future, the `31' also has to change.
+ v=$$(awk 'BEGIN{FIELDWIDTHS="31 10000"} !/^#/{print $$2}' \
+ $(mk20tab3) | uniq | wc -l)
+ echo "\newcommand{\menkenumjournals}{$$v}" >> $@