emodpy_covid.demographics.CovidDemographics module

emodpy_covid.demographics.CovidDemographics.mat_magic(geog='AFRO:GHA', spike=False, data_dir=None)

HINT matrix construction :param geog: Geography Key. :type geog: str :param spike: Contact spike :type spike: bool

Returns

tuple

Return type

HINT setup inputs

class emodpy_covid.demographics.CovidDemographics.CovidDemographics(nodes, idref='Gridded world grump2.5arcmin', base_file=None)

Bases: emod_api.demographics.Demographics.Demographics

This class is derived from emod_api.demographics’ Demographics class so that we can set certain defaults for Covid in construction. Keen observers will note thatt SetDefaultProperties does not look like a Covid-specific function. But as we add other disease types the generalizations and speicfics will become clearer. The architectural point is solid.

emodpy_covid.demographics.CovidDemographics.from_synth_pop(tot_pop=1000000.0, num_nodes=100, frac_rural=0.3, id_ref='from_synth_pop')

This function creates a multi-node CovidDemographics instance from the params you give it.

Parameters
  • tot_pop – Total population

  • num_nodes – Number of nodes

  • frac_rural – Floating point fraction that determines in a single param how population is spread across the nodes

  • id_ref – Tag that appears in demographics file.

Returns

GENERIC_SIM demographics instance which can be customized and/or written to file.

emodpy_covid.demographics.CovidDemographics.fromBasicNode(lat=0, lon=0, pop=1000000.0, name=1, forced_id=1)

This function creates a single-node CovidDemographics instance from the params you give it.

Parameters
  • lat – latitude (not really used)

  • lon – longitude (not really used)

  • pop – population. Defaults to 1 million.

  • name – node name (not really used)

  • forced_id – node id (not really used)

Returns

GENERIC_SIM demographics instance which can be customized and/or written to file.