src.postprocess package¶
Submodules¶
src.postprocess.CDC_ITF module¶
-
src.postprocess.CDC_ITF.
postprocess
(data: <sphinx.ext.autodoc.importer._MockObject object at 0x7f5c803c3be0>)[source]¶ Apply dataset-level transformations to CDC_ITF data.
Parameters: data (pd.DataFrame) – Input CDC_ITF data. Returns: CDC_ITF data with transformations appied. Return type: pd.DataFrame
-
src.postprocess.CDC_ITF.
remove_id_duplicates
(data: <sphinx.ext.autodoc.importer._MockObject object at 0x7f5c803c37f0>)[source]¶ Remove duplicate records with identical measure_stage values
Removes duplicate records with identical values in ref_cols.
Parameters: data (pd.DataFrame) – Input CDC_ITF data. Returns: Data with duplicates removed. Return type: pd.DataFrame
src.postprocess.JH_HIT module¶
-
src.postprocess.JH_HIT.
combine_measures
(data: <sphinx.ext.autodoc.importer._MockObject object at 0x7f5c803de6a0>, who_code: str, id_stub: str)[source]¶ Combine groups of records with an arbitrary who_code.
Example:
Groups are defined by records with identical numeric prop_id values:
333_school_secondary, 333_school_nursery, 333_school_primary etc. -> 333_school_closure
or
234_border_in, 234_border_out -> 234_border_closure
Parameters: - data (pd.DataFrame) – Input data.
- who_code (str) – who_code to combine.
- id_stub (str) – Stub name to add to combined ID numbers.
Returns: Data with combination applied.
Return type: pd.DataFrame