diff --git a/components/widgets/land-cover/tree-cover-plantations/index.js b/components/widgets/land-cover/tree-cover-plantations/index.js index 83744bf023..345b1c459a 100644 --- a/components/widgets/land-cover/tree-cover-plantations/index.js +++ b/components/widgets/land-cover/tree-cover-plantations/index.js @@ -43,12 +43,8 @@ export default { extentYear: 2010, }, sentences: { - initialSpecies: - 'In {location}, {firstSpecies} and {secondSpecies} represent the largest plantation area by {type}, spanning {extent} and {percent} of land area.', - singleSpecies: - 'In {location}, {firstSpecies} represent the largest plantation area by {type}, spanning {extent} and {percent} of land area.', - initialTypes: - 'In {location}, the largest plantation area by type is {topType}, spanning {extent} and {percent} of land area.', + initial: + 'In {location}, the largest type of plantation area is {topType}, spanning {extent} and {percent} land area.', }, whitelists: { indicators: ['plantations'], diff --git a/components/widgets/land-cover/tree-cover-plantations/selectors.js b/components/widgets/land-cover/tree-cover-plantations/selectors.js index cb0301d504..4e465b6054 100644 --- a/components/widgets/land-cover/tree-cover-plantations/selectors.js +++ b/components/widgets/land-cover/tree-cover-plantations/selectors.js @@ -7,7 +7,6 @@ import endsWith from 'lodash/endsWith'; // get list data const getData = (state) => state.data; -const getSettings = (state) => state.settings; const getLocatonName = (state) => state.locationLabel; const getColors = (state) => state.colors; const getSentences = (state) => state.sentences; @@ -38,30 +37,21 @@ export const parseData = createSelector( ); export const parseSentence = createSelector( - [getData, parseData, getSettings, getLocatonName, getSentences], - (rawData, data, settings, locationName, sentences) => { + [getData, parseData, getLocatonName, getSentences], + (rawData, data, locationName, sentences) => { if (isEmpty(data) || !sentences) return null; - const { initialSpecies, singleSpecies, initialTypes } = sentences; - const top = - settings.type === 'bound2' ? data.slice(0, 2) : data.slice(0, 1); + + const { initial } = sentences; + const top = data.slice(0, 1); const areaPerc = (100 * (sumBy(top, 'value') || 0)) / rawData.totalArea; const topExtent = sumBy(top, 'value') || 0; - const otherExtent = sumBy(data.slice(2), 'value') || 0; const params = { location: locationName, - firstSpecies: top[0].label.toLowerCase(), - secondSpecies: top.length > 1 && top[1].label.toLowerCase(), - type: settings.type === 'bound2' ? 'species' : 'type', extent: formatNumber({ num: topExtent, unit: 'ha', spaceUnit: true }), - other: formatNumber({ num: otherExtent, unit: 'ha', spaceUnit: true }), - count: data.length - top.length, topType: `${top[0].label}${endsWith(top[0].label, 's') ? '' : 's'}`, percent: formatNumber({ num: areaPerc, unit: '%' }), }; - const sentence = - settings.type === 'bound1' - ? initialTypes - : `${top.length > 1 ? initialSpecies : singleSpecies}`; + const sentence = initial; return { sentence, diff --git a/data/analysis-datasets-versions.json b/data/analysis-datasets-versions.json index bdc0547fe4..49c11d7f5a 100644 --- a/data/analysis-datasets-versions.json +++ b/data/analysis-datasets-versions.json @@ -1,28 +1,28 @@ { - "ANNUAL_ADM0_CHANGE": "v20240404", - "ANNUAL_ADM0_SUMMARY": "v20240404", - "ANNUAL_ADM0_WHITELIST": "v20240404", - "ANNUAL_ADM1_CHANGE": "v20240404", - "ANNUAL_ADM1_SUMMARY": "v20240404", - "ANNUAL_ADM1_WHITELIST": "v20240404", - "ANNUAL_ADM2_CHANGE": "v20240404", - "ANNUAL_ADM2_SUMMARY": "v20240404", - "ANNUAL_ADM2_WHITELIST": "v20240404", + "ANNUAL_ADM0_CHANGE": "v20240815", + "ANNUAL_ADM0_SUMMARY": "v20240815", + "ANNUAL_ADM0_WHITELIST": "v20240815", + "ANNUAL_ADM1_CHANGE": "v20240815", + "ANNUAL_ADM1_SUMMARY": "v20240815", + "ANNUAL_ADM1_WHITELIST": "v20240815", + "ANNUAL_ADM2_CHANGE": "v20240815", + "ANNUAL_ADM2_SUMMARY": "v20240815", + "ANNUAL_ADM2_WHITELIST": "v20240815", - "ANNUAL_GEOSTORE_CHANGE": "v20240404", - "ANNUAL_GEOSTORE_SUMMARY": "v20240404", - "ANNUAL_GEOSTORE_WHITELIST": "v20240404", - "ANNUAL_WDPA_CHANGE": "v20240404", - "ANNUAL_WDPA_SUMMARY": "v20240404", - "ANNUAL_WDPA_WHITELIST": "v20240404", + "ANNUAL_GEOSTORE_CHANGE": "v20240815", + "ANNUAL_GEOSTORE_SUMMARY": "v20240815", + "ANNUAL_GEOSTORE_WHITELIST": "v20240815", + "ANNUAL_WDPA_CHANGE": "v20240813", + "ANNUAL_WDPA_SUMMARY": "v20240813", + "ANNUAL_WDPA_WHITELIST": "v20240813", - "VIIRS_ADM0_WHITELIST": "v20240118", - "VIIRS_ADM1_WHITELIST": "v20240118", - "VIIRS_ADM2_WHITELIST": "v20240118", - "VIIRS_ADM2_DAILY": "v20240118", - "VIIRS_ADM0_WEEKLY": "v20240118", - "VIIRS_ADM1_WEEKLY": "v20240118", - "VIIRS_ADM2_WEEKLY": "v20240118", + "VIIRS_ADM0_WHITELIST": "v20240815", + "VIIRS_ADM1_WHITELIST": "v20240815", + "VIIRS_ADM2_WHITELIST": "v20240815", + "VIIRS_ADM2_DAILY": "v20240815", + "VIIRS_ADM0_WEEKLY": "v20240815", + "VIIRS_ADM1_WEEKLY": "v20240815", + "VIIRS_ADM2_WEEKLY": "v20240815", "VIIRS_GEOSTORE_WHITELIST": "v20240122", "VIIRS_GEOSTORE_DAILY": "v20240122", @@ -31,13 +31,13 @@ "VIIRS_WDPA_WEEKLY": "v20240122", "VIIRS_WDPA_WHITELIST": "v20240122", - "MODIS_ADM0_WHITELIST": "v20240118", - "MODIS_ADM1_WHITELIST": "v20240118", - "MODIS_ADM2_WHITELIST": "v20240118", - "MODIS_ADM2_DAILY": "v20240118", - "MODIS_ADM0_WEEKLY": "v20240118", - "MODIS_ADM1_WEEKLY": "v20240118", - "MODIS_ADM2_WEEKLY": "v20240118", + "MODIS_ADM0_WHITELIST": "v20240815", + "MODIS_ADM1_WHITELIST": "v20240815", + "MODIS_ADM2_WHITELIST": "v20240815", + "MODIS_ADM2_DAILY": "v20240815", + "MODIS_ADM0_WEEKLY": "v20240815", + "MODIS_ADM1_WEEKLY": "v20240815", + "MODIS_ADM2_WEEKLY": "v20240815", "MODIS_GEOSTORE_WHITELIST": "v20240122", "MODIS_GEOSTORE_DAILY": "v20240122",