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

PROD Deploy 2023-10-23 10:19am EST #4713

Merged
merged 4 commits into from
Oct 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions components/widgets/fires/burned-area-cumulative/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ const defaultConfig = {
fires: 3,
},
settings: {
dataset: 'modis_burned_area',
dataset: 'viirs',
firesThreshold: 0,
},
sentences: {
Expand Down Expand Up @@ -151,12 +151,10 @@ export default {
refetchKeys: ['dataset'],
getWidget: (widgetSettings) => {
// called when settings changes
if (!widgetSettings || !widgetSettings.dataset) {
return defaultConfig;
}
if (widgetSettings.dataset !== 'modis_burned_area') {
if (widgetSettings?.dataset !== 'modis_burned_area') {
return firesAlertsCumulative;
}

return defaultConfig;
},
};
8 changes: 3 additions & 5 deletions components/widgets/fires/burned-area-ranked/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ const defaultConfig = {
page: 0,
period: 'week',
weeks: 4,
dataset: 'modis_burned_area',
dataset: 'viirs',
layerStartDate: null,
layerEndDate: null,
firesThreshold: 0,
Expand Down Expand Up @@ -163,12 +163,10 @@ export default {
refetchKeys: ['dataset'],
getWidget: (widgetSettings) => {
// called when settings changes
if (!widgetSettings || !widgetSettings.dataset) {
return defaultConfig;
}
if (widgetSettings.dataset !== 'modis_burned_area') {
if (widgetSettings?.dataset !== 'modis_burned_area') {
return firesRanked;
}

return defaultConfig;
},
};
2 changes: 1 addition & 1 deletion components/widgets/fires/burned-area/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export default {
fires: 1,
},
settings: {
dataset: 'modis_burned_area',
dataset: 'viirs',
firesThreshold: 0,
},
sentences: {
Expand Down
8 changes: 8 additions & 0 deletions components/widgets/fires/fires-alerts-cumulative/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { all, spread } from 'axios';
import uniq from 'lodash/uniq';
import moment from 'moment';
import { fetchVIIRSAlerts, fetchVIIRSLatest } from 'services/analysis-cached';
import { FIRES_VIIRS_DATASET } from 'data/datasets';
import { FIRES_ALERTS_VIIRS } from 'data/layers';

import getWidgetProps from './selectors';

Expand All @@ -10,6 +12,12 @@ export default {
title: 'Cumulative Fire Alerts in {location}',
large: true,
categories: ['summary', 'fires'],
datasets: [
{
dataset: FIRES_VIIRS_DATASET,
layers: [FIRES_ALERTS_VIIRS],
},
],
settingsConfig: [
{
key: 'forestType',
Expand Down
6 changes: 0 additions & 6 deletions data/fires-datasets.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,5 @@
"unit": "alerts",
"metaKey": null,
"infoText": "MODIS alerts perform better in cloudy areas, but are coarser resolution than VIIRS alerts"
},{
"label": "MODIS Burned Area",
"value": "modis_burned_area",
"unit": "ha",
"metaKey": null,
"infoText": "MODIS burned area dataset gives an indication of the total area affected by fires"
}
]
Loading