Adding category count to BE signals (#1486)

Added category count to downloadable data and backend signals.
This commit is contained in:
Emma Nechamkin 2022-03-29 17:11:57 -04:00 committed by GitHub
commit 0c07cdac55
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 45 additions and 37 deletions

View file

@ -591,6 +591,7 @@ LOW_READING_LOW_HS_EDUCATION_FIELD = (
)
THRESHOLD_COUNT = "Total threshold criteria exceeded"
CATEGORY_COUNT = "Total categories exceeded"
FPL_200_SERIES = "Is low income?"
FPL_200_AND_COLLEGE_ATTENDANCE_SERIES = (

View file

@ -832,6 +832,7 @@ class ScoreM(Score):
field_names.M_HEALTH,
field_names.M_WORKFORCE,
]
self.df[field_names.CATEGORY_COUNT] = self.df[factors].sum(axis=1)
self.df[field_names.SCORE_M_COMMUNITIES] = self.df[factors].any(axis=1)
# Note: this is purely used for comparison tool analysis, and can be removed at a later date. - LMB.