emodpy_malaria.reporters.builtin module

emodpy_malaria.reporters.builtin.add_report_vector_genetics(task, manifest, start_day: int = 0, end_day: int = 365000, node_ids: Optional[list] = None, species: Optional[str] = None, gender: str = 'VECTOR_FEMALE', include_vector_state: int = 1, include_death_state: int = 0, stratify_by: str = 'GENOME', combine_similar_genomes: int = 0, specific_genome_combinations_for_stratification: Optional[list] = None, allele_combinations_for_stratification: Optional[list] = None, alleles_for_stratification: Optional[list] = None, filename_suffix: str = '')

Adds ReportVectorGenetics to the simulation. See class definition for description of the report.

Parameters
  • task – task to which to add the reporter, if left as None, reporter is returned (used for unittests)

  • manifest – schema path file

  • start_day – the day of the simulation to start reporting data

  • end_day – the day of the simulation to stop reporting data

  • node_ids – the list of nodes in which to collect data, empty or None means all nodes

  • species – the species to include information on

  • gender – gender of species to include information on. Default: “VECTOR_FEMALE”, other options: “VECTOR_MALE”, “VECTOR_BOTH_GENDERS”

  • include_vector_state – if 1(true), adds the columns for vectors in the different states (i.e Eggs, Larva, etc)

  • include_death_state – if 1(true), adds columns for the number of vectors that died in this state during this time step as well as the average age. It adds two columns for each of the following states: ADULT, INFECTED, INFECTIOUS, and MALE

  • stratify_by – the way to stratify data. Default: “GENOME”, other options: “SPECIFIC_GENOME”, “ALLELE”, “ALLELE_FREQ”

  • combine_similar_genomes

    if 1(true), genomes are combined if for each locus (ignoring gender) the set of allele of the two genomes are the same (i.e. 1-0 is similar to 0-1). Depends on: “GENOME”, “SPECIFIC_GENOME” specific_genome_combinations_for_stratification: if stratifying by “SPECIFIC_GENOME”, then use these genomes to stratify by. Example:

    [{"Allele_Combination": [[ "a0",  "*" ], [ "b1", "b0" ]]},
    {"Allele_Combination": [[ "a1", "a0" ], [ "b0",  "*" ]]}]
    

  • specific_genome_combinations_for_stratification – ff stratifying by “SPECIFIC_GENOME”, then use these genomes to stratify by. ‘*’ = list all entries at that location, ‘?’ = combine all entries at that location

  • allele_combinations_for_stratification

    if stratifying by “ALLELE”, then also add these allele name combos to the stratification, Example:

    [[ "a0", "b0" ], [ "a1", "b1" ]]
    

  • alleles_for_stratification

    For example:

    [ "a0", "a1", "b0", "b1" ]
    

  • filename_suffix – augments the filename of the report. If multiple reports are being generated, this allows you to distinguish among the multiple reports

Returns

if task is not set, returns the configured reporter, otherwise returns nothing

emodpy_malaria.reporters.builtin.add_report_vector_stats(task, manifest, species_list: Optional[list] = None, stratify_by_species: int = 0, include_death_state: int = 0, include_wolbachia: int = 0, include_gestation: int = 0)

Adds ReportVectorStats report to the simulation. See class definition for description of the report.

Parameters
  • task – task to which to add the reporter, if left as None, reporter is returned (used for unittests)

  • manifest – schema path file

  • species_list – a list of species to include information on

  • stratify_by_species – if 1(true), data will break out each the species for each node

  • include_death_state – if 1(true), adds columns for the number of vectors that died in this state during this time step as well as the average age. It adds two columns for each of the following states: ADULT, INFECTED, INFECTIOUS, and MALE

  • include_wolbachia – if 1(true), add a column for each type of Wolbachia

  • include_gestation – if 1(true), adds columns for feeding and gestation

Returns

if task is not set, returns the configured reporter, otherwise returns nothing

emodpy_malaria.reporters.builtin.add_malaria_summary_report(task, manifest, start_day: int = 0, end_day: int = 365000, node_ids: Optional[list] = None, reporting_interval: float = 365, must_have_ip_key_value: str = '', must_have_intervention: str = '', age_bins: Optional[list] = None, infectiousness_bins: Optional[list] = None, max_number_reports: int = 100, parasitemia_bins: Optional[list] = None, pretty_format: int = 0, filename_suffix: str = '')

Adds MalariaSummaryReport to the simulation. See class definition for description of the report.

Parameters
  • task – task to which to add the reporter, if left as None, reporter is returned (used for unittests)

  • manifest – schema path file

  • start_day – the day of the simulation to starts collecting data for the report

  • end_day – the day of the simulation to stop reporting data

  • node_ids – a list of nodes from which to collect data for the report

  • reporting_interval – Defines the cadence of the report by specifying how many time steps to collect data before writing to the file

  • must_have_ip_key_value – a “Key:Value” pair that the individual must have in order to be included. Empty string means don’t look at IPs (individual properties)

  • must_have_intervention – the name of the an intervention that the person must have in order to be included. Empty string means don’t look at the interventions

  • age_bins – The max age in years per bin, listed in ascending order. Use a large value for the last bin, to collect all remaining individuals

  • infectiousness_bins – infectiousness Bins to aggregate within for the report

  • max_number_reports – the maximum number of report output files that will be produced for a given simulation

  • parasitemia_bins – Parasitemia bins on which to aggregate. A value <= 0 in the first bin indicates that uninfected individuals are added to this bin. You must sort your input data from low to high.

  • pretty_format – if 1(true) sets pretty JSON formatting, which includes carriage returns, line feeds, and spaces for easier readability. The default, 0 (false), saves space where everything is on one line.

  • filename_suffix – augments the filename of the report. If multiple reports are being generated, this allows you to distinguish among the multiple reports

