Add Support For NHSN PRISM Thresholds - #251
Merged
dylanhmorris merged 36 commits intoAug 17, 2026
Merged
Conversation
Contributor
Author
|
An example for pkgload::load_all(".")
str(prism_thresholds, max.level = 1)
lapply(prism_thresholds, dim)
# List of 2
# $ nssp: num [1:6, 1:4, 1:53, 1:2] 0 0.12 0.158 0.195 0.233 ...
# ..- attr(*, "dimnames")=List of 4
# $ nhsn: num [1:6, 1:3, 1:49, 1, 1:2] 0 15 22 40 50.9 ...
# ..- attr(*, "dimnames")=List of 5
wa_flu_nhsn <- get_prism_cutpoints("WA", "Influenza", signal = "NHSN")
print(wa_flu_nhsn)
# [[1]]
# very_low low moderate high very_high upper_bound
# 0.00000 80.49482 184.53374 657.32177 928.29039 Inf
wa_flu_nhsn_rate <- get_prism_cutpoints(
"WA",
"Influenza",
signal = "NHSN",
unit = "rate"
)
print(wa_flu_nhsn_rate)
# [[1]]
# very_low low moderate high very_high upper_bound
# 0.000000 1.036759 2.376762 8.466189 11.956217 Inf
wa_flu_nssp <- get_prism_cutpoints("WA", "Influenza", signal = "NSSP")
print(wa_flu_nssp)
# [[1]]
# prop_very_low prop_low prop_moderate prop_high
# 0.000000000 0.002766458 0.030385827 0.058005195
# prop_very_high prop_upper_bound
# 0.085624564 1.000000000 |
dylanhmorris
reviewed
Aug 4, 2026
dylanhmorris
reviewed
Aug 4, 2026
…e_prism-handle-both-nhsn-and-nssp-thresholds
…rize_prism-handle-both-nhsn-and-nssp-thresholds' of github.com:CDCgov/forecasttools into 250-add-prism-nhsn-thresholds-make-categorize_prism-handle-both-nhsn-and-nssp-thresholds
Contributor
Author
|
Same pkgload::load_all(".")
str(prism_thresholds, max.level = 1)
lapply(prism_thresholds, dim)
# List of 2
# $ nssp: num [1:6, 1:4, 1:53, 1:2] 0 0.12 0.158 0.195 0.233 ...
# ..- attr(*, "dimnames")=List of 4
# $ nhsn: num [1:6, 1:3, 1:49, 1] 0 2.11 3.09 5.62 7.15 ...
# ..- attr(*, "dimnames")=List of 4
wa_flu_nhsn <- get_prism_cutpoints("WA", "Influenza", signal = "NHSN")
print(wa_flu_nhsn)
# [[1]]
# very_low low moderate high very_high upper_bound
# 0.00000 80.49482 184.53374 657.32177 928.29039 Inf
wa_flu_nssp <- get_prism_cutpoints("WA", "Influenza", signal = "NSSP")
print(wa_flu_nssp)
# [[1]]
# prop_very_low prop_low prop_moderate prop_high
# 0.000000000 0.002766458 0.030385827 0.058005195
# prop_very_high prop_upper_bound
# 0.085624564 1.000000000 |
O957
marked this pull request as ready for review
August 6, 2026 16:07
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #251 +/- ##
==========================================
+ Coverage 74.92% 75.22% +0.30%
==========================================
Files 36 36
Lines 2042 2067 +25
==========================================
+ Hits 1530 1555 +25
Misses 512 512 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
dylanhmorris
reviewed
Aug 6, 2026
dylanhmorris
reviewed
Aug 6, 2026
This was referenced Aug 6, 2026
dylanhmorris
reviewed
Aug 7, 2026
Collaborator
|
Flagging that I've added this requirement to the issue @O957
|
dylanhmorris
reviewed
Aug 7, 2026
dylanhmorris
requested changes
Aug 14, 2026
dylanhmorris
left a comment
Collaborator
There was a problem hiding this comment.
Thanks @O957. A few more changes needed but I think this can land today.
dylanhmorris
requested changes
Aug 17, 2026
dylanhmorris
deleted the
250-add-prism-nhsn-thresholds-make-categorize_prism-handle-both-nhsn-and-nssp-thresholds
branch
August 17, 2026 19:52
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR: