File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -155,6 +155,16 @@ def get_projects_treemap(df):
155
155
plt .savefig ("path/to/save/plot.png" )
156
156
157
157
158
+ def __get__percentage_of_metadata_version_1 (df ):
159
+ """
160
+ Get the percentage/ratio of metadata version 1 from all datasets
161
+
162
+ Input: dataframe
163
+ Output: an integer
164
+ """
165
+ return len (df [df ["metadata_version" ] == 1 ]) / len (df )
166
+
167
+
158
168
def report ():
159
169
# Get today's date
160
170
tdate = date .today ()
@@ -179,6 +189,8 @@ def report():
179
189
report ["generalmodality" ] = __get_generalmodality (df )
180
190
report ["technique" ] = __get_technique (df )
181
191
report ["locations" ] = __get_locations (df )
192
+ report ["percentage_of_version_1" ] = __get__percentage_of_metadata_version_1 (df )
193
+ report ["is_reachable" ] = df ["URL" ].apply (__is_reachable )
182
194
183
195
# plots
184
196
get_projects_treemap (df )
You can’t perform that action at this time.
0 commit comments