aboutsummaryrefslogtreecommitdiff
path: root/reproduce/analysis
diff options
context:
space:
mode:
Diffstat (limited to 'reproduce/analysis')
-rw-r--r--reproduce/analysis/make/analysis-1.mk19
1 files changed, 15 insertions, 4 deletions
diff --git a/reproduce/analysis/make/analysis-1.mk b/reproduce/analysis/make/analysis-1.mk
index 9d0018e..f739306 100644
--- a/reproduce/analysis/make/analysis-1.mk
+++ b/reproduce/analysis/make/analysis-1.mk
@@ -47,9 +47,10 @@ $(mk20tab3): $(indir)/menke20.xlsx | $(a1dir)
# count as a delimter.
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
- 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)}' \
+ echo "# Column 3: NUM_PAPERS_WITH_TOOLS [counter, i16] Number of papers with an identified tool." >> $@.tmp
+ echo "# Column 4: NUM_ID_TOOLS [counter, i16] Number of software/tools that were identified." >> $@.tmp
+ echo "# Column 5: JOURNAL_NAME [string, str150] Name of journal." >> $@.tmp
+ awk 'NR>1{printf("%-10d%-10d%-10d%-10d %s\n", $$2, $$3, $$3*$$NF, $$(NF-1), $$1)}' \
FPAT='([^,]+)|("[^"]+")' $(indir)/$$base.csv >> $@.tmp
# Set the temporary file as the final target. This was done so if
@@ -60,6 +61,16 @@ $(mk20tab3): $(indir)/menke20.xlsx | $(a1dir)
+############################
+# Recreate Figure 1C of Menke+20.
+############################
+
+# awk '!/^#/{all[$1]+=$2; id[$1]+=$3} END{for(year in all){print year, id[year]/all[year]}}' menke20-table-3.txt.tmp
+############################
+
+
+
+
# Main LaTeX macro file
$(mtexdir)/analysis-1.tex: $(mk20tab3) | $(mtexdir)
@@ -73,6 +84,6 @@ $(mtexdir)/analysis-1.tex: $(mk20tab3) | $(mtexdir)
# 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}' \
+ v=$$(awk 'BEGIN{FIELDWIDTHS="41 10000"} !/^#/{print $$2}' \
$(mk20tab3) | uniq | wc -l)
echo "\newcommand{\menkenumjournals}{$$v}" >> $@