add check for duplicate twitter handles
@@ -256,6 +256,7 @@ def collect_labs(data, table_file_name):
s += lab + ": "
if country in lab_dictionary and lab.lower() in lab_dictionary[country]:
s += bold(lab_dictionary[country][lab.lower()])
+ if lab_dictionary[country][lab.lower()] not in lab_collection[region][country]:
lab_collection[region][country].append(lab_dictionary[country][lab.lower()])
else:
s += bold("?")
@@ -272,6 +273,7 @@ def collect_labs(data, table_file_name):
s += lab
if country in lab_dictionary and lab.lower() in lab_dictionary[country]:
s += ": " + bold(lab_dictionary[country][lab.lower()])
+ if lab_dictionary[country][lab.lower()] not in lab_collection[region][country]:
lab_collection[region][country].append(lab_dictionary[country][lab.lower()])
s += "\n"
print(s)
@@ -285,6 +287,7 @@ def collect_labs(data, table_file_name):
s += author
if country in lab_dictionary and author.lower() in lab_dictionary[country]:
s += ": " + bold(lab_dictionary[country][author.lower()])
+ if lab_dictionary[country][author.lower()] not in lab_collection[region][country]:
lab_collection[region][country].append(lab_dictionary[country][author.lower()])
s += "\n"
print(s)
@@ -361,6 +364,8 @@ def prepare_tweet(counts, lab_collection):
("New sequences from ", " can be seen on ")
]
+ the = ["United Kingdom", "USA"]
+
total = 0
tweet_collection = {}
lengths = {}
@@ -372,7 +377,10 @@ def prepare_tweet(counts, lab_collection):
for country in lab_collection[region]:
number = sum(counts[country].values())
total += number
- s = country + " (" + str(number) + ")"
+ s = ""
+ if country in the:
+ s += "the "
+ s += country + " (" + str(number) + ")"
labs = lab_collection[region][country]
countries.append(s)
handles = handles + labs
