Skip to content

Commit 3c01c09

Browse files
committed
Add nancodes enum util
1 parent 9aa5a10 commit 3c01c09

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

_delphi_utils_python/delphi_utils/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@
1212
from .geomap import GeoMapper
1313
from .smooth import Smoother
1414
from .signal import add_prefix
15+
from .nancodes import Nans
1516

1617
__version__ = "0.1.0"
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
"""Unified not-a-number codes for the indicators.
2+
3+
Currently requires a manual sync between the covidcast-indicators
4+
and the delphi-epidata repo.
5+
* in covidcast-indicators: _delphi_utils_python/delphi_utils
6+
* in delphi-epidata: src/acquisition/covidcast
7+
"""
8+
9+
from enum import IntEnum
10+
11+
class Nans(IntEnum):
12+
"""An enum of not-a-number codes for the indicators."""
13+
14+
NOT_MISSING = 0
15+
NOT_APPLICABLE = 1
16+
REGION_EXCEPTION = 2
17+
PRIVACY = 3
18+
DELETED = 4
19+
UNKNOWN = 5

0 commit comments

Comments
 (0)