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