Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FLAG-1128] Incorrect query in weekly VIIRS alert widget #4815

Merged
merged 7 commits into from
Jul 16, 2024

Conversation

willian-viana
Copy link
Collaborator

@willian-viana willian-viana commented Jun 24, 2024

Overview

In Slack, Jimmy noted that something seems to be wrong with weekly VIIRS alert widget; he thinks it is a front end issue and has to do with the way it is being queried. The downloaded data looks correct and has data through this week.
Alongside this task, new bugs were found.

Example from Yukon, Canada:
yukon

Demo

Screenshot 2024-07-11 at 14 48 05

@willian-viana willian-viana requested a review from wri7tno June 24, 2024 21:40
@willian-viana willian-viana self-assigned this Jun 24, 2024
@willian-viana willian-viana temporarily deployed to gfw-staging-pr-4815 June 24, 2024 21:44 Inactive
@@ -71,7 +72,7 @@ export const getData = createSelector(
};

years.forEach((year) => {
const yearDataByWeek = groupBy(groupedByYear[year], 'week');
const yearDataByWeek = toArray(groupBy(groupedByYear[year], 'week'));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch

Copy link
Collaborator

@wri7tno wri7tno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Recharts uses dataKey to set the unique value displayed at XAxis.
We were using date for it but hiding most part to display only 12 dates
Now we are using month and setting it as a unique value
Now when the user selects confidence 'all' we count the alerts for the three different confidence levels
@willian-viana willian-viana force-pushed the fix/weekly-fire-alerts-FLAG-1128 branch from 06d3691 to 8a4ec20 Compare July 16, 2024 15:30
@willian-viana willian-viana temporarily deployed to gfw-staging-pr-4815 July 16, 2024 15:30 Inactive
@willian-viana willian-viana merged commit 3531f5c into develop Jul 16, 2024
4 checks passed
@willian-viana willian-viana deleted the fix/weekly-fire-alerts-FLAG-1128 branch July 16, 2024 15:37
@willian-viana willian-viana mentioned this pull request Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants