66
77def today ():
88 """
9- Get today's snapshot of Brain Image Library.
10- """
9+ Get today's snapshot of Brain Image Library.
10+ """
1111
1212 server = "https://download.brainimagelibrary.org/inventory/daily/reports/"
1313 filename = "today.json"
@@ -54,9 +54,11 @@ def __get_contributor(df):
5454def __get_affilation (df ):
5555 return df ["affiliation" ].value_counts ().to_dict ()
5656
57+
5758def __get_awards (df ):
5859 return df ["award_number" ].unique ()
5960
61+
6062def __get_award_number (df ):
6163 return df ["award_number" ].value_counts ().to_dict ()
6264
@@ -69,12 +71,18 @@ def __get_cnbtaxonomy(df):
6971 return df ["cnbtaxonomy" ].value_counts ().to_dict ()
7072
7173
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 ()
7479
7580
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 ()
7886
7987
8088def __get_generalmodality (df ):
@@ -88,41 +96,35 @@ def __get_technique(df):
8896def __get_locations (df ):
8997 return df ["locations" ].value_counts ().to_dict ()
9098
99+
91100def __get_contributors (df ):
92101 """
93102 This returns an array of contributor names from the contributorname column.
94103 """
95104 return df ["contributorname" ].unique ()
96105
97106
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-
107107def __get_list_of_projects (df ):
108- '''
108+ """
109109 Get the list of names for unique projects
110110
111111 Input parameter: dataframe
112112 Output: list of projects
113- '''
114-
115- return df ['project' ].unique ().to_dict ()
113+ """
114+
115+ return df ["project" ].unique ().to_dict ()
116+
116117
117118def __get_number_of_projects (df ):
118- '''
119+ """
119120 Get the number of unique projects
120121
121122 Input parameter: dataframe
122123 Output: number of projects
123- '''
124-
125- return len (df ['project' ].unique ())
124+ """
125+
126+ return len (df ["project" ].unique ())
127+
126128
127129def report ():
128130 # Get today's date
0 commit comments