Add display text for island territories marked disadvantaged for low income

This commit is contained in:
Ryon Coleman 2024-11-20 12:23:08 -05:00 committed by Carlos Felix
commit 2c1fec5317
6 changed files with 69 additions and 35 deletions

View file

@ -1146,6 +1146,12 @@ const AreaDetail = ({properties}: IAreaDetailProps) => {
isAdjacencyLowIncome={ isAdjacencyLowIncome={
properties[constants.ADJACENCY_LOW_INCOME_EXCEEDS_THRESH] properties[constants.ADJACENCY_LOW_INCOME_EXCEEDS_THRESH]
} }
isIslandLowIncome={
properties[constants.IS_FEDERAL_POVERTY_LEVEL_200] &&
constants.TILES_ISLAND_AREA_FIPS_CODES.some((code) => {
return properties[constants.GEOID_PROPERTY].startsWith(code);
})
}
tribalCountAK={ tribalCountAK={
properties[constants.TRIBAL_AREAS_COUNT_AK] >= 1 ? properties[constants.TRIBAL_AREAS_COUNT_AK] >= 1 ?
properties[constants.TRIBAL_AREAS_COUNT_AK] : properties[constants.TRIBAL_AREAS_COUNT_AK] :

View file

@ -9,6 +9,7 @@ interface IPrioritizationCopy {
totalBurdensPrioritized: number totalBurdensPrioritized: number
isAdjacencyThreshMet: boolean, isAdjacencyThreshMet: boolean,
isAdjacencyLowIncome: boolean, isAdjacencyLowIncome: boolean,
isIslandLowIncome: boolean,
tribalCountAK: number | null, tribalCountAK: number | null,
tribalCountUS: null, // when this signal is supported add number type tribalCountUS: null, // when this signal is supported add number type
percentTractTribal: number | null percentTractTribal: number | null
@ -26,6 +27,7 @@ interface IPrioritizationCopy {
* @param {number} totalBurdensPrioritized * @param {number} totalBurdensPrioritized
* @param {boolean} isAdjacencyThreshMet * @param {boolean} isAdjacencyThreshMet
* @param {boolean} isAdjacencyLowIncome * @param {boolean} isAdjacencyLowIncome
* @param {boolean} isIslandLowIncome
* @param {number | null} tribalCountAK * @param {number | null} tribalCountAK
* @param {number | null} tribalCountUS * @param {number | null} tribalCountUS
* @param {number | null} percentTractTribal * @param {number | null} percentTractTribal
@ -36,6 +38,7 @@ const PrioritizationCopy =
totalBurdensPrioritized, totalBurdensPrioritized,
isAdjacencyThreshMet, isAdjacencyThreshMet,
isAdjacencyLowIncome, isAdjacencyLowIncome,
isIslandLowIncome,
tribalCountAK, tribalCountAK,
tribalCountUS, tribalCountUS,
percentTractTribal, percentTractTribal,
@ -48,6 +51,9 @@ const PrioritizationCopy =
if (isAdjacencyThreshMet && isAdjacencyLowIncome) { if (isAdjacencyThreshMet && isAdjacencyLowIncome) {
prioCopyRendered = EXPLORE_COPY.PRIORITIZATION_COPY.PRIO_SURR_LI; prioCopyRendered = EXPLORE_COPY.PRIORITIZATION_COPY.PRIO_SURR_LI;
// if 1-2 // if 1-2
} else if (isIslandLowIncome) {
prioCopyRendered = EXPLORE_COPY.PRIORITIZATION_COPY.PRIO_ISLAND_LI;
// if 1-3
} else if (isAdjacencyThreshMet && !isAdjacencyLowIncome) { } else if (isAdjacencyThreshMet && !isAdjacencyLowIncome) {
// if 1-2-1 // if 1-2-1
if ( tribalCountAK === null && tribalCountUS === null) { if ( tribalCountAK === null && tribalCountUS === null) {

View file

@ -1,3 +1,5 @@
/* eslint quotes: [2, "double"] */
import {LngLatBoundsLike} from "maplibre-gl"; import {LngLatBoundsLike} from "maplibre-gl";
import {isMobile as isMobileReactDeviceDetect} from "react-device-detect"; import {isMobile as isMobileReactDeviceDetect} from "react-device-detect";
@ -77,6 +79,13 @@ export const SIDE_PANEL_STATE_VALUES = {
ISLAND_AREAS: "Island Areas", ISLAND_AREAS: "Island Areas",
}; };
/**
* Note that the FIPS code is a string
* The FIPS codes listed are:
* 60: American Samoa, 66: Guam, 69: N. Mariana Islands, 78: US Virgin Islands
*/
export const TILES_ISLAND_AREA_FIPS_CODES = ["60", "66", "69", "78"];
// Climate category // Climate category
export const IS_CLIMATE_FACTOR_DISADVANTAGED = "N_CLT"; export const IS_CLIMATE_FACTOR_DISADVANTAGED = "N_CLT";
export const IS_CLIMATE_EXCEED_ONE_OR_MORE_INDICATORS = "N_CLT_EOMI"; export const IS_CLIMATE_EXCEED_ONE_OR_MORE_INDICATORS = "N_CLT_EOMI";
@ -221,7 +230,7 @@ export const IS_EXCEEDS_THRESH_FOR_ISLAND_AREA_BELOW_100_POVERTY = "IA_POV_ET";
export const IS_WORKFORCE_EXCEED_BOTH_SOCIO_INDICATORS = "N_WKFC_EBSI"; export const IS_WORKFORCE_EXCEED_BOTH_SOCIO_INDICATORS = "N_WKFC_EBSI";
export const HIGH_SCHOOL_PROPERTY_PERCENTILE = `HSEF`; export const HIGH_SCHOOL_PROPERTY_PERCENTILE = "HSEF";
export const IS_LOW_HS_EDUCATION_LOW_HIGHER_ED_PRIORITIZED = "LHE"; export const IS_LOW_HS_EDUCATION_LOW_HIGHER_ED_PRIORITIZED = "LHE";
export const ISLAND_AREAS_HS_EDU_PERCENTAGE_FIELD = "IAHSEF"; export const ISLAND_AREAS_HS_EDU_PERCENTAGE_FIELD = "IAHSEF";
export const ISLAND_AREA_LOW_HS_EDU = "IALHE"; export const ISLAND_AREA_LOW_HS_EDU = "IALHE";

View file

@ -644,6 +644,14 @@ export const PRIORITIZATION_COPY = {
bold: boldFn, bold: boldFn,
}} }}
/>, />,
PRIO_ISLAND_LI: <FormattedMessage
id={'explore.map.page.side.panel.prio.copy.prio.island.li'}
defaultMessage={'This tract is considered disadvantaged because it meets the low income threshold <bold>AND</bold> is located in a U.S. Territory.'}
description={`Navigate to the explore the map page. Click on tract, The side panel will show This tract is considered disadvantaged. It is an island territory that meets an adjusted low income threshold.`}
values={{
bold: boldFn,
}}
/>,
PRIO_SURR_LI: <FormattedMessage PRIO_SURR_LI: <FormattedMessage
id={'explore.map.page.side.panel.prio.copy.prio.donut'} id={'explore.map.page.side.panel.prio.copy.prio.donut'}
defaultMessage={'This tract is considered disadvantaged. It is completely surrounded by tracts that are disadvantaged <bold>AND</bold> meets an adjusted low income threshold. The adjustment does not apply to any of the categories.'} defaultMessage={'This tract is considered disadvantaged. It is completely surrounded by tracts that are disadvantaged <bold>AND</bold> meets an adjusted low income threshold. The adjustment does not apply to any of the categories.'}
@ -1064,7 +1072,7 @@ export const SIDE_PANEL_INDICATORS = defineMessages({
POVERTY: { POVERTY: {
id: 'explore.map.page.side.panel.indicator.poverty', id: 'explore.map.page.side.panel.indicator.poverty',
defaultMessage: 'Poverty', defaultMessage: 'Poverty',
description: `Navigate to the explore the map page. When the map is in view, click on the map. The side panel will show Unemployment`, description: `Navigate to the explore the map page. When the map is in view, click on the map. The side panel will show Poverty`,
}, },
UNEMPLOY: { UNEMPLOY: {
id: 'explore.map.page.side.panel.indicator.unemploy', id: 'explore.map.page.side.panel.indicator.unemploy',

View file

@ -1145,7 +1145,7 @@
}, },
"explore.map.page.side.panel.indicator.poverty": { "explore.map.page.side.panel.indicator.poverty": {
"defaultMessage": "Poverty", "defaultMessage": "Poverty",
"description": "Navigate to the explore the map page. When the map is in view, click on the map. The side panel will show Unemployment" "description": "Navigate to the explore the map page. When the map is in view, click on the map. The side panel will show Poverty"
}, },
"explore.map.page.side.panel.indicator.prox.haz": { "explore.map.page.side.panel.indicator.prox.haz": {
"defaultMessage": "Proximity to hazardous waste facilities", "defaultMessage": "Proximity to hazardous waste facilities",
@ -1427,6 +1427,10 @@
"defaultMessage": "The {numPoints} that are Federally Recognized Tribes in this tract are are {also} considered disadvantaged.", "defaultMessage": "The {numPoints} that are Federally Recognized Tribes in this tract are are {also} considered disadvantaged.",
"description": "Navigate to the explore the map page. Click on tract, The {numPoints} that are Federally Recognized Tribes in this tract ares are {also} considered disadvantaged." "description": "Navigate to the explore the map page. Click on tract, The {numPoints} that are Federally Recognized Tribes in this tract ares are {also} considered disadvantaged."
}, },
"explore.map.page.side.panel.prio.copy.prio.island.li": {
"defaultMessage": "This tract is considered disadvantaged because it meets the low income threshold <bold>AND</bold> is located in a U.S. Territory.",
"description": "Navigate to the explore the map page. Click on tract, The side panel will show This tract is considered disadvantaged. It is an island territory that meets an adjusted low income threshold."
},
"explore.map.page.side.panel.prio.copy.prio.n.burden": { "explore.map.page.side.panel.prio.copy.prio.n.burden": {
"defaultMessage": "This tract is considered disadvantaged because it meets {burdens} burden threshold <bold>AND</bold> the associated socioeconomic threshold.", "defaultMessage": "This tract is considered disadvantaged because it meets {burdens} burden threshold <bold>AND</bold> the associated socioeconomic threshold.",
"description": "Navigate to the explore the map page. Click on tract, This tract is considered disadvantaged because it meets {burdens} burden thresholds <bold>AND</bold> the associated socioeconomic threshold." "description": "Navigate to the explore the map page. Click on tract, This tract is considered disadvantaged because it meets {burdens} burden thresholds <bold>AND</bold> the associated socioeconomic threshold."

View file

@ -348,6 +348,7 @@
"explore.map.page.side.panel.num.categories.exceeded": "en {numberOfDisCategories, plural, one {# categoría} otras {# categorías}}", "explore.map.page.side.panel.num.categories.exceeded": "en {numberOfDisCategories, plural, one {# categoría} otras {# categorías}}",
"explore.map.page.side.panel.partial.community.of.focus": "PARCIALMENTE", "explore.map.page.side.panel.partial.community.of.focus": "PARCIALMENTE",
"explore.map.page.side.panel.prio.copy.not.prio": "Este distrito censal no se considera desfavorecido. No cumple con ninguno de los umbrales <bold>O</bold> con al menos un umbral socioeconómico relacionado.", "explore.map.page.side.panel.prio.copy.not.prio": "Este distrito censal no se considera desfavorecido. No cumple con ninguno de los umbrales <bold>O</bold> con al menos un umbral socioeconómico relacionado.",
"explore.map.page.side.panel.prio.copy.prio.island.li": "Este distrito censal se considera desfavorecido porque cumple con el umbral de bajos ingresos <bold>Y</bold> está ubicado en un territorio de los EE. UU.",
"explore.map.page.side.panel.prio.copy.not.prio.n.burden": "Este distrito censal no se considera desfavorecido. Cumple con más de 1 umbral de carga <bold>PERO</bold> con ningún umbral socioeconómico asociado.", "explore.map.page.side.panel.prio.copy.not.prio.n.burden": "Este distrito censal no se considera desfavorecido. Cumple con más de 1 umbral de carga <bold>PERO</bold> con ningún umbral socioeconómico asociado.",
"explore.map.page.side.panel.prio.copy.not.prio.one.burden": "Este distrito censal no se considera desfavorecido. Cumple con 1 umbral de carga <bold>PERO</bold> con ningún umbral socioeconómico asociado.", "explore.map.page.side.panel.prio.copy.not.prio.one.burden": "Este distrito censal no se considera desfavorecido. Cumple con 1 umbral de carga <bold>PERO</bold> con ningún umbral socioeconómico asociado.",
"explore.map.page.side.panel.prio.copy.not.prio.surr.li": "Este distrito censal no se considera desfavorecido. Está rodeado de distritos censales desfavorecidos <bold>PERO</bold> no cumple con el umbral ajustado de bajos ingresos. El ajuste no corresponde a ninguna de las categorías.", "explore.map.page.side.panel.prio.copy.not.prio.surr.li": "Este distrito censal no se considera desfavorecido. Está rodeado de distritos censales desfavorecidos <bold>PERO</bold> no cumple con el umbral ajustado de bajos ingresos. El ajuste no corresponde a ninguna de las categorías.",