Returns

if task is not set, returns the configured reporter, otherwise returns nothing

emodpy_malaria.reporters.builtin.add_malaria_patient_json_report(task, manifest, start_day: int = 0, end_day: int = 365000, node_ids: Optional[list] = None, min_age_years: float = 0, max_age_years: float = 125, must_have_ip_key_value: str = '', must_have_intervention: str = '', filename_suffix: str = '')

Adds MalariaPatientJSONReport report to the simulation. See class definition for description of the report.

Parameters
  • task – task to which to add the reporter, if left as None, reporter is returned (used for unittests)

  • manifest – schema path file

  • start_day – the day of the simulation to starts collecting data for the report

  • end_day – the day of the simulation to stop reporting data

  • node_ids – a list of nodes from which to collect data for the report

  • min_age_years – minimum age in years of people to collect data on

  • max_age_years – maximum age in years of people to collect data on

  • must_have_ip_key_value – a “Key:Value” pair that the individual must have in order to be included. Empty string means don’t look at IPs (individual properties)

  • must_have_intervention – the name of the an intervention that the person must have in order to be included. Empty string means don’t look at the interventions

  • filename_suffix – augments the filename of the report. If multiple reports are being generated, this allows you to distinguish among the multiple reports

Returns

if task is not set, returns the configured reporter, otherwise returns nothing

emodpy_malaria.reporters.builtin.add_malaria_transmission_report(task, manifest, start_day: int = 0, end_day: int = 365000, node_ids: Optional[list] = None, min_age_years: float = 0, max_age_years: float = 125, must_have_ip_key_value: str = '', must_have_intervention: str = '', include_human_to_vector: int = 0, pretty_format: int = 0, filename_suffix: str = '')

Adds ReportSimpleMalariaTransmissionJSON report to the simulation. See class definition for description of the report.

Parameters
  • task – task to which to add the reporter, if left as None, reporter is returned (used for unittests)

  • manifest – schema path file

  • start_day – the day to start collecting data for the report.

  • end_day – the day of the simulation to stop reporting data

  • node_ids – list of nodes for which to collect data for the report

  • min_age_years – minimum age in years of people to collect data on

  • max_age_years – maximum age in years of people to collect data on

  • include_human_to_vector – ff set to 1, Human-to-Vector transmission events will be included. One can identify these events because the ‘acquireIndividualId’=0 and transmitTime=acquireTime. WARNING: This can make the file size quite large

  • must_have_ip_key_value – a “Key:Value” pair that the individual must have in order to be included. Empty string means don’t look at IPs (individual properties)

  • must_have_intervention – the name of the an intervention that the person must have in order to be included. Empty string means don’t look at the interventions

  • pretty_format – if 1(true) sets pretty JSON formatting, which includes carriage returns, line feeds, and spaces for easier readability. The default, 0 (false), saves space where everything is on one line.

  • filename_suffix – augments the filename of the report. If multiple reports are being generated, this allows you to distinguish among the multiple reports

Returns

if task is not set, returns the configured reporter, otherwise returns nothing

emodpy_malaria.reporters.builtin.add_report_malaria_filtered(task, manifest, start_day: int = 0, end_day: int = 365000, node_ids: Optional[list] = None, min_age_years: float = 0, max_age_years: float = 125, must_have_ip_key_value: str = '', must_have_intervention: str = '', has_interventions: Optional[list] = None, include_30day_avg_infection_duration: int = 1, filename_suffix: str = '')

Adds ReportMalariaFiltered report to the simulation. See class definition for description of the report.

Parameters
  • task – task to which to add the reporter, if left as None, reporter is returned (used for unittests)

  • manifest – schema path file

  • start_day – the day of the simulation to start collecting data

  • end_day – the day of simulation to stop collecting data

  • node_ids – list of nodes for which to collect the data, None or [] collects all the nodes

  • min_age_years – Minimum age in years of people to collect data on

  • max_age_years – Maximum age in years of people to collect data on

  • must_have_ip_key_value – a “Key:Value” pair that the individual must have in order to be included. Empty string means don’t look at IPs (individual properties)

  • must_have_intervention – the name of the an intervention that the person must have in order to be included. Empty string means don’t look at the interventions

  • has_interventions – a list of intervention names, a channel is added to the report for each InterventionName provided. The channel name will be Has_<InterventionName> and will be the fraction of the population that has that intervention. The Intervention_Name in the campaign should be the values in this parameter

  • include_30day_avg_infection_duration – if (1) true the ‘30-Day Avg Infection Duration’ channel is included in the report

  • filename_suffix – augments the filename of the report. If multiple reports are being generated, this allows you to distinguish among the multiple reports

Returns

if task is not set, returns the configured reporter, otherwise returns nothing

emodpy_malaria.reporters.builtin.add_report_malaria_filtered_intrahost(task, manifest, start_day: int = 0, end_day: int = 365000, node_ids: Optional[list] = None, min_age_years: float = 0, max_age_years: float = 125, must_have_ip_key_value: str = '', must_have_intervention: str = '', has_interventions: Optional[list] = None, include_30day_avg_infection_duration: int = 1, filename_suffix: str = '')

Adds ReportMalariaFilteredIntraHost report to the simulation. See class definition for description of the report.

Parameters
  • task – task to which to add the reporter, if left as None, reporter is returned (used for unittests)

  • manifest – schema path file

  • start_day – the day of the simulation to start collecting data

  • end_day – the day of simulation to stop collecting data

  • node_ids – list of nodes for which to collect the data, None or [] collects all the nodes

  • min_age_years – Minimum age in years of people to collect data on

  • max_age_years – Maximum age in years of people to collect data on

  • must_have_ip_key_value – a “Key:Value” pair that the individual must have in order to be included. Empty string means don’t look at IPs (individual properties)

  • must_have_intervention – the name of the an intervention that the person must have in order to be included. Empty string means don’t look at the interventions

  • has_interventions – a list of intervention names, a channel is added to the report for each InterventionName provided. The channel name will be Has_<InterventionName> and will be the fraction of the population that has that intervention. The Intervention_Name in the campaign should be the values in this parameter

  • include_30day_avg_infection_duration – if (1) true the ‘30-Day Avg Infection Duration’ channel is included in the report

  • filename_suffix – augments the filename of the report. If multiple reports are being generated, this allows you to distinguish among the multiple reports

Returns

if task is not set, returns the configured reporter, otherwise returns nothing

emodpy_malaria.reporters.builtin.add_spatial_report_malaria_filtered(task, manifest, start_day: int = 0, end_day: int = 365000, reporting_interval: int = 1, node_ids: Optional[list] = None, min_age_years: float = 0, max_age_years: float = 125, must_have_ip_key_value: str = '', must_have_intervention: str = '', spatial_output_channels: Optional[list] = None, filename_suffix: str = '')

Adds SpatialReportMalariaFiltered report to the simulation. See class definition for description of the report.

Parameters
  • task – task to which to add the reporter, if left as None, reporter is returned (used for unittests)

  • manifest – schema path file

  • start_day – the day of the simulation to start collecting data

  • end_day – the day of simulation to stop collecting data

  • reporting_interval – defines the cadence of the report by specifying how many time steps to collect data before writing to the file.

  • node_ids – list of nodes for which to collect the data, None or [] collects all the nodes

  • min_age_years – Minimum age in years of people to collect data on

  • max_age_years – Maximum age in years of people to collect data on

  • must_have_ip_key_value – a “Key:Value” pair that the individual must have in order to be included. Empty string means don’t look at IPs (individual properties)

  • must_have_intervention – the name of the an intervention that the person must have in order to be included. Empty string means don’t look at the interventions

  • spatial_output_channels – list of names of channels you want to have output for. Available channels are: “Adult_Vectors”, “Air_Temperature”, “Births”, “Blood_Smear_Gametocyte_Prevalence”, “Blood_Smear_Parasite_Prevalence”, “Campaign_Cost”, “Daily_Bites_Per_Human”, “Daily_EIR”, “Disease_Deaths”, “Fever_Prevalence”, “Human_Infectious_Reservoir”, “Infected”, “Infectious_Vectors”, “Land_Temperature”, “Mean_Parasitemia”, “New_Clinical_Cases”, “New_Infections”, “New_Reported_Infections”, “New_Severe_Cases”, “PCR_Gametocyte_Prevalence”, “PCR_Parasite_Prevalence”, “PfHRP2_Prevalence”, “Population”, “Prevalence”, “Rainfall”, “Relative_Humidity”, “True_Prevalence” Defaults: [“Blood_Smear_Parasite_Prevalence”, “New_Clinical_Cases”, “Population”]

  • filename_suffix – augments the filename of the report. If multiple reports are being generated, this allows you to distinguish among the multiple reports

Returns

if task is not set, returns the configured reporter, otherwise returns nothing

emodpy_malaria.reporters.builtin.add_report_event_counter(task, manifest, start_day: int = 0, end_day: int = 365000, node_ids: Optional[list] = None, event_trigger_list: Optional[list] = None, min_age_years: float = 0, max_age_years: float = 125, must_have_ip_key_value: str = '', must_have_intervention: str = '', filename_suffix: str = '')

Adds ReportEventCounter report to the simulation. See class definition for description of the report.

Parameters
  • task – task to which to add the reporter, if left as None, reporter is returned (used for unittests)

  • manifest – schema path file

  • start_day – the day of the simulation to start counting events

  • end_day – the day of simulation to stop collecting data

  • node_ids – list of nodes in which to count the events

  • event_trigger_list – list of events which to count

  • min_age_years – Minimum age in years of people to collect data on

  • max_age_years – Maximum age in years of people to collect data on

  • must_have_ip_key_value – a “Key:Value” pair that the individual must have in order to be included. Empty string means don’t look at IPs (individual properties)

  • must_have_intervention – the name of the an intervention that the person must have in order to be included. Empty string means don’t look at the interventions

  • filename_suffix – augments the filename of the report. If multiple reports are being generated, this allows you to distinguish among the multiple reports

Returns

if task is not set, returns the configured reporter, otherwise returns nothing

emodpy_malaria.reporters.builtin.add_malaria_sql_report(task, manifest, start_day: int = 0, end_day: int = 365000, include_infection_table: int = 1, include_health_table: int = 1, include_drug_table: int = 0)

Adds MalariaSqlReport report to the simulation. See class definition for description of the report.

Parameters
  • task – task to which to add the reporter, if left as None, reporter is returned (used for unittests)

  • manifest – schema path file

  • start_day – the day of the simulation to start collecting data

  • end_day – the day of the simulation to stop collecting data

  • include_infection_table – if 1(true), include the table that provides data at each time step for each active infection

  • include_health_table – if 1(true), include the table that provides data at each time step for a person’s health

  • include_drug_table – if 1(true), include the table that provides data at each time step for each drug used

Returns

if task is not set, returns the configured reporter, otherwise returns nothing

emodpy_malaria.reporters.builtin.add_vector_habitat_report(task, manifest)

Adds VectorHabitatReport report to the simulation. See class definition for description of the report. You do not need to configure any data parameters to generate this report.

Parameters
  • task – task to which to add the reporter, if left as None, reporter is returned (used for unittests)

  • manifest – schema path file

Returns

if task is not set, returns the configured reporter, otherwise returns nothing

emodpy_malaria.reporters.builtin.add_malaria_immunity_report(task, manifest, start_day: int = 0, end_day: int = 365000, node_ids: Optional[list] = None, reporting_interval: int = 1, max_number_reports: int = 365000, age_bins: Optional[list] = None, must_have_ip_key_value: str = '', must_have_intervention: str = '', pretty_format: int = 0, filename_suffix: str = '')

Adds MalariaImmunityReport report to the simulation. See class definition for description of the report.

Parameters
  • task – task to which to add the reporter, if left as None, reporter is returned (used for unittests)

  • manifest – schema path file

  • start_day – the day of the simulation to start collecting data

  • end_day – the day of simulation to stop collecting data

  • node_ids – list of nodes for which to collect data

  • reporting_interval – defines the cadence of the report by specifying how many time steps to collect data before writing to the file.

  • max_number_reports – the maximum number of report output files that will be produced for a given simulation

  • age_bins – The max age in years per bin, listed in ascending order. Use a large value for the last bin, to collect all remaining individuals

  • must_have_ip_key_value – a “Key:Value” pair that the individual must have in order to be included. Empty string means don’t look at IPs (individual properties)

  • must_have_intervention – the name of the an intervention that the person must have in order to be included. Empty string means don’t look at the interventions

  • pretty_format – if 1(true) sets pretty JSON formatting, which includes carriage returns, line feeds, and spaces for easier readability. The default, 0 (false), saves space where everything is on one line.

  • filename_suffix – augments the filename of the report. If multiple reports are being generated, this allows you to distinguish among the multiple reports

Returns

if task is not set, returns the configured reporter, otherwise returns nothing

emodpy_malaria.reporters.builtin.add_malaria_survey_analyzer(task, manifest, start_day: int = 0, end_day: int = 365000, node_ids: Optional[list] = None, event_trigger_list: Optional[list] = None, reporting_interval: float = 1, max_number_reports: int = 365000, ip_key_to_collect: str = '', must_have_ip_key_value: str = '', must_have_intervention: str = '', pretty_format: int = 0, filename_suffix: str = '')

Adds MalariaSurveyJSONAnalyzer report to the simulation. See class definition for description of the report.

Parameters
  • task – task to which to add the reporter, if left as None, reporter is returned (used for unittests)

  • manifest – schema path file

  • start_day – the day of the simulation to start collecting data

  • end_day – the day of simulation to stop collecting data

  • reporting_interval – defines the cadence of the report by specifying how many time steps to collect data before writing to the file

  • event_trigger_list – list of individual events to include into the report

  • max_number_reports – the maximum number of report output files that will be produced for a given simulation

  • node_ids – list of nodes for which to collect data

  • ip_key_to_collect – name of the Individual Property Key whose value to collect. Empty string means collect values for all Individual Properties

  • must_have_ip_key_value – a “Key:Value” pair that the individual must have in order to be included. Empty string means don’t look at IPs (individual properties)

  • must_have_intervention – the name of the an intervention that the person must have in order to be included. Empty string means don’t look at the interventions

  • pretty_format – if 1(true) sets pretty JSON formatting, which includes carriage returns, line feeds, and spaces for easier readability. The default, 0 (false), saves space where everything is on one line.

  • filename_suffix – augments the filename of the report. If multiple reports are being generated, this allows you to distinguish among the multiple reports

Returns

if task is not set, returns the configured reporter, otherwise returns nothing

emodpy_malaria.reporters.builtin.add_drug_status_report(task, manifest, start_day: int = 0, end_day: int = 365000)

Adds ReportDrugStatus report to the simulation. See class definition for description of the report.

Parameters
  • task – task to which to add the reporter, if left as None, reporter is returned (used for unittests)

  • manifest – schema path file

  • start_day – the day of the simulation to start collecting data

  • end_day – the day of the simulation to stop collecting data

Returns

if task is not set, returns the configured reporter, otherwise returns nothing

emodpy_malaria.reporters.builtin.add_report_infection_stats_malaria(task, manifest, start_day: int = 0, end_day: int = 365000)

Adds ReportInfectionStatsMalaria report to the simulation. See class definition for description of the report.

Parameters
  • task – task to which to add the reporter, if left as None, reporter is returned (used for unittests)

  • manifest – schema path file

  • start_day – the day of the simulation to start collecting data

  • end_day – the day of the simulation to stop collecting data

Returns

if task is not set, returns the configured reporter, otherwise returns nothing

emodpy_malaria.reporters.builtin.add_human_migration_tracking(task, manifest)

Adds ReportHumanMigrationTracking report to the simulation. There are no special parameter that need to be configured to generate the report. However, the simulation must have migration enabled.

Parameters
  • task – task to which to add the reporter, if left as None, reporter is returned (used for unittests)

  • manifest – schema path file

Returns

if task is not set, returns the configured reporter, otherwise returns nothing

emodpy_malaria.reporters.builtin.add_report_node_demographics(task, manifest, age_bins: Optional[list] = None, ip_key_to_collect: str = '', stratify_by_gender: int = 1)

Adds ReportNodeDemographics report to the simulation. See class definition for description of the report.

Parameters
  • task – task to which to add the reporter, if left as None, reporter is returned (used for unittests)

  • manifest – schema path file

  • age_bins – the age bins (in years) to aggregate within and report. An empty array does not stratify by age. You must sort your input data from low to high.

  • ip_key_to_collect – The name of the Individual Properties Key by which to stratify the report. An empty string does not stratify by Individual Properties

  • stratify_by_gender – if 1(true), to stratify by gender. Set to false (0) to not stratify by gender.

Returns

if task is not set, returns the configured reporter, otherwise returns nothing

emodpy_malaria.reporters.builtin.add_report_node_demographics_malaria(task, manifest, age_bins: Optional[list] = None, ip_key_to_collect: str = '', stratify_by_gender: int = 1, stratify_by_clinical_symptoms: int = 0)

Adds ReportNodeDemographicsMalaria report to the simulation. See class definition for description of the report.

Parameters
  • task – task to which to add the reporter, if left as None, reporter is returned (used for unittests)

  • manifest – schema path file

  • age_bins – the age bins (in years) to aggregate within and report. An empty array does not stratify by age. You must sort your input data from low to high.

  • ip_key_to_collect – The name of theIndividualProperties key by which to stratify the report. An empty string does not stratify by Individual Properties

  • stratify_by_gender – if 1(true), to stratify by gender. Set to false (0) to not stratify by gender.

  • stratify_by_clinical_symptoms – if set to 1, the data will have an extra stratification for people who have clinical symptoms and those that do not. Default is 0 or no extra stratification

Returns

if task is not set, returns the configured reporter, otherwise returns nothing

emodpy_malaria.reporters.builtin.add_report_node_demographics_malaria_genetics(task, manifest, barcodes: Optional[list] = None, drug_resistant_strings: Optional[list] = None, drug_resistant_statistic_type: str = 'NUM_PEOPLE_WITH_RESISTANT_INFECTION', age_bins: Optional[list] = None, ip_key_to_collect: str = '', stratify_by_gender: int = 1)

Adds ReportNodeDemographicsMalariaGenetics report to the simulation. See class definition for description of the report.

Parameters
  • task – task to which to add the reporter, if left as None, reporter is returned (used for unittests)

  • manifest – schema path file

  • barcodes – a list of barcode strings. The report contains the number of human infections with each barcode. Use ‘*’ for a wild card at a loci to include all values at that loci. For example, “A*T” includes AAT, ACT, AGT, and ATT. The report contains a BarcodeOther column for barcodes that are not defined. Note: There is no validation that the barcode strings are valid barcodes for the scenario.

  • drug_resistant_strings – a list of strings representing the set of drug resistant markers. A column will be created with the number of humans infetions with that barcode. One can use ‘*’ for a wild card. A ‘BarcodeOther’ column will be created for barcodes not define

  • drug_resistant_statistic_type – indicates the statistic in the Drug Resistant columns: NUM_PEOPLE_WITH_RESISTANT_INFECTION = A person is counted if they have one infection with that drug resistant marker; NUM_INFECTIONS = The total number of infections with that marker.

  • age_bins – the age bins (in years) to aggregate within and report. An empty array does not stratify by age. You must sort your input data from low to high.

  • ip_key_to_collect – The name of theIndividualProperties key by which to stratify the report. An empty string does not stratify by Individual Properties

  • stratify_by_gender – if 1(true), to stratify by gender. Set to false (0) to not stratify by gender.

Returns

if task is not set, returns the configured reporter, otherwise returns nothing

emodpy_malaria.reporters.builtin.add_report_vector_migration(task, manifest, start_day: int = 0, end_day: int = 365000)

Adds ReportVectorMigration report to the simulation. See class definition for description of the report.

Parameters
  • task – task to which to add the reporter, if left as None, reporter is returned (used for unittests)

  • manifest – schema path file

  • start_day – the day of the simulation to start collecting data

  • end_day – the day of the simulation to stop collecting data

Returns

if task is not set, returns the configured reporter, otherwise returns nothing

emodpy_malaria.reporters.builtin.add_report_vector_stats_malaria_genetics(task, manifest, species_list: Optional[list] = None, stratify_by_species: int = 0, include_death_state: int = 0, include_wolbachia: int = 0, include_gestation: int = 0, barcodes: Optional[list] = None)

Adds ReportVectorStatsMalariaGenetics report to the simulation. See class definition for description of the report.

Parameters
  • task – task to which to add the reporter, if left as None, reporter is returned (used for unittests)

  • manifest – schema path file

  • species_list – a list of species to include information on

  • stratify_by_species – if 1(true), data will break out each the species for each node

  • include_death_state – if 1(true), adds columns for the number of vectors that died in this state during this time step as well as the average age. It adds two columns for each of the following states: ADULT, INFECTED, INFECTIOUS, and MALE

  • include_wolbachia – if 1(true), add a column for each type of Wolbachia

  • include_gestation – if 1(true), adds columns for feeding and gestation

  • barcodes – a list of barcode strings. The report contains the number of human infections with each barcode. Use ‘*’ for a wild card at a loci to include all values at that loci. For example, “A*T” includes AAT, ACT, AGT, and ATT. The report contains a BarcodeOther column for barcodes that are not defined. Note: There is no validation that the barcode strings are valid barcodes for the scenario.

Returns

if task is not set, returns the configured reporter, otherwise returns nothing

emodpy_malaria.reporters.builtin.add_event_recorder(task, event_list: Optional[list] = None, only_include_events_in_list: bool = True, ips_to_record: Optional[list] = None, start_day: int = 0, end_day: int = 365000, node_ids: Optional[list] = None, min_age_years: float = 0, max_age_years: float = 365000, must_have_ip_key_value: str = '', must_have_intervention: str = '', property_change_ip_to_record: str = '')

Adds ReportEventRecorder report to the simulation. See class definition for description of the report.

Parameters
  • task – task to which to add the reporter

  • event_list – a list of events to record or exclude, depending on value of only_include_events_in_list

  • only_include_events_in_list – if True, only record events listed. if False, record ALL events EXCEPT for the ones listed

  • ips_to_record – list of individual properties to include in report

  • start_day – The day of the simulation to start collecting data

  • end_day – The day of the simulation to stop collecting data.

  • node_ids – Data will be collected for the nodes in this list, if None - all nodes have data collected.

  • min_age_years – Minimum age in years of people to collect data on

  • max_age_years – Maximum age in years of people to collect data on

  • must_have_ip_key_value – A Key:Value pair that the individual must have in order to be included. Empty string means don’t look at IndividualProperties

  • must_have_intervention – The name of the an intervention that the person must have in order to be included. Empty string means don’t look at the interventions

  • property_change_ip_to_record – If the string is not empty, then the recorder will add the PropertyChange event to the list of events that the report is listening to. However, it will only record the events where the property changed the value of the given key

Returns

Nothing

emodpy_malaria.reporters.builtin.add_report_intervention_pop_avg(task, manifest, start_day: int = 0, end_day: int = 36500000, node_ids: Optional[list] = None, min_age_years: float = 0, max_age_years: float = 365000, must_have_ip_key_value: str = '', must_have_intervention: str = '', filename_suffix: str = '')

Adds ReportInterventionPopAvg reporter. See class definition for description of the report.

Parameters
  • task – Task to which to add the reporter, if left as None, reporter is returned (used for unittests)

  • manifest – Schema path file

  • start_day – the day of the simulation to start collecting data

  • end_day – the day of the simulation to stop collecting data

  • node_ids – List of nodes for which to collect data

  • min_age_years – Minimum age in years of people to collect data on

  • max_age_years – Maximum age in years of people to collect data on

  • must_have_ip_key_value – a “Key:Value” pair that the individual must have in order to be included. Empty string means don’t look at IPs (individual properties)

  • must_have_intervention – the name of the an intervention that the person must have in order to be included. Empty string means don’t look at the interventions

  • filename_suffix – augments the filename of the report. If multiple reports are being generated, this allows you to distinguish among the multiple reports

Returns

if task is not set, returns the configured reporter, otherwise returns nothing

class emodpy_malaria.reporters.builtin.ReportVectorGenetics(class_name: typing.Optional[str] = None, parameters: dict = <factory>, Enabled: bool = True, Pretty_Format: bool = True)

Bases: emodpy.reporters.base.BuiltInReporter

The vector genetics report is a CSV-formatted report (ReportVectorGenetics.csv) that collects information on how many vectors of each genome/allele combination exist at each time, node, and vector state. Information can only be collected on one species per report.

config(config_builder, manifest)
parameters: dict
class emodpy_malaria.reporters.builtin.ReportInfectionStatsMalaria(class_name: typing.Optional[str] = None, parameters: dict = <factory>, Enabled: bool = True, Pretty_Format: bool = True)

Bases: emodpy.reporters.base.BuiltInReporter

config(config_builder, manifest)
parameters: dict
class emodpy_malaria.reporters.builtin.ReportVectorStats(class_name: typing.Optional[str] = None, parameters: dict = <factory>, Enabled: bool = True, Pretty_Format: bool = True)

Bases: emodpy.reporters.base.BuiltInReporter

The vector statistics report is a CSV-formatted report (ReportVectorStats.csv) that provides detailed life-cycle data on the vectors in the simulation. The report is stratified by time, node ID, and (optionally) species.

config(config_builder, manifest)
parameters: dict
class emodpy_malaria.reporters.builtin.MalariaSummaryReport(class_name: typing.Optional[str] = None, parameters: dict = <factory>, Enabled: bool = True, Pretty_Format: bool = True)

Bases: emodpy.reporters.base.BuiltInReporter

The population-level malaria summary report is a JSON-formatted report (MalariaSummaryReport.json) that provides a summary of malaria data across the population. The data are grouped into different bins such as age, parasitemia, and infectiousness.

config(config_builder, manifest)
parameters: dict
class emodpy_malaria.reporters.builtin.MalariaPatientJSONReport(class_name: typing.Optional[str] = None, parameters: dict = <factory>, Enabled: bool = True, Pretty_Format: bool = True)

Bases: emodpy.reporters.base.BuiltInReporter

The malaria patient data report is a JSON-formatted report (MalariaPatientReport.json) that provides medical data for each individual on each day of the simulation. For example, for a specified number of time steps, each “patient” has information collected on the temperature of their fever, their parasite counts, treatments they received, and other relevant data.

config(config_builder, manifest)
parameters: dict
class emodpy_malaria.reporters.builtin.ReportSimpleMalariaTransmissionJSON(class_name: typing.Optional[str] = None, parameters: dict = <factory>, Enabled: bool = True, Pretty_Format: bool = True)

Bases: emodpy.reporters.base.BuiltInReporter

The simple malaria transmission report (ReportSimpleMalariaTransmissionJSON.json) is a JSON-formatted report that provides data on malaria transmission, by tracking who transmitted malaria to whom. The report can only be used when the simulation setup parameter Malaria_Model is set to MALARIA_MECHANISTIC_MODEL_WITH_CO_TRANSMISSION. This report is typically used as input to the GenEpi model.

config(config_builder, manifest)
parameters: dict
class emodpy_malaria.reporters.builtin.ReportMalariaFiltered(class_name: typing.Optional[str] = None, parameters: dict = <factory>, Enabled: bool = True, Pretty_Format: bool = True)

Bases: emodpy.reporters.base.BuiltInReporter

The malaria filtered report (ReportMalariaFiltered.json) is the same as the default InsetChart report, but provides filtering options to enable the user to select the data to be displayed for each time step or for each node. See InsetChart for more information about InsetChart.json.

config(config_builder, manifest)
parameters: dict
class emodpy_malaria.reporters.builtin.SpatialReportMalariaFiltered(class_name: typing.Optional[str] = None, parameters: dict = <factory>, Enabled: bool = True, Pretty_Format: bool = True)

Bases: emodpy.reporters.base.BuiltInReporter

The filtered malaria spatial report (SpatialReportMalariaFiltered.bin) provides spatial information on malaria simulations and allows for filtering the data and collection over different intervals. This report is similar to the Spatial output report but allows for data collection and filtering over different intervals using the Start_Day and a Reporting_Interval parameters

config(config_builder, manifest)
parameters: dict
class emodpy_malaria.reporters.builtin.ReportMalariaFilteredIntraHost(class_name: typing.Optional[str] = None, parameters: dict = <factory>, Enabled: bool = True, Pretty_Format: bool = True)

Bases: emodpy.reporters.base.BuiltInReporter

The filtered malaria spatial report (ReportMalariaFilteredIntraHost.bin) provides TBD

config(config_builder, manifest)
parameters: dict
class emodpy_malaria.reporters.builtin.ReportEventCounter(class_name: typing.Optional[str] = None, parameters: dict = <factory>, Enabled: bool = True, Pretty_Format: bool = True)

Bases: emodpy.reporters.base.BuiltInReporter

The event counter report is a JSON-formatted file (ReportEventCounter.json) that keeps track of how many of each event types occurs during a time step. The report produced is similar to the InsetChart.json channel report, where there is one channel for each event defined in the configuration file (config.json).

config(config_builder, manifest)
parameters: dict
class emodpy_malaria.reporters.builtin.MalariaSqlReport(class_name: typing.Optional[str] = None, parameters: dict = <factory>, Enabled: bool = True, Pretty_Format: bool = True)

Bases: emodpy.reporters.base.BuiltInReporter

The MalariaSQL report outputs epidemiological and transmission data. Because of the quantity and complexity of the data, the report output is a multi-table SQLite relational database (see https://sqlitebrowser.org/). Use the configuration parameters to manage the size of the database.

config(config_builder, manifest)
parameters: dict
class emodpy_malaria.reporters.builtin.VectorHabitatReport(class_name: typing.Optional[str] = None, parameters: dict = <factory>, Enabled: bool = True, Pretty_Format: bool = True)

Bases: emodpy.reporters.base.BuiltInReporter

The vector habitat report is a JSON-formatted file (VectorHabitatReport.json) containing habitat data for each vector species included in the simulation. It focuses on statistics relevant to mosquito developmental stages (e.g. eggs and larvae), such as egg capacity and larval crowding.

config(config_builder, manifest)
parameters: dict
class emodpy_malaria.reporters.builtin.MalariaImmunityReport(class_name: typing.Optional[str] = None, parameters: dict = <factory>, Enabled: bool = True, Pretty_Format: bool = True)

Bases: emodpy.reporters.base.BuiltInReporter

The malaria immunity report is a JSON-formatted file (MalariaImmunityReport.json) that provides statistics for several antibody types for specified age bins over a specified reporting duration. Specifically, the report tracks the average and standard deviation in the fraction of observed antibodies for merozoite surface protein ( MSP), Plasmodium falciparum erythrocyte membrane protein 1 (PfEMP1), and non-specific (and less immunogenic) minor surface epitopes. The total possible is determined by parameters Falciparum_MSP_Variants, Falciparum_PfEMP1_Variants, and Falciparum_Nonspecific_Types. The greater the fraction, the more antibodies the individual has against possible new infections. The smaller the fraction, the more naïve the individual’s immune system is to malaria.

config(config_builder, manifest)
parameters: dict
class emodpy_malaria.reporters.builtin.MalariaSurveyJSONAnalyzer(class_name: str = None, parameters: dict = <factory>, Enabled: bool = True, Pretty_Format: bool = True)

Bases: emodpy.reporters.base.BuiltInReporter

config(config_builder, manifest)
parameters: dict
class emodpy_malaria.reporters.builtin.ReportDrugStatus(class_name: typing.Optional[str] = None, parameters: dict = <factory>, Enabled: bool = True, Pretty_Format: bool = True)

Bases: emodpy.reporters.base.BuiltInReporter

The drug status report provides status information on the drugs that an individual has taken or is waiting to take. Because the report provides information for each drug, for each individual, and for each time step, you may want to use the Start_Day and End_Day parameters to limit the size the output file.

config(config_builder, manifest)
parameters: dict
class emodpy_malaria.reporters.builtin.ReportHumanMigrationTracking(class_name: typing.Optional[str] = None, parameters: dict = <factory>, Enabled: bool = True, Pretty_Format: bool = True)

Bases: emodpy.reporters.base.BuiltInReporter

The human migration tracking report is a CSV-formatted report (ReportHumanMigrationTracking.csv) that provides details about human travel during simulations. The report provides one line for each surviving individual who migrates during the simulation.

config(config_builder, manifest)
parameters: dict
class emodpy_malaria.reporters.builtin.ReportNodeDemographics(class_name: typing.Optional[str] = None, parameters: dict = <factory>, Enabled: bool = True, Pretty_Format: bool = True)

Bases: emodpy.reporters.base.BuiltInReporter

The node demographics report is a CSV-formatted report (ReportNodeDemographics.csv) that provides population information stratified by node. For each time step, the report collects data on each node and age bin.

config(config_builder, manifest)
parameters: dict
class emodpy_malaria.reporters.builtin.ReportNodeDemographicsMalaria(class_name: typing.Optional[str] = None, parameters: dict = <factory>, Enabled: bool = True, Pretty_Format: bool = True)

Bases: emodpy.reporters.base.BuiltInReporter

This report extends the data collected in the ReportNodeDemographics by adding data about the number of infections with specific barcodes. The malaria node demographics genetics report does not include columns for Genome_Markers because this report assumes that the simulation setup parameter Malaria_Model is set to MALARIA_MECHANISTIC_MODEL_WITH_PARASITE_GENETICS.

Note: If you need detailed data on the infections with different barcodes, use the MalariaSqlReport. That report contains data on all barcodes, without specifying what they are.

config(config_builder, manifest)
parameters: dict
class emodpy_malaria.reporters.builtin.ReportNodeDemographicsMalariaGenetics(class_name: typing.Optional[str] = None, parameters: dict = <factory>, Enabled: bool = True, Pretty_Format: bool = True)

Bases: emodpy.reporters.base.BuiltInReporter

This report extends the data collected in the ReportNodeDemographics by adding data about the number of infections with specific barcodes. The malaria node demographics genetics report does not include columns for Genome_Markers because this report assumes that the simulation setup parameter Malaria_Model is set to MALARIA_MECHANISTIC_MODEL_WITH_PARASITE_GENETICS.

Note: If you need detailed data on the infections with different barcodes, use the MalariaSqlReport. That report contains data on all barcodes, without specifying what they are.

config(config_builder, manifest)
parameters: dict
class emodpy_malaria.reporters.builtin.ReportVectorMigration(class_name: typing.Optional[str] = None, parameters: dict = <factory>, Enabled: bool = True, Pretty_Format: bool = True)

Bases: emodpy.reporters.base.BuiltInReporter

This report provides detailed information on where and when vectors are migrating. Because there can be one line for each migrating vector, you may want to use the Start_Day and End_Day parameters to limit the size the output file.

config(config_builder, manifest)
parameters: dict
class emodpy_malaria.reporters.builtin.ReportVectorStatsMalariaGenetics(class_name: typing.Optional[str] = None, parameters: dict = <factory>, Enabled: bool = True, Pretty_Format: bool = True)

Bases: emodpy.reporters.base.BuiltInReporter

This report extends the data collected in the ReportVectorStats by adding data about the number of infections with specific barcodes. The malaria node demographics genetics report does not include columns for Genome_Markers because this report assumes that the simulation setup parameter Malaria_Model is set to MALARIA_MECHANISTIC_MODEL_WITH_PARASITE_GENETICS.

config(config_builder, manifest)
parameters: dict
class emodpy_malaria.reporters.builtin.ReportInterventionPopAvg(class_name: typing.Optional[str] = None, parameters: dict = <factory>, Enabled: bool = True, Pretty_Format: bool = True)

Bases: emodpy.reporters.base.BuiltInReporter

ReportInterventionPopAvg is a CSV-formatted report that gives population average data on the usage of interventions. It provides data on the fraction of people or nodes that have an intervention as well as averages on the intervention’s efficacy. For each persistent intervention that has been distributed to a node or person, the report provides one line in the CSV for each intervention used in that node. Since node-level intervention (usually vector control) can only have one per node, the data will be for that one intervention. The individual-level interventions will have data for the people in that node.

config(config_builder, manifest)
parameters: dict