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):
155155 plt .savefig ("path/to/save/plot.png" )
156156
157157
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+
158168def report ():
159169 # Get today's date
160170 tdate = date .today ()
@@ -179,6 +189,8 @@ def report():
179189 report ["generalmodality" ] = __get_generalmodality (df )
180190 report ["technique" ] = __get_technique (df )
181191 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 )
182194
183195 # plots
184196 get_projects_treemap (df )
You can’t perform that action at this time.
0 commit comments