distribution of dataset size

This commit is contained in:
whystar 2020-10-09 17:54:22 +08:00
parent f89a323b76
commit a11de07f88
9 changed files with 110 additions and 19 deletions

View File

@ -90,4 +90,41 @@ Publications focusing Tool development account for ***.
\includegraphics[width=0.45\textwidth]{resources/type_statics.png}
\caption{Distribution of publications per research types.}
\label{fig:venue}
\end{figure}
\end{figure}
\subsection{Statistics of datasize}
\begin{figure}[h]
\centering
\includegraphics[width=0.45\textwidth]{resources/prj_numbers.png}
\caption{Distribution of the number of studied projects.}
\label{fig:venue}
\end{figure}
\begin{figure}[h]
\centering
\includegraphics[width=0.45\textwidth]{resources/pr_numbers.png}
\caption{Distribution of the number of studied PRs.}
\label{fig:venue}
\end{figure}
\begin{table}[h]
\centering
\caption{The statistics of dataset size}
\begin{tabular}{@{}l ccccc c @{}}
\toprule
Studied ***&\textbf{Min} &\textbf{25\%} &\textbf{Median} &\textbf{75\%} &\textbf{Max} &\textbf{Mean} \\ \midrule
\#Project & 1 & 1 & 2 & 3 & 35 & 2.30 \\
\#PR & 1 & 2 & 3 & 6 & 148 & 5.68 \\
\#Interviewee & 1 & 2 & 3 & 6 & 148 & 5.68 \\
\#Survey respondents & 1 & 2 & 3 & 6 & 148 & 5.68 \\
\bottomrule
\end{tabular}
\label{tab:dtsize}
\end{table}

View File

@ -57,7 +57,7 @@ The most popular topic is ***.
\subsubsection{Submission practice}
\subsubsection{Factors affecting PR submission}
\begin{table*}[h]
\begin{table*}[h!]
\centering
\caption{Topic studied in previous research. (The number following each topic and category indicating the publication count)}

View File

@ -40,7 +40,7 @@ as well as one of the studies using the metric.
\newcommand{\tabincell}[2]{\begin{tabular}{@{}#1@{}}#2\end{tabular}}
\begin{table*}[htb]
\begin{table*}[h!]
\centering
\caption{Metrics studied in previous research - Part I.}

View File

@ -1,18 +1,2 @@
\section{Dataset size}
\begin{table}[h]
\centering
\caption{The statistics of dataset size}
\begin{tabular}{@{}l ccccc c @{}}
\toprule
Studied ***&\textbf{Min} &\textbf{25\%} &\textbf{Median} &\textbf{75\%} &\textbf{Max} &\textbf{Mean} \\ \midrule
\#Project & 1 & 1 & 2 & 3 & 35 & 2.30 \\
\#PR & 1 & 2 & 3 & 6 & 148 & 5.68 \\
\#Interviewee & 1 & 2 & 3 & 6 & 148 & 5.68 \\
\#Survey respondents & 1 & 2 & 3 & 6 & 148 & 5.68 \\
\bottomrule
\end{tabular}
\label{tab:dtsize}
\end{table}

Binary file not shown.

View File

@ -0,0 +1,70 @@
# coding: utf-8
import xlrd
data = xlrd.open_workbook('../data_extraction.xlsx')
import matplotlib.pyplot as plt
import pandas as pd
import math
def prj_sts():
table = data.sheet_by_name('sheet1')
prjs = table.col_values(8)
prj_counts = []
for prj in prjs[1:]:
prj = prj.strip()
if len(prj) > 0:
while prj.find(",")!=-1:
prj = prj.replace(",","")
print prj
prj_counts.append(int(prj))
print len(prj_counts)
prjct = pd.Series(prj_counts)
print prjct.describe()
# plt.xlabel("The number of publications",fontsize=10)
plt.ylabel("The number of studied projects",fontsize=10)
vp = plt.violinplot([math.log(item) for item in prjct], widths = 0.9, showmeans=False,showmedians=True)
plt.subplots_adjust(left=0.20,bottom=0.1,right=0.98,top=0.98)
plt.savefig("../../resources/prj_numbers",dpi=200)
plt.show()
plt.close()
def pr_sts():
table = data.sheet_by_name('sheet1')
prjs = table.col_values(9)
prj_counts = []
for prj in prjs[1:]:
print prj
prj = prj.strip().lower()
if len(prj) > 0:
while prj.find(",")!=-1:
prj = prj.replace(",","")
while prj.find(" ")!=-1:
prj = prj.replace(" ","")
if prj == "2323 pairs" or prj=="2323pairs":
prj = "4646"
if prj.find("k") != -1:
prj = prj.replace("k","000")
print prj
prj_counts.append(int(prj))
print len(prj_counts)
prjct = pd.Series(prj_counts)
print prjct.describe()
# plt.xlabel("The number of publications",fontsize=10)
plt.ylabel("The number of studied PRs",fontsize=10)
vp = plt.violinplot([math.log(item) for item in prjct], widths = 0.9, showmeans=False,showmedians=True)
plt.subplots_adjust(left=0.20,bottom=0.1,right=0.98,top=0.98)
plt.savefig("../../resources/pr_numbers",dpi=200)
plt.show()
plt.close()
if __name__ == "__main__":
# prj_sts()
pr_sts()

BIN
resources/pr_numbers.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

BIN
resources/prj_numbers.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB