diff --git a/_delphi_utils_python/delphi_utils/__init__.py b/_delphi_utils_python/delphi_utils/__init__.py index 5d8dbfcc6..db3b9c0d8 100644 --- a/_delphi_utils_python/delphi_utils/__init__.py +++ b/_delphi_utils_python/delphi_utils/__init__.py @@ -12,5 +12,6 @@ from .geomap import GeoMapper from .smooth import Smoother from .signal import add_prefix +from .nancodes import Nans __version__ = "0.1.0" diff --git a/_delphi_utils_python/delphi_utils/nancodes.py b/_delphi_utils_python/delphi_utils/nancodes.py new file mode 100644 index 000000000..e9e5a915a --- /dev/null +++ b/_delphi_utils_python/delphi_utils/nancodes.py @@ -0,0 +1,13 @@ +"""Unified not-a-number codes for CMU Delphi codebase.""" + +from enum import IntEnum + +class Nans(IntEnum): + """An enum of not-a-number codes for the indicators.""" + + NOT_MISSING = 0 + NOT_APPLICABLE = 1 + REGION_EXCEPTION = 2 + PRIVACY = 3 + DELETED = 4 + UNKNOWN = 5