diff --git a/components/widgets/fires/burned-area-cumulative/index.js b/components/widgets/fires/burned-area-cumulative/index.js index 81fa6c469d..c9bc3b878c 100644 --- a/components/widgets/fires/burned-area-cumulative/index.js +++ b/components/widgets/fires/burned-area-cumulative/index.js @@ -98,7 +98,7 @@ const defaultConfig = { fires: 3, }, settings: { - dataset: 'modis_burned_area', + dataset: 'viirs', firesThreshold: 0, }, sentences: { @@ -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; }, }; diff --git a/components/widgets/fires/burned-area-ranked/index.js b/components/widgets/fires/burned-area-ranked/index.js index 79fd975a21..348081aebe 100644 --- a/components/widgets/fires/burned-area-ranked/index.js +++ b/components/widgets/fires/burned-area-ranked/index.js @@ -118,7 +118,7 @@ const defaultConfig = { page: 0, period: 'week', weeks: 4, - dataset: 'modis_burned_area', + dataset: 'viirs', layerStartDate: null, layerEndDate: null, firesThreshold: 0, @@ -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; }, }; diff --git a/components/widgets/fires/burned-area/index.js b/components/widgets/fires/burned-area/index.js index 284f740a31..5c300bb376 100644 --- a/components/widgets/fires/burned-area/index.js +++ b/components/widgets/fires/burned-area/index.js @@ -86,7 +86,7 @@ export default { fires: 1, }, settings: { - dataset: 'modis_burned_area', + dataset: 'viirs', firesThreshold: 0, }, sentences: { diff --git a/components/widgets/fires/fires-alerts-cumulative/index.js b/components/widgets/fires/fires-alerts-cumulative/index.js index 743e54de57..b934c6bc4b 100644 --- a/components/widgets/fires/fires-alerts-cumulative/index.js +++ b/components/widgets/fires/fires-alerts-cumulative/index.js @@ -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'; @@ -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', diff --git a/data/fires-datasets.json b/data/fires-datasets.json index 9ee4010801..d426efc4bd 100644 --- a/data/fires-datasets.json +++ b/data/fires-datasets.json @@ -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" } ]