Skip to content

Commit c2389bd

Browse files
committed
historic report data is a single dict not a list
1 parent d757ed5 commit c2389bd

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/acquisition/rvdss/run.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,15 @@ def update_historical_data():
5353
for tt in table_types.keys():
5454
# Merge tables together from dashboards and reports for each table type.
5555
dashboard_data = [elem.get(tt, pd.DataFrame()) for elem in dashboard_dict_list] # a list of all the dashboard tables
56-
report_data = [elem.get(tt, None) for elem in report_dict_list] # a list of the report table
56+
report_data = report_dict_list.get(tt, None) # a list of the report table
5757

58-
all_report_tables = pd.concat(report_data)
5958
all_dashboard_tables = pd.concat(dashboard_data)
6059

61-
if all_dashboard_tables.empty == False and all_report_tables.empty == False:
60+
if all_dashboard_tables.empty == False and report_data.empty == False:
6261
all_dashboard_tables=all_dashboard_tables.reset_index()
6362
all_dashboard_tables=all_dashboard_tables.set_index(['epiweek', 'time_value', 'issue', 'geo_type', 'geo_value'])
6463

65-
hist_dict_list[tt] = pd.concat([all_report_tables, all_dashboard_tables])
64+
hist_dict_list[tt] = pd.concat([report_data, all_dashboard_tables])
6665

6766
# Combine all rables into a single table
6867
data = combine_tables(hist_dict_list)
@@ -91,7 +90,7 @@ def main():
9190
"--patch",
9291
"-pat",
9392
action="store_true",
94-
help="path in the 2024-2025 season, which is unarchived and must be obtained through a csv"
93+
help="patch in the 2024-2025 season, which is unarchived and must be obtained through a csv"
9594
)
9695
# fmt: on
9796
args = parser.parse_args()

0 commit comments

Comments
 (0)