emod_api.demographics.Node module

class emod_api.demographics.Node.Node(lat, lon, pop, name: Optional[str] = None, area: Optional[float] = None, forced_id: Optional[int] = None, individual_attributes: Optional[emod_api.demographics.PropertiesAndAttributes.IndividualAttributes] = None, individual_properties: Optional[emod_api.demographics.PropertiesAndAttributes.IndividualProperties] = None, node_attributes: Optional[emod_api.demographics.PropertiesAndAttributes.NodeAttributes] = None, meta: Optional[dict] = None)[source]

Bases: emod_api.demographics.Updateable.Updateable

default_population = 1000
res_in_degrees = 0.041666666666666664
to_dict() dict[source]
to_tuple()[source]
property id
classmethod init_resolution_from_file(fn)[source]
classmethod from_data(data: dict)[source]

Function used to create the node object from data (most likely coming from a demographics file) :param data: :return:

property pop
property lon
property lat
property birth_rate
class emod_api.demographics.Node.OverlayNode(node_id, latitude=None, longitude=None, initial_population=None, **kwargs)[source]

Bases: emod_api.demographics.Node.Node

Node that only requires an ID. Use to overlay a Node.

emod_api.demographics.Node.get_xpix_ypix(nodeid)[source]
emod_api.demographics.Node.lat_lon_from_nodeid(nodeid, res_in_deg=0.041666666666666664)[source]
emod_api.demographics.Node.xpix_ypix_from_lat_lon(lat, lon, res_in_deg=0.041666666666666664)[source]
emod_api.demographics.Node.nodeid_from_lat_lon(lat, lon, res_in_deg=0.041666666666666664)[source]
emod_api.demographics.Node.nodes_for_DTK(filename, nodes)[source]
emod_api.demographics.Node.basicNode(lat: float = 0, lon: float = 0, pop: int = 1000000, name: str = 'node_name', forced_id: int = 1)[source]