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={
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={
properties[constants.TRIBAL_AREAS_COUNT_AK] >= 1 ?
properties[constants.TRIBAL_AREAS_COUNT_AK] :

View file

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

View file

@ -1,5 +1,7 @@
import { LngLatBoundsLike } from "maplibre-gl";
import { isMobile as isMobileReactDeviceDetect } from "react-device-detect";
/* eslint quotes: [2, "double"] */
import {LngLatBoundsLike} from "maplibre-gl";
import {isMobile as isMobileReactDeviceDetect} from "react-device-detect";
export const isMobile = isMobileReactDeviceDetect;
@ -77,6 +79,13 @@ export const SIDE_PANEL_STATE_VALUES = {
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
export const IS_CLIMATE_FACTOR_DISADVANTAGED = "N_CLT";
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 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 ISLAND_AREAS_HS_EDU_PERCENTAGE_FIELD = "IAHSEF";
export const ISLAND_AREA_LOW_HS_EDU = "IALHE";

View file

@ -644,6 +644,14 @@ export const PRIORITIZATION_COPY = {
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
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.'}
@ -1064,7 +1072,7 @@ export const SIDE_PANEL_INDICATORS = defineMessages({
POVERTY: {
id: 'explore.map.page.side.panel.indicator.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: {
id: 'explore.map.page.side.panel.indicator.unemploy',

View file

@ -741,7 +741,7 @@
},
"explore.map.page.map.territoryFocus.lower48.short": {
"defaultMessage": "48",
"description": "On the explore the map page, on the map, the abbreviated name indicating the bounds of \n the Lower 48 states\n "
"description": "On the explore the map page, on the map, the abbreviated name indicating the bounds of\n the Lower 48 states\n "
},
"explore.map.page.map.territoryFocus.puerto_rico.long": {
"defaultMessage": "Puerto Rico",
@ -933,11 +933,11 @@
},
"explore.map.page.side.panel.indicator.description.exp.bld.loss": {
"defaultMessage": "Economic loss to building value resulting from natural hazards each year",
"description": "Navigate to the explore the map page. When the map is in view, click on the map. The side \n panel will show an indicator description of Economic loss rate to buildings resulting from natural hazards"
"description": "Navigate to the explore the map page. When the map is in view, click on the map. The side\n panel will show an indicator description of Economic loss rate to buildings resulting from natural hazards"
},
"explore.map.page.side.panel.indicator.description.exp.pop.loss": {
"defaultMessage": "Fatalities and injuries resulting from natural hazards each year",
"description": "Navigate to the explore the map page. When the map is in view, click on the map. The side panel will show an indicator description of Economic loss rate to the population in fatalities and \n injuries resulting from natural hazards"
"description": "Navigate to the explore the map page. When the map is in view, click on the map. The side panel will show an indicator description of Economic loss rate to the population in fatalities and\n injuries resulting from natural hazards"
},
"explore.map.page.side.panel.indicator.description.flooding": {
"defaultMessage": "Projected risk to properties from projected floods, from tides, rain, riverine and storm surges within 30 years",
@ -953,7 +953,7 @@
},
"explore.map.page.side.panel.indicator.description.high.ed": {
"defaultMessage": "Percent of the census tract's population 15 or older not enrolled in college, university, or graduate school",
"description": "Navigate to the explore the map page. When the map is in view, click on the map. The side panel will show an indicator description of Percent of the census tract's population 15 or older not \n enrolled in college, university, or graduate school"
"description": "Navigate to the explore the map page. When the map is in view, click on the map. The side panel will show an indicator description of Percent of the census tract's population 15 or older not\n enrolled in college, university, or graduate school"
},
"explore.map.page.side.panel.indicator.description.high.school": {
"defaultMessage": "Percent of people ages 25 years or older whose high school education is less than a high school diploma",
@ -977,7 +977,7 @@
},
"explore.map.page.side.panel.indicator.description.leadPaint": {
"defaultMessage": "Share of homes that are likely to have lead paint",
"description": "Navigate to the explore the map page. When the map is in view, click on the map. The side panel will show an indicator description of Share of homes that are likely to have lead paint \n "
"description": "Navigate to the explore the map page. When the map is in view, click on the map. The side panel will show an indicator description of Share of homes that are likely to have lead paint\n "
},
"explore.map.page.side.panel.indicator.description.leaky.tanks": {
"defaultMessage": "Formula of the density of leaking underground storage tanks and number of all active underground storage tanks within 1500 feet of the census tract boundaries",
@ -1025,7 +1025,7 @@
},
"explore.map.page.side.panel.indicator.description.unemploy": {
"defaultMessage": "Number of unemployed people as a part of the labor force",
"description": "Navigate to the explore the map page. When the map is in view, click on the map. The side \n panel will show an indicator description of Number of unemployed people as a part of the labor force"
"description": "Navigate to the explore the map page. When the map is in view, click on the map. The side\n panel will show an indicator description of Number of unemployed people as a part of the labor force"
},
"explore.map.page.side.panel.indicator.description.wasteWater": {
"defaultMessage": "Modeled toxic concentrations at parts of streams within 500 meters",
@ -1145,7 +1145,7 @@
},
"explore.map.page.side.panel.indicator.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": {
"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.",
"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": {
"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."
@ -1453,7 +1457,7 @@
},
"explore.map.page.side.panel.tribalInfo.landAreaName": {
"defaultMessage": "Land Area Name:",
"description": "Navigate to the explore the map page. Click on Tribal Lands, when the map is in view, \n click on the map. The side panel will show the land area name of the feature selected"
"description": "Navigate to the explore the map page. Click on Tribal Lands, when the map is in view,\n click on the map. The side panel will show the land area name of the feature selected"
},
"explore.map.page.side.panel.version.title": {
"defaultMessage": "Methodology version {version}",
@ -1465,7 +1469,7 @@
},
"explore.map.page.under.map.download.draft.ptag.1": {
"defaultMessage": "<link1>Download the data sources</link1> used in the CEJST (.csv, .xlxs, .pdf that describes how to use the list, and a codebook, {downloadFileSize} unzipped). Last updated: {dateUpdated}.",
"description": "\n Navigate to the explore the map page. Under the map, you will see a link that is placed below the \n map that will download the data packet\n "
"description": "\n Navigate to the explore the map page. Under the map, you will see a link that is placed below the\n map that will download the data packet\n "
},
"explore.map.page.under.map.note.on.territories.intro": {
"defaultMessage": "U.S. territories note",

View file

@ -26,10 +26,10 @@
"about.page.title.text": "Información básica",
"about.page.use.data.heading": "Cómo utilizar los datos ",
"about.page.use.data.paragraph": "Los datos de la herramienta están disponibles para <link1>descargar</link1>. Estos datos se pueden usar para filtrar por estado o condado.",
"about.page.use.data.tutorial":"Descarga el tutorial de la hoja de cálculo (.pdf 5,4 MB)",
"about.page.use.data.tutorial": "Descarga el tutorial de la hoja de cálculo (.pdf 5,4 MB)",
"about.page.use.map.heading": "Utilización del mapa",
"about.page.use.map.para": "Amplíe y seleccione cualquier distrito censal para ver si se considera como desfavorecido.",
"about.page.use.map.tutorial":"Descarga el tutorial CEJST (.pdf 9.6 MB)",
"about.page.use.map.tutorial": "Descarga el tutorial CEJST (.pdf 9.6 MB)",
"common.pages.alerts.additional_docs_available.description": "Descargue un nuevo <link1>documento de apoyo técnico</link1> y otra documentación, y <link2>envíe sus comentarios</link2>.",
"common.pages.alerts.banner.beta.content": "<bold1>Herramienta actualizada.</bold1> La versión 1.0 de la herramienta fue publicada el {relDate}.",
"common.pages.alerts.census.tract.title": "Ya hay más documentación disponible",
@ -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.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.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.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.",