-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathprocess_authors_from_dropbox.py
74 lines (51 loc) · 2.4 KB
/
process_authors_from_dropbox.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
import sys
import pandas as pd
try:
url = "https://www.dropbox.com/s/t70kmn9lri6jl47/master_author_list.xlsx?dl=1"
df = pd.read_excel(url)
except Exception as e:
print(e)
sys.exit()
print("Successfully loaded from Dropbox into Pandas dataframe")
with open("./about/authors.md", "w") as fp:
sys.stdout = fp
print("""---
title: 'About'
layout: 'page'
---
ISARIC4C Consortium Authors
=======
The ISARIC4C author list aims to respect contributions to the
Protocol, MRC and DHSC grant applications and those who since have made
a substantive academic contribution to delivering the CCP-UK, which
includes CO-CIN related activity (described in the protocol as CCP-UK
Tier Zero activity).
This document is managed by the co-leads of the ISARIC4C.
We hope we have done everything we can to recognise your contribution.
Please email [email protected] if there you spot any omission.
The **Protocol Authors** are: J Kenneth Baillie, Malcolm (Calum) G Semple,
Gail Carson, Peter Openshaw, Jake Dunning, Laura Merson, Clark D
Russell, Maria Zambon, Meera Chand, Richard Tedder, Saye Khoo, Peter
Horby, Lance CW Turtle, Tom Solomon, Samreen Ijaz, Tom Fletcher, Massimo
Palmarini, Antonia Ho, Nicholas Price.
ISARIC4C Investigators
--------
""")
previous_contribution = None
names = []
for ind, row in df.iterrows():
if isinstance(row["supplemental_labels"], str):
print(f"*{row['contribution']}*: {row['Name']}.\n")
continue
if str(previous_contribution) == str(row["contribution"]):
names.append(row["Name"])
else:
if names:
print(f"*{previous_contribution}*:" + "\n" + ",\n".join(names) + ".\n")
names = []
previous_contribution = row["contribution"]
names.append(row["Name"])
print(f"*{previous_contribution}*:" + "\n" + ",\n".join(names) + ".\n")
print("## Acknowledgements")
print(
"This work uses data provided by patients and collected by the NHS as part of their care and support #DataSavesLives. We are extremely grateful to the 2,648 frontline NHS clinical and research staff and volunteer medical students, who collected this data in challenging circumstances; and the generosity of the participants and their families for their individual contributions in these difficult times. We also acknowledge the support of Jeremy J Farrar and Nahoko Shindo.")