gbd_mapping_generator package
Submodules
gbd_mapping_generator.base_template_builder module
gbd_mapping_generator.build_mapping module
gbd_mapping_generator.cause_builder module
Tools for automatically generating the GBD cause mapping.
gbd_mapping_generator.covariate_builder module
- gbd_mapping_generator.covariate_builder.make_covariate(name, cov_id, by_age, by_sex, dichotomous)[source]
Creates a single Covariate based on the supplied parameters.
gbd_mapping_generator.data module
gbd_mapping_generator.etiology_builder module
gbd_mapping_generator.globals module
gbd_mapping_generator.id_builder module
gbd_mapping_generator.risk_builder module
- gbd_mapping_generator.risk_builder.make_risk(name, rei_id, most_detailed, level, paf_calculation_type, affected_causes, paf_of_one_causes, distribution, levels, tmred, scalar, restrictions)[source]
- Return type:
gbd_mapping_generator.sequela_builder module
gbd_mapping_generator.util module
- gbd_mapping_generator.util.make_module_docstring(description, file)[source]
Generates standard header with additional information from the description.
- gbd_mapping_generator.util.make_import(module_to_import, imports=())[source]
Generates the necessary imports. Smart about importing modules or names.
- gbd_mapping_generator.util.replace_numeric_prefix(name)[source]
Variables cannot start with numeric characters. Replace with the word. This only occurs 3 times using GBD 2019 data.
- gbd_mapping_generator.util.to_id(number, id_type)[source]
Wrap the id value with the id type. Be mindful of NaN values.
- gbd_mapping_generator.util.make_class_sig(name, superclass=None, docstring=None)[source]
Generate class signature from a name and additional information.
- Parameters:
name – Name of the generated class.
superclass – Parent class.
docstring – Documentation for the generated class.
- Returns:
String representation of named class.
- Return type:
- gbd_mapping_generator.util.make_slots(field_list)[source]
Generate explicit object attributes using slots (instead of dict).
- gbd_mapping_generator.util.make_init(field_dtype_tuples)[source]
Generate the __init__ function as part of class generation.
- gbd_mapping_generator.util.make_super_call(superclass)[source]
Generate the call to initialize the parent class.
- gbd_mapping_generator.util.make_attribute_assignment(field_names)[source]
Generate the class attributes and initialize them.