emodpy_hiv.country_model module#
- class emodpy_hiv.country_model.DefaultZambiaData[source]#
Bases:
object
This class contains the default data file paths for Zambia.
- data_root = Path('/home/docs/checkouts/readthedocs.org/user_builds/institute-for-disease-modeling-emodpy-hiv/envs/latest/lib/python3.9/site-packages/emodpy_hiv-1.4.2-py3.9.egg', 'emodpy_hiv/country_data/zambia/')#
- historical_vmmc_data_file = Path('/home/docs/checkouts/readthedocs.org/user_builds/institute-for-disease-modeling-emodpy-hiv/envs/latest/lib/python3.9/site-packages/emodpy_hiv-1.4.2-py3.9.egg', 'emodpy_hiv/country_data/zambia/historical_vmmc_data.csv')#
- initial_age_distribution_file = Path('/home/docs/checkouts/readthedocs.org/user_builds/institute-for-disease-modeling-emodpy-hiv/envs/latest/lib/python3.9/site-packages/emodpy_hiv-1.4.2-py3.9.egg', 'emodpy_hiv/country_data/zambia/initial_age_distribution.csv')#
- initial_population_file = Path('/home/docs/checkouts/readthedocs.org/user_builds/institute-for-disease-modeling-emodpy-hiv/envs/latest/lib/python3.9/site-packages/emodpy_hiv-1.4.2-py3.9.egg', 'emodpy_hiv/country_data/zambia/initial_population.csv')#
- female_mortality_file = Path('/home/docs/checkouts/readthedocs.org/user_builds/institute-for-disease-modeling-emodpy-hiv/envs/latest/lib/python3.9/site-packages/emodpy_hiv-1.4.2-py3.9.egg', 'emodpy_hiv/country_data/zambia/parsed_mortality--female.csv')#
- male_mortality_file = Path('/home/docs/checkouts/readthedocs.org/user_builds/institute-for-disease-modeling-emodpy-hiv/envs/latest/lib/python3.9/site-packages/emodpy_hiv-1.4.2-py3.9.egg', 'emodpy_hiv/country_data/zambia/parsed_mortality--male.csv')#
- fertility_file = Path('/home/docs/checkouts/readthedocs.org/user_builds/institute-for-disease-modeling-emodpy-hiv/envs/latest/lib/python3.9/site-packages/emodpy_hiv-1.4.2-py3.9.egg', 'emodpy_hiv/country_data/zambia/parsed_fertility.csv')#
- class emodpy_hiv.country_model.Country(country_name: str, base_year: float = 1960.5)[source]#
Bases:
ABC
- static load_nchooser_distribution_data(file_path: str) dict [source]#
Load target distribution data into a dataframe format that works for Nchooser and group by node_id. :param file_path: path to the csv file that contains the data
- Returns:
a dictionary that has node_id as the key and a dataframe as the value. The dataframe contains the distribution data for Nchooser.
- Return type:
- add_male_circumcision(campaign, historical_vmmc_data_filepath, traditional_male_circumcision_coverages_per_node)[source]#
- add_historical_vmmc_nchooser(campaign, historical_vmmc_data_filepath: str, historical_vmmc_reduced_acquire=0.6, historical_vmmc_start_year=2008)[source]#
- add_traditional_male_circumcision(campaign, traditional_male_circumcision_coverages_per_node: dict)[source]#
- add_health_care_testing(campaign: <module 'emod_api.campaign' from '/home/docs/checkouts/readthedocs.org/user_builds/institute-for-disease-modeling-emodpy-hiv/envs/latest/lib/python3.9/site-packages/emod_api/campaign.py'>, hct_start_year: float = 1990)[source]#
- add_state_TestingOnANC(campaign: <module 'emod_api.campaign' from '/home/docs/checkouts/readthedocs.org/user_builds/institute-for-disease-modeling-emodpy-hiv/envs/latest/lib/python3.9/site-packages/emod_api/campaign.py'>)[source]#
- add_state_TestingOnChild6w(campaign: <module 'emod_api.campaign' from '/home/docs/checkouts/readthedocs.org/user_builds/institute-for-disease-modeling-emodpy-hiv/envs/latest/lib/python3.9/site-packages/emod_api/campaign.py'>)[source]#
- add_state_HCTUptakeAtDebut(campaign: <module 'emod_api.campaign' from '/home/docs/checkouts/readthedocs.org/user_builds/institute-for-disease-modeling-emodpy-hiv/envs/latest/lib/python3.9/site-packages/emod_api/campaign.py'>, start_day: int)[source]#
- add_state_HCTUptakePostDebut(campaign: <module 'emod_api.campaign' from '/home/docs/checkouts/readthedocs.org/user_builds/institute-for-disease-modeling-emodpy-hiv/envs/latest/lib/python3.9/site-packages/emod_api/campaign.py'>, start_day: int)[source]#
- add_state_HCTTestingLoop(campaign: <module 'emod_api.campaign' from '/home/docs/checkouts/readthedocs.org/user_builds/institute-for-disease-modeling-emodpy-hiv/envs/latest/lib/python3.9/site-packages/emod_api/campaign.py'>, start_day: int)[source]#
- add_state_TestingOnSymptomatic(campaign: <module 'emod_api.campaign' from '/home/docs/checkouts/readthedocs.org/user_builds/institute-for-disease-modeling-emodpy-hiv/envs/latest/lib/python3.9/site-packages/emod_api/campaign.py'>, start_day: int)[source]#
- add_state_ARTStagingDiagnosticTest(campaign: <module 'emod_api.campaign' from '/home/docs/checkouts/readthedocs.org/user_builds/institute-for-disease-modeling-emodpy-hiv/envs/latest/lib/python3.9/site-packages/emod_api/campaign.py'>, start_day: int)[source]#
- add_state_ARTStaging(campaign: <module 'emod_api.campaign' from '/home/docs/checkouts/readthedocs.org/user_builds/institute-for-disease-modeling-emodpy-hiv/envs/latest/lib/python3.9/site-packages/emod_api/campaign.py'>, start_day: int)[source]#
- add_state_LinkingToPreART(campaign: <module 'emod_api.campaign' from '/home/docs/checkouts/readthedocs.org/user_builds/institute-for-disease-modeling-emodpy-hiv/envs/latest/lib/python3.9/site-packages/emod_api/campaign.py'>, start_day: int)[source]#
- add_state_OnPreART(campaign: <module 'emod_api.campaign' from '/home/docs/checkouts/readthedocs.org/user_builds/institute-for-disease-modeling-emodpy-hiv/envs/latest/lib/python3.9/site-packages/emod_api/campaign.py'>, start_day: int)[source]#
- add_state_LinkingToART(campaign: <module 'emod_api.campaign' from '/home/docs/checkouts/readthedocs.org/user_builds/institute-for-disease-modeling-emodpy-hiv/envs/latest/lib/python3.9/site-packages/emod_api/campaign.py'>, start_day: int)[source]#
- add_state_OnART(campaign: <module 'emod_api.campaign' from '/home/docs/checkouts/readthedocs.org/user_builds/institute-for-disease-modeling-emodpy-hiv/envs/latest/lib/python3.9/site-packages/emod_api/campaign.py'>, start_day: int)[source]#
- add_state_LostForever(campaign: <module 'emod_api.campaign' from '/home/docs/checkouts/readthedocs.org/user_builds/institute-for-disease-modeling-emodpy-hiv/envs/latest/lib/python3.9/site-packages/emod_api/campaign.py'>, start_day: int)[source]#
- build_campaign(schema_path: str, base_year: float, historical_vmmc_data_filepath: str | Traversable, traditional_male_circumcision_coverages_per_node: dict)[source]#
A method to pass into EMODTask to build campaign events for Emod.
- Parameters:
schema_path (str) – file path to the schema file.
base_year (float) – base year for the Simulation.
historical_vmmc_data_filepath (str) – file path to the historical vmmc data csv file.
traditional_male_circumcision_coverages_per_node(Dict[int – float]): coverage of traditional male circumcision per node.
Returns:
- class emodpy_hiv.country_model.Zambia(country_name='Zambia')[source]#
Bases:
Country
Zambia country model class. This class is a subclass of the Country class and implements the build_campaign method to build campaign object to be used with EMODTask.
Example
>>> from emodpy_hiv.country_model import Zambia >>> from emodpy.emod_task import EMODTask >>> import manifest >>> from functools import partial >>> zambia = Zambia() >>> # Define a campaign_builder function to pass in the required arguments for the zambia.build_campaign() method. >>> def campaign_builder(): >>> return zambia.build_campaign(schema_path=manifest.schema_file, base_year=1960.5) >>> # Alternatively, you can use the partial function to pass in the required arguments for the >>> # zambia.build_campaign() method. For example: >>> # campaign_builder = partial(zambia.build_campaign, schema_path=manifest.schema_file, base_year=1960.5) >>> # Create an EMODTask object using the campaign_builder function >>> task = EMODTask.from_default2(config_path="config.json", >>> eradication_path=manifest.eradication_path, >>> campaign_builder=campaign_builder, ...)
- build_campaign(schema_path: str, base_year: float = 1960.5, historical_vmmc_data_filepath: str | Traversable = Path('/home/docs/checkouts/readthedocs.org/user_builds/institute-for-disease-modeling-emodpy-hiv/envs/latest/lib/python3.9/site-packages/emodpy_hiv-1.4.2-py3.9.egg', 'emodpy_hiv/country_data/zambia/historical_vmmc_data.csv'), traditional_male_circumcision_coverages_per_node: Dict[int, float] | None = None)[source]#
A method to pass into EMODTask to build campaign events for Emod.
- Parameters:
schema_path (str) – file path to the schema file.
base_year (float) – base year for the Simulation.
historical_vmmc_data_filepath (str) – file path to the historical vmmc data csv file.
traditional_male_circumcision_coverages_per_node(Dict[int – float]): coverage of traditional male circumcision per node.
Returns: