Fix for Issue #2 [Overlapping of graph date intervals (cases.html) ] #3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As described in the issue #2 , the line plots consisted of overlapping date intervals in the period preceding 2023-01-02 to 2023-01-15.
After the migration of the primary data source from JHU's COVID-19 data to WHO's data, the merging of the df_cases_r_data and df_cases_data dataframes (in line 1402 of the genomics.py file) were leading to the extra date periods.
After performing a groupby on location (for a 2 week period) on JHU's data, in the df_cases_data file, the date periods started from '2020-03-08','2020-03-22',....... all the way to .......,'2023-03-05', '2023-03-19' as seen in the commit made on March 11 2023. https://raw.githubusercontent.com/3dgiordano/SARS-CoV-2-Variants/515d9a19ff7c9c85b9a7247107402a04dfc79eab/data/cases_r.csv
The df_cases_r_data dataframe consisted of date periods from '2020-04-05','2020-04-19',..... all the way to .....,'2022-12-25','2023-01-08'.
Hence, the merge of the df_cases_data and df_cases_r_data was working perfectly as they have similar dates.
However, after the migration to WHO data, the the date periods started from '2020-01-05','2020-01-19',....... all the way to .......,'2023-03-12', '2023-03-26'. This leads to issues while merging with df_cases_r_data, as there are different dates in df_cases_data and df_cases_r_data.
Through this pull request, I have made a small change in order to offset the start date in df_cases_r_data by a week in order to have the dates in both df_cases_data and df_cases_r_data in sync that would lead to the resolution of the issue.