idmtools_calibra.utilities.parsers.malaria_summary module

idmtools_calibra.utilities.parsers.malaria_summary.summary_channel_to_pandas(data, channel)[source]

A function to return a hierarchical binned pandas.Series for a specified MalariaSummaryReport.json channel :param data: parsed data from summary report :param channel: channel in summary report :return: pd.Series with MultiIndex binning taken from summary metadata

idmtools_calibra.utilities.parsers.malaria_summary.json_to_pandas(channel_data, bins, channel=None)[source]

A function to convert nested array channel data from a json file to a pandas.Series with the specified MultiIndex binning.

idmtools_calibra.utilities.parsers.malaria_summary.get_grouping_for_summary_channel(data, channel)[source]

A function to find the grouping to which a channel belongs in MalariaSummaryReport.json :param data: parsed data from summary report :param channel: channel to find :return: grouping or exception if not found

Example:

>>> get_grouping_for_summary_channel(data, channel='Average Population by Age Bin')
'DataByTimeAndAgeBins'
idmtools_calibra.utilities.parsers.malaria_summary.get_bins_for_summary_grouping(data, grouping)[source]

A function to get the dimensions and binning of data for a specified MalariaSummaryReport.json grouping :param data: parsed data from summary report :param grouping: group name :return: an OrderedDict of dimensions and bins

Example:

>>> get_bins_for_summary_grouping(data, grouping='DataByTimeAndAgeBins')
OrderedDict([('Time', [31, 61, 92, ..., 1095]), ('Age Bin', [0, 10, 20, ..., 1000])])