get_aggregated_data() performs data transformation in the following steps:
Group the weekly or daily data by date.
Aggregate the number of confirmed cases by either day or week.
Select only the date and confirmed cases column.
Filter the data by given start and end date
The input dataframe generic_data must have the following columns:
<date name>: date column (e.g. as.Date('2022-01-01')).
<cases count name>: Confirmed Cases Count (e.g. 1, 2, ...).
Note that these columns can be defined in a generic name, and inputted as
the other two function parameters for data transformation (date_column,
number_column)
Assume the date column is the start of the epiweek.