funpack.metaproc_functions

This module contains metaproc functions - functions for manipulating column metadata.

Some Column instances have a metadata attribute, containing some additional information about the column. The functions in this module can be used to modify these metadata values. Currently, column metadata is only used to generate a description of each column (via the --description_file command-line option - see funpack.main.generateDescription()).

All metaproc functions must accept three arguments:

  • The DataTable

  • The variable ID associated with the column. This may be None, if the column has been newly added, and is not associated with any other variable.

  • The metadata value.

funpack.metaproc_functions.codingDescriptionFromValue(dtable, vid, val)[source]

Generates a description for a value from a specific data coding.

funpack.metaproc_functions.hierarchicalDescriptionFromCode(dtable, vid, val)[source]

Generates a description for a hierarchical code (e.g. ICD10 code).

funpack.metaproc_functions.hierarchicalDescriptionFromNumeric(dtable, vid, val)[source]

Generates a description for a hierarchical code which has been passed through the codeToNumeric() cleaning function.