Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -13,6 +13,8 @@ import numpy as np
|
|
13 |
import seaborn as sns
|
14 |
from matplotlib import pyplot as plt
|
15 |
import pickle
|
|
|
|
|
16 |
|
17 |
mean_citation_list = []
|
18 |
|
@@ -50,6 +52,10 @@ def generate_plot_maoc(input_maoc):
|
|
50 |
ax.set_xlabel("mean Age of Citation(mAoC)",fontsize=15)
|
51 |
ax.set_ylabel("Number of papers",fontsize=15)
|
52 |
ax.tick_params(axis='both', which='major', labelsize=12)
|
|
|
|
|
|
|
|
|
53 |
return plt
|
54 |
|
55 |
# sent a request
|
|
|
13 |
import seaborn as sns
|
14 |
from matplotlib import pyplot as plt
|
15 |
import pickle
|
16 |
+
from scipy.stats import percentileofscore
|
17 |
+
|
18 |
|
19 |
mean_citation_list = []
|
20 |
|
|
|
52 |
ax.set_xlabel("mean Age of Citation(mAoC)",fontsize=15)
|
53 |
ax.set_ylabel("Number of papers",fontsize=15)
|
54 |
ax.tick_params(axis='both', which='major', labelsize=12)
|
55 |
+
percentile_of_input_maoc = percentileofscore(mean_citation_list, input_maoc)
|
56 |
+
percentile_of_input_maoc = round(percentile_of_input_maoc, 2)
|
57 |
+
title = f'The mAoC of your paper in greater than mAoC of {percentile_of_input_maoc}% of all the papers \n in our database (papers published until 2021 years)'
|
58 |
+
plt.title(title, fontsize=16)
|
59 |
return plt
|
60 |
|
61 |
# sent a request
|