Package: chorusReports
CHORUS ReportsCHORUSbrings together funders, societies, publishers, institutions, and the public from across the open research ecosystem to share knowledge, develop solutions, advance innovation, and support collective efforts. CHORUS queries several repositories to collect data from theGlobal Research Infrastructureand makes those data available in reports.Metadata Game Changers is working with CHORUSto understand these reports and help U.S. Funders and other users to understand them as well.The CHORUSReports Package was developed by Metadata Game Changers to facilitate analysis of the CHORUS reports with focus on the All Report, the Author Affiliation Report, and the Dataset Report.CHORUSReportsThe CHORUSReport object holds a CHORUS Report of any type and support operations on that onPropertiesPropertyDescriptiondataPathPath to the data associated with the report.dataFileThe name of the data file associated with the report (derived from dataPath.organizationThe acronym of the organization that the report data comes from (typically NSF, USGS, or USAID). The fileNames start with these acronymns.timestampThe timestamp (YYYYMMDD) of the data in the report, i.e., when it was retrieved from CHORUS)dataTypeThe type of the data in the report (all, authors, datasets)data_dData associated with the report, i.e. actual data or the summary of the data. Elements of the data_d are described below.FunctionsFunctionDescriptionArgumentsReturnssaveSave the data from the report to its dataFile. This can be used to save changes made during the analysis of the data to the original datafile.NoneMessage with number of lines written.dataReturns the data for the report as a dataframe. Dataframe commands can be used with this, e.g. cr.data('all').head()dataType as stringdata in dataframe.summaryReturns the summary for the report as a dataframe. Dataframe commands can be used with this, e.g. cr.sumary('all').head()dataType as stringsummary in dataframe.infoReturns data dataframe.info() for the report.Noneinfo() for dataframecountsReturns count information for a field in the report data, e.g. cr.report('all').counts('DOI') gives the summary information for the DOI column of the All ReportField nameDictionary with counts ({'report': 'all', 'field': 'DOI', 'total count': 7143, 'unique': 7143})commonCounts values of a field in a report.field name, delimiter (default=None)Adds new data (dataframe of value, counts) to the report with the name of the item counted as the key for the data.makeStandardElementNamesConvert names of columns in the report to standard names given in the dataTypes_d.NoneDataframe in report has standard column names.makePublicationYearCreates a column in the dataframe named Publication Year which is the year of the Print Publication Date if it exists or the year of the Online Publication Date if it doesn'tNoneNoneconvertDates2YearsCreate new date fields with years from date fields in the report.A list of field names to convert.NoneharmonizeRepositoryNamesStandardize repository names in Dataset Reports.A list of repository synonyms (see CHORUSDataCleanup.ipynb for an example.NonereadDateCreatedFromDOIMetadataRead DOI metadata from a getDOIMetadata output file (DataCite metadata) to get the date_created field for datasets and add it to the Dataset Report.The name of a DOI metadata output fileNone.CHORUSRetrievalsThe CHORUSRetrieval object holds a dictionary of related reports.PropertiesPropertyDescriptionorganizationThe acronym of the organization that the report data comes from (typically NSF, USGS, or USAID). The fileNames start with these acronymns.timestampThe timestamp (YYYYMMDD) of the data in the report, i.e., when it was retrieved from CHORUS)report_dA dictionary of reports with keys = dataTypesFunctionsFor a CHORUS Retrieval (cr) these functions are called as cr.function(arguments)FunctionDescriptionArgumentsReturnsdataTypes:Get the data types for reports in the retrievalnonelist of dataTypes in the retrieval (default: ['all', 'authors', 'datasets'])info:Get dataframe.info() for each dataframe in the retrievalnoneinfo()data(dt):Get the data dataframe with dataType = dt from the retrievaldataType, one of ['all', 'authors', 'datasets']data dataframe for dataType.summary(dt):Get the data dataframe with dataType = dt from the retrievaldataType, one of ['all', 'authors', 'datasets']summary dataframe for dataType.