In [1]:
from collections import Counter
In [2]:
filename = "report_8_nonALMACAL_priority.txt"
In [3]:
with open(filename, 'r') as ifile:
wordcount = Counter(ifile.read().split())
In [4]:
list_of_project = []
for item in wordcount:
if len(item) == 14 and item[-1] == 'S': # project_name
list_of_project.append([item, wordcount[item]])
In [5]:
sorted_project = sorted(list_of_project, key=lambda data: data[1])
In [6]:
print("Number of project: ", len(sorted_project))
In [7]:
sorted_from_large = list(reversed(sorted_project))
due to the structure of the report this number can not be used directly as a reference
e.g. maybe large occurance due to small integration and observed many time and also it is possible only for one object in one band (like the first project in here)
I think the year of Cycle is more important due to number of antenna.
In [15]:
# 15 first
for i in sorted_from_large[0:15]:
print(i)
In [9]:
sorted_project_year = sorted(list_of_project, key=lambda data: data[0])
In [10]:
sorted_from_new = list(reversed(sorted_project_year))
In [16]:
# 15 first
for i in sorted_from_new[0:15]:
print(i)
There is 'A' in project name e.g. 2016.A.00011.S, 2016.A.00010.S, what does it mean?
In [ ]: