import emodpy_malaria.demographics.MalariaDemographics as Demographics
def build_demog():
= Demographics.from_template_node(lat=1, lon=2, pop=1000, name="Example_Site")
demog
demog.SetEquilibriumVitalDynamics()
= Distributions.AgeDistribution_SSAfrica
age_distribution
demog.SetAgeDistribution(age_distribution)
= [0.5, 0.5]
initial_distribution ="StudyCohort", Values=["Placebo", "Treatment"],
demog.AddIndividualPropertyAndHINT(Property=initial_distribution)
InitialDistributionreturn demog
Adding Individual Properties to Demographics
Individual properties, possible property values, and initial distributions of property values must be specified in the demographics file.
In this example we create a study cohort where 50% of individuals are assigned to ‘Placebo’ and the other 50% are assigned to ‘Treatment’ without any transitions between the groups or differences in transmission by group. We add this property set directly to the basic demographics item. This example includes only one property but you can define as many as needed.