Skip to content

Commit

Permalink
Merge pull request #4694 from wri/feat/update-VIIRS-FLAG-920
Browse files Browse the repository at this point in the history
[FLAG-920] Update all VIIRS tables version
  • Loading branch information
willian-viana authored Sep 29, 2023
2 parents 9716d6f + 0300653 commit 8683500
Show file tree
Hide file tree
Showing 13 changed files with 41 additions and 30 deletions.
8 changes: 5 additions & 3 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',
dataset: 'modis_burned_area',
firesThreshold: 0,
},
sentences: {
Expand Down Expand Up @@ -151,10 +151,12 @@ export default {
refetchKeys: ['dataset'],
getWidget: (widgetSettings) => {
// called when settings changes
if (widgetSettings?.dataset !== 'modis_burned_area') {
if (!widgetSettings || !widgetSettings.dataset) {
return defaultConfig;
}
if (widgetSettings.dataset !== 'modis_burned_area') {
return firesAlertsCumulative;
}

return defaultConfig;
},
};
8 changes: 5 additions & 3 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',
dataset: 'modis_burned_area',
layerStartDate: null,
layerEndDate: null,
firesThreshold: 0,
Expand Down Expand Up @@ -163,10 +163,12 @@ export default {
refetchKeys: ['dataset'],
getWidget: (widgetSettings) => {
// called when settings changes
if (widgetSettings?.dataset !== 'modis_burned_area') {
if (!widgetSettings || !widgetSettings.dataset) {
return defaultConfig;
}
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',
dataset: 'modis_burned_area',
firesThreshold: 0,
},
sentences: {
Expand Down
2 changes: 1 addition & 1 deletion components/widgets/fires/fire-alerts-simple/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export default {
},
// initial settings
settings: {
dataset: 'modis',
dataset: 'viirs',
},
getData: async (params) => {
const { VIIRS } = await handleGfwParamsMeta(params);
Expand Down
2 changes: 1 addition & 1 deletion components/widgets/fires/fires-alerts-cumulative/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export default {
fires: 2,
},
settings: {
dataset: 'modis',
dataset: 'viirs',
confidence: 'h',
},
sentences: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default {
colors: 'fires',
metaKey: 'widget_fire_alert_location',
settings: {
dataset: 'modis',
dataset: 'viirs',
},
datasets: [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export default {
colors: 'fires',
metaKey: 'widget_fire_alert_location',
settings: {
dataset: 'modis',
dataset: 'viirs',
minDate: '2000-01-01',
confidence: '',
},
Expand Down
2 changes: 1 addition & 1 deletion components/widgets/fires/fires-alerts-historical/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export default {
colors: 'fires',
metaKey: 'widget_fire_alert_location',
settings: {
dataset: 'modis',
dataset: 'viirs',
minDate: '2000-01-01',
confidence: '',
},
Expand Down
2 changes: 1 addition & 1 deletion components/widgets/fires/fires-alerts/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const defaultConfig = {
fires: 1,
},
settings: {
dataset: 'modis',
dataset: 'viirs',
confidence: 'h',
},
sentences: {
Expand Down
2 changes: 1 addition & 1 deletion components/widgets/fires/fires-ranked/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export default {
page: 0,
period: 'week',
weeks: 4,
dataset: 'modis',
dataset: 'viirs',
layerStartDate: null,
layerEndDate: null,
},
Expand Down
2 changes: 1 addition & 1 deletion components/widgets/fires/fires-within/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export default {
settings: {
period: 'week',
weeks: 13,
dataset: 'modis',
dataset: 'viirs',
confidence: 'h',
},
settingsBtnConfig: {
Expand Down
30 changes: 15 additions & 15 deletions data/analysis-datasets-versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,21 @@
"ANNUAL_WDPA_SUMMARY": "v20230502",
"ANNUAL_WDPA_WHITELIST": "v20230502",

"VIIRS_ADM0_WHITELIST": "v20220726",
"VIIRS_ADM1_WHITELIST": "v20220726",
"VIIRS_ADM2_WHITELIST": "v20220726",
"VIIRS_ADM0_DAILY": "v20220726",
"VIIRS_ADM1_DAILY": "v20220726",
"VIIRS_ADM2_DAILY": "v20220726",
"VIIRS_ADM0_WEEKLY": "v20220726",
"VIIRS_ADM1_WEEKLY": "v20220726",
"VIIRS_ADM2_WEEKLY": "v20220726",
"VIIRS_GEOSTORE_WHITELIST": "v20220713",
"VIIRS_GEOSTORE_DAILY": "v20220713",
"VIIRS_GEOSTORE_WEEKLY": "v20220713",
"VIIRS_WDPA_DAILY": "v20220713",
"VIIRS_WDPA_WEEKLY": "v20220713",
"VIIRS_WDPA_WHITELIST": "v20220713",
"VIIRS_ADM0_WHITELIST": "v20230901",
"VIIRS_ADM1_WHITELIST": "v20230901",
"VIIRS_ADM2_WHITELIST": "v20230901",
"VIIRS_ADM0_DAILY": "v20230901",
"VIIRS_ADM1_DAILY": "v20230901",
"VIIRS_ADM2_DAILY": "v20230901",
"VIIRS_ADM0_WEEKLY": "v20230901",
"VIIRS_ADM1_WEEKLY": "v20230901",
"VIIRS_ADM2_WEEKLY": "v20230901",
"VIIRS_GEOSTORE_WHITELIST": "v20230901",
"VIIRS_GEOSTORE_DAILY": "v20230901",
"VIIRS_GEOSTORE_WEEKLY": "v20230901",
"VIIRS_WDPA_DAILY": "v20230901",
"VIIRS_WDPA_WEEKLY": "v20230901",
"VIIRS_WDPA_WHITELIST": "v20230901",

"MODIS_ADM0_WHITELIST": "v20221110",
"MODIS_ADM1_WHITELIST": "v20221110",
Expand Down
7 changes: 7 additions & 0 deletions data/fires-datasets.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
[
{
"label": "VIIRS Alerts",
"value": "viirs",
"unit": "alerts",
"metaKey": null,
"infoText": "VIIRS alerts have a higher resolution, but are less performant in cloudy areas than MODIS alerts"
},
{
"label": "MODIS Alerts",
"value": "modis",
Expand Down

0 comments on commit 8683500

Please sign in to comment.