def main(argv): # create the getopt table + read and validate the options given to the script conp_dataset_dir = parse_input(argv) # read the content of the DATS.json files present in the conp-dataset directory dataset_descriptor_list = Utility.read_conp_dataset_dir(conp_dataset_dir) # digest the content of the DATS.json files into a summary of variables of interest datasets_summary_dict = {} i = 0 for dataset in dataset_descriptor_list: datasets_summary_dict[i] = parse_dats_information(dataset) i += 1 # create the summary statistics of the variables of interest organized per data providers csv_content = [[ 'Data Provider', 'Number Of Datasets', 'Number Of Datasets Requiring Authentication', 'Total Number Of Files', 'Total Size (GB)', 'Keywords Describing The Data' ]] for data_provider in ['braincode', 'frdr', 'loris', 'osf', 'zenodo']: summary_list = get_stats_for_data_provider(datasets_summary_dict, data_provider) csv_content.append(summary_list) # write the summary statistics into a CSV file Utility.write_csv_file('dataset_summary_statistics_per_data_providers', csv_content)
def main(argv): # create the getopt table + read and validate the options given to the script tools_json_dir_path = parse_input(argv) # read the content of the DATS.json files present in the boutiques's cached # directory present in ~ tool_descriptor_list = Utility.read_boutiques_cached_dir(tools_json_dir_path) # digest the content of the DATS.json files into a summary of variables of interest tools_summary_dict = {} i = 0 for tool in tool_descriptor_list: tools_summary_dict[i] = parse_json_information(tool) i += 1 # create the summary statistics of the variables of interest organized per # domain of application csv_content = [ [ 'Domain of Application', 'Number Of Tools', 'Containers', 'Execution Capacity' ] ] for field in ['Neuroinformatics', 'Bioinformatics', 'MRI', 'EEG', 'Connectome', 'BIDS-App']: summary_list = get_stats_per_domain(tools_summary_dict, field) csv_content.append(summary_list) # write the summary statistics into a CSV file Utility.write_csv_file('tools_summary_statistics_per_domain', csv_content)