@@ -391,9 +391,12 @@ def show_additional_projections(
391
391
392
392
393
393
def draw_projected_admissions_table (
394
- st , projection_admits : pd .DataFrame , as_date : bool = False
394
+ st , projection_admits : pd .DataFrame , as_date : bool = False , daily_count : bool = False ,
395
395
):
396
- admits_table = projection_admits [np .mod (projection_admits .index , 7 ) == 0 ].copy ()
396
+ if daily_count == True :
397
+ admits_table = projection_admits [np .mod (projection_admits .index , 1 ) == 0 ].copy ()
398
+ else :
399
+ admits_table = projection_admits [np .mod (projection_admits .index , 7 ) == 0 ].copy ()
397
400
admits_table ["day" ] = admits_table .index
398
401
admits_table .index = range (admits_table .shape [0 ])
399
402
admits_table = admits_table .fillna (0 ).astype (int )
@@ -406,8 +409,11 @@ def draw_projected_admissions_table(
406
409
return None
407
410
408
411
409
- def draw_census_table (st , census_df : pd .DataFrame , as_date : bool = False ):
410
- census_table = census_df [np .mod (census_df .index , 7 ) == 0 ].copy ()
412
+ def draw_census_table (st , census_df : pd .DataFrame , as_date : bool = False , daily_count : bool = False ):
413
+ if daily_count == True :
414
+ census_table = census_df [np .mod (census_df .index , 1 ) == 0 ].copy ()
415
+ else :
416
+ census_table = census_df [np .mod (census_df .index , 7 ) == 0 ].copy ()
411
417
census_table .index = range (census_table .shape [0 ])
412
418
census_table .loc [0 , :] = 0
413
419
census_table = census_table .dropna ().astype (int )
0 commit comments