How cdcgov/pynssp works
pynssp is a Python toolkit for NSSP syndromic-surveillance workflows. Users can prepare authenticated profiles, adjust ESSENCE API dates, retrieve tabular or graph responses, and analyze time series with alert detectors or trend classification; bundled simulated series and NSSP stopwords support local analysis. The graph captures those distinct capabilities and the switch detector’s documented selection of regression or EWMA. Several utility and detector implementations were not sampled, so their internal links are omitted; documented but unsampled capabilities are represented without guessed call paths.
Main entry points: token.py Token · utils.py Profiles and dates · switch.py Regression EWMA switch · container.py API graphs
Components 17
ESSENCE access
- Profiles and dates
pynssp/utils.py - Credentials
pynssp/core/credentials.py - Token
pynssp/core/token.py - API data
pynssp/utils.py - API graphs
pynssp/core/container.py
Surveillance analysis
- EWMA alerts
pynssp/detectors/ewma.py - Regression alerts
pynssp/detectors/regression.py - Regression EWMA switch
pynssp/detectors/switch.py - Negative binomial alerts
pynssp/detectors/nbinom.py - Serfling alerts
pynssp/detectors/serfling.py - Trend classification
pynssp/detectors/trend.py
Local resources
- Simulated time series
pynssp/data.py - NSSP stopwords
pynssp/data.py
Core structures
- Response containers
pynssp/core/container.py - HTTP status map
pynssp/core/constants.py
Other components
- Analyst
- ESSENCE API
Connections 20
- Analyst → Profiles and dates: creates profile
README.md - Analyst → API data: requests data
README.md - Profiles and dates → Credentials: creates credentials
pynssp/utils.py - Profiles and dates → Token: creates token
pynssp/utils.py - API data → Token: delegates request
pynssp/utils.py - Token → ESSENCE API: sends authenticated request
pynssp/core/token.py - Token → HTTP status map: looks up status
pynssp/core/token.py - Token → Response containers: returns graph object
pynssp/core/token.py - Analyst → API graphs: requests graph
- API graphs → Token: uses token response
pynssp/core/token.py - Analyst → EWMA alerts: analyzes series
- Analyst → Regression alerts: analyzes series
- Analyst → Regression EWMA switch: analyzes series
- Analyst → Negative binomial alerts: analyzes series
- Analyst → Serfling alerts: analyzes series
- Analyst → Trend classification: classifies trend
- Regression EWMA switch → Regression alerts: runs first
pynssp/detectors/switch.py - Regression EWMA switch → EWMA alerts: switches to
pynssp/detectors/switch.py - Analyst → Simulated time series: loads examples
- Analyst → NSSP stopwords: loads vocabulary