6
6
7
7
def today ():
8
8
"""
9
- Get today's snapshot of Brain Image Library.
10
- """
9
+ Get today's snapshot of Brain Image Library.
10
+ """
11
11
12
12
server = "https://download.brainimagelibrary.org/inventory/daily/reports/"
13
13
filename = "today.json"
@@ -54,9 +54,11 @@ def __get_contributor(df):
54
54
def __get_affilation (df ):
55
55
return df ["affiliation" ].value_counts ().to_dict ()
56
56
57
+
57
58
def __get_awards (df ):
58
59
return df ["award_number" ].unique ()
59
60
61
+
60
62
def __get_award_number (df ):
61
63
return df ["award_number" ].value_counts ().to_dict ()
62
64
@@ -69,12 +71,18 @@ def __get_cnbtaxonomy(df):
69
71
return df ["cnbtaxonomy" ].value_counts ().to_dict ()
70
72
71
73
72
- def __get_samplelocalid (df ):
73
- return df ["samplelocalid" ].value_counts ().to_dict ()
74
+ def __get_genotypes (df ):
75
+ """
76
+ Write documentation here.
77
+ """
78
+ return df ["genotype" ].unique ()
74
79
75
80
76
- def __get_genotype (df ):
77
- return df ["genotype" ].value_counts ().to_dict ()
81
+ def __get_genotype_frequency (df ):
82
+ """
83
+ Write documentation here.
84
+ """
85
+ return df ["genotypes" ].value_counts ().to_dict ()
78
86
79
87
80
88
def __get_generalmodality (df ):
@@ -88,41 +96,35 @@ def __get_technique(df):
88
96
def __get_locations (df ):
89
97
return df ["locations" ].value_counts ().to_dict ()
90
98
99
+
91
100
def __get_contributors (df ):
92
101
"""
93
102
This returns an array of contributor names from the contributorname column.
94
103
"""
95
104
return df ["contributorname" ].unique ()
96
105
97
106
98
- def __get_project_names (df ):
99
- '''
100
- Gets the unique list of project names.
101
-
102
- Input: dataframe
103
- Output: list
104
- '''
105
- return df ['project' ].unique ()
106
-
107
107
def __get_list_of_projects (df ):
108
- '''
108
+ """
109
109
Get the list of names for unique projects
110
110
111
111
Input parameter: dataframe
112
112
Output: list of projects
113
- '''
114
-
115
- return df ['project' ].unique ().to_dict ()
113
+ """
114
+
115
+ return df ["project" ].unique ().to_dict ()
116
+
116
117
117
118
def __get_number_of_projects (df ):
118
- '''
119
+ """
119
120
Get the number of unique projects
120
121
121
122
Input parameter: dataframe
122
123
Output: number of projects
123
- '''
124
-
125
- return len (df ['project' ].unique ())
124
+ """
125
+
126
+ return len (df ["project" ].unique ())
127
+
126
128
127
129
def report ():
128
130
# Get today's date
0 commit comments