diff --git a/client/src/components/AreaDetail/AreaDetail.tsx b/client/src/components/AreaDetail/AreaDetail.tsx index 9374ddf35..4e480dd88 100644 --- a/client/src/components/AreaDetail/AreaDetail.tsx +++ b/client/src/components/AreaDetail/AreaDetail.tsx @@ -1,8 +1,8 @@ /* eslint-disable quotes */ // External Libs: import React from "react"; -import { MessageDescriptor, useIntl } from "gatsby-plugin-intl"; -import { Accordion, Button } from "@trussworks/react-uswds"; +import {MessageDescriptor, useIntl} from "gatsby-plugin-intl"; +import {Accordion, Button} from "@trussworks/react-uswds"; // Components: import Category from "../Category"; @@ -126,62 +126,62 @@ export const getTribalPercentValue = (tribalPercentRaw: number) => { * @param {IAreaDetailProps} {} * @return {void} */ -const AreaDetail = ({ properties }: IAreaDetailProps) => { +const AreaDetail = ({properties}: IAreaDetailProps) => { const intl = useIntl(); // console.log the properties of the census that is selected: console.log( - "BE signals for tract (last one is the tract currently selected): ", - properties + "BE signals for tract (last one is the tract currently selected): ", + properties, ); // console.log around the donut, adjacency and tribal info: console.log( - "Income imputed? ", - properties[constants.IMPUTE_FLAG] === "0" ? " NO" : " YES" + "Income imputed? ", + properties[constants.IMPUTE_FLAG] === "0" ? " NO" : " YES", ); console.log( - "Adjacency indicator? ", - properties[constants.ADJACENCY_EXCEEDS_THRESH] ? " YES" : " NO" + "Adjacency indicator? ", + properties[constants.ADJACENCY_EXCEEDS_THRESH] ? " YES" : " NO", ); console.log( - "% of tract tribal: ", - getTribalPercentValue(properties[constants.TRIBAL_AREAS_PERCENTAGE]) + "% of tract tribal: ", + getTribalPercentValue(properties[constants.TRIBAL_AREAS_PERCENTAGE]), ); console.log( - "Tribal count in AK: ", - properties[constants.TRIBAL_AREAS_COUNT_AK] >= 1 - ? ` ${properties[constants.TRIBAL_AREAS_COUNT_AK]}` - : ` null` + "Tribal count in AK: ", + properties[constants.TRIBAL_AREAS_COUNT_AK] >= 1 ? + ` ${properties[constants.TRIBAL_AREAS_COUNT_AK]}` : + ` null`, ); console.log( - "Tribal count in CONUS: ", - properties[constants.TRIBAL_AREAS_COUNT_CONUS] >= 1 - ? ` ${properties[constants.TRIBAL_AREAS_COUNT_CONUS]}` - : ` null` + "Tribal count in CONUS: ", + properties[constants.TRIBAL_AREAS_COUNT_CONUS] >= 1 ? + ` ${properties[constants.TRIBAL_AREAS_COUNT_CONUS]}` : + ` null`, ); // Fix constants.MISSING_DATA_STRING import - const blockGroup = properties[constants.GEOID_PROPERTY] - ? properties[constants.GEOID_PROPERTY] - : constants.MISSING_DATA_STRING; - const population = properties[constants.TOTAL_POPULATION] - ? properties[constants.TOTAL_POPULATION] - : constants.MISSING_DATA_STRING; - const countyName = properties[constants.COUNTY_NAME] - ? properties[constants.COUNTY_NAME] - : constants.MISSING_DATA_STRING; - const stateName = properties[constants.STATE_NAME] - ? properties[constants.STATE_NAME] - : constants.MISSING_DATA_STRING; + const blockGroup = properties[constants.GEOID_PROPERTY] ? + properties[constants.GEOID_PROPERTY] : + constants.MISSING_DATA_STRING; + const population = properties[constants.TOTAL_POPULATION] ? + properties[constants.TOTAL_POPULATION] : + constants.MISSING_DATA_STRING; + const countyName = properties[constants.COUNTY_NAME] ? + properties[constants.COUNTY_NAME] : + constants.MISSING_DATA_STRING; + const stateName = properties[constants.STATE_NAME] ? + properties[constants.STATE_NAME] : + constants.MISSING_DATA_STRING; const sidePanelState = properties[constants.SIDE_PANEL_STATE]; const percentTractTribal = - properties[constants.TRIBAL_AREAS_PERCENTAGE] >= 0 - ? parseFloat( - (properties[constants.TRIBAL_AREAS_PERCENTAGE] * 100).toFixed() - ) - : null; + properties[constants.TRIBAL_AREAS_PERCENTAGE] >= 0 ? + parseFloat( + (properties[constants.TRIBAL_AREAS_PERCENTAGE] * 100).toFixed(), + ) : + null; /** * The workforce development category has some indicators who's source will vary depending on which @@ -195,64 +195,64 @@ const AreaDetail = ({ properties }: IAreaDetailProps) => { if (sidePanelState === constants.SIDE_PANEL_STATE_VALUES.ISLAND_AREAS) { if (indicatorName === "lowMedInc") { return properties.hasOwnProperty( - constants.ISLAND_AREAS_LOW_MEDIAN_INCOME_LOW_HS_EDU_PERCENTILE_FIELD - ) - ? properties[ + constants.ISLAND_AREAS_LOW_MEDIAN_INCOME_LOW_HS_EDU_PERCENTILE_FIELD, + ) ? + properties[ constants - .ISLAND_AREAS_LOW_MEDIAN_INCOME_LOW_HS_EDU_PERCENTILE_FIELD - ] - : null; + .ISLAND_AREAS_LOW_MEDIAN_INCOME_LOW_HS_EDU_PERCENTILE_FIELD + ] : + null; } if (indicatorName === "unemploy") { return properties.hasOwnProperty( - constants.ISLAND_AREAS_UNEMPLOYMENT_LOW_HS_EDU_PERCENTILE_FIELD - ) - ? properties[ + constants.ISLAND_AREAS_UNEMPLOYMENT_LOW_HS_EDU_PERCENTILE_FIELD, + ) ? + properties[ constants.ISLAND_AREAS_UNEMPLOYMENT_LOW_HS_EDU_PERCENTILE_FIELD - ] - : null; + ] : + null; } if (indicatorName === "poverty") { return properties.hasOwnProperty( - constants.ISLAND_AREAS_POVERTY_LOW_HS_EDU_PERCENTILE_FIELD - ) - ? properties[ + constants.ISLAND_AREAS_POVERTY_LOW_HS_EDU_PERCENTILE_FIELD, + ) ? + properties[ constants.ISLAND_AREAS_POVERTY_LOW_HS_EDU_PERCENTILE_FIELD - ] - : null; + ] : + null; } if (indicatorName === "highSchool") { return properties.hasOwnProperty( - constants.ISLAND_AREAS_HS_EDU_PERCENTAGE_FIELD - ) - ? properties[constants.ISLAND_AREAS_HS_EDU_PERCENTAGE_FIELD] - : null; + constants.ISLAND_AREAS_HS_EDU_PERCENTAGE_FIELD, + ) ? + properties[constants.ISLAND_AREAS_HS_EDU_PERCENTAGE_FIELD] : + null; } } if (indicatorName === "lowMedInc") { - return properties.hasOwnProperty(constants.LOW_MEDIAN_INCOME_PERCENTILE) - ? properties[constants.LOW_MEDIAN_INCOME_PERCENTILE] - : null; + return properties.hasOwnProperty(constants.LOW_MEDIAN_INCOME_PERCENTILE) ? + properties[constants.LOW_MEDIAN_INCOME_PERCENTILE] : + null; } if (indicatorName === "unemploy") { return properties.hasOwnProperty( - constants.UNEMPLOYMENT_PROPERTY_PERCENTILE - ) - ? properties[constants.UNEMPLOYMENT_PROPERTY_PERCENTILE] - : null; + constants.UNEMPLOYMENT_PROPERTY_PERCENTILE, + ) ? + properties[constants.UNEMPLOYMENT_PROPERTY_PERCENTILE] : + null; } if (indicatorName === "poverty") { - return properties.hasOwnProperty(constants.POVERTY_BELOW_100_PERCENTILE) - ? properties[constants.POVERTY_BELOW_100_PERCENTILE] - : null; + return properties.hasOwnProperty(constants.POVERTY_BELOW_100_PERCENTILE) ? + properties[constants.POVERTY_BELOW_100_PERCENTILE] : + null; } if (indicatorName === "highSchool") { return properties.hasOwnProperty( - constants.HIGH_SCHOOL_PROPERTY_PERCENTILE - ) - ? properties[constants.HIGH_SCHOOL_PROPERTY_PERCENTILE] - : null; + constants.HIGH_SCHOOL_PROPERTY_PERCENTILE, + ) ? + properties[constants.HIGH_SCHOOL_PROPERTY_PERCENTILE] : + null; } }; @@ -268,63 +268,63 @@ const AreaDetail = ({ properties }: IAreaDetailProps) => { if (sidePanelState === constants.SIDE_PANEL_STATE_VALUES.ISLAND_AREAS) { if (indicatorName === "lowMedInc") { return properties.hasOwnProperty( - constants.IS_EXCEEDS_THRESH_FOR_ISLAND_AREA_LOW_MEDIAN_INCOME - ) - ? properties[ + constants.IS_EXCEEDS_THRESH_FOR_ISLAND_AREA_LOW_MEDIAN_INCOME, + ) ? + properties[ constants.IS_EXCEEDS_THRESH_FOR_ISLAND_AREA_LOW_MEDIAN_INCOME - ] - : null; + ] : + null; } if (indicatorName === "unemploy") { return properties.hasOwnProperty( - constants.IS_EXCEEDS_THRESH_FOR_ISLAND_AREA_UNEMPLOYMENT - ) - ? properties[constants.IS_EXCEEDS_THRESH_FOR_ISLAND_AREA_UNEMPLOYMENT] - : null; + constants.IS_EXCEEDS_THRESH_FOR_ISLAND_AREA_UNEMPLOYMENT, + ) ? + properties[constants.IS_EXCEEDS_THRESH_FOR_ISLAND_AREA_UNEMPLOYMENT] : + null; } if (indicatorName === "poverty") { return properties.hasOwnProperty( - constants.IS_EXCEEDS_THRESH_FOR_ISLAND_AREA_BELOW_100_POVERTY - ) - ? properties[ + constants.IS_EXCEEDS_THRESH_FOR_ISLAND_AREA_BELOW_100_POVERTY, + ) ? + properties[ constants.IS_EXCEEDS_THRESH_FOR_ISLAND_AREA_BELOW_100_POVERTY - ] - : null; + ] : + null; } if (indicatorName === "highSchool") { - return properties.hasOwnProperty(constants.ISLAND_AREA_LOW_HS_EDU) - ? properties[constants.ISLAND_AREA_LOW_HS_EDU] - : null; + return properties.hasOwnProperty(constants.ISLAND_AREA_LOW_HS_EDU) ? + properties[constants.ISLAND_AREA_LOW_HS_EDU] : + null; } } if (indicatorName === "lowMedInc") { return properties.hasOwnProperty( - constants.IS_EXCEEDS_THRESH_FOR_LOW_MEDIAN_INCOME - ) - ? properties[constants.IS_EXCEEDS_THRESH_FOR_LOW_MEDIAN_INCOME] - : null; + constants.IS_EXCEEDS_THRESH_FOR_LOW_MEDIAN_INCOME, + ) ? + properties[constants.IS_EXCEEDS_THRESH_FOR_LOW_MEDIAN_INCOME] : + null; } if (indicatorName === "unemploy") { return properties.hasOwnProperty( - constants.IS_EXCEEDS_THRESH_FOR_UNEMPLOYMENT - ) - ? properties[constants.IS_EXCEEDS_THRESH_FOR_UNEMPLOYMENT] - : null; + constants.IS_EXCEEDS_THRESH_FOR_UNEMPLOYMENT, + ) ? + properties[constants.IS_EXCEEDS_THRESH_FOR_UNEMPLOYMENT] : + null; } if (indicatorName === "poverty") { return properties.hasOwnProperty( - constants.IS_EXCEEDS_THRESH_FOR_BELOW_100_POVERTY - ) - ? properties[constants.IS_EXCEEDS_THRESH_FOR_BELOW_100_POVERTY] - : null; + constants.IS_EXCEEDS_THRESH_FOR_BELOW_100_POVERTY, + ) ? + properties[constants.IS_EXCEEDS_THRESH_FOR_BELOW_100_POVERTY] : + null; } if (indicatorName === "highSchool") { return properties.hasOwnProperty( - constants.IS_LOW_HS_EDUCATION_LOW_HIGHER_ED_PRIORITIZED - ) - ? properties[constants.IS_LOW_HS_EDUCATION_LOW_HIGHER_ED_PRIORITIZED] - : null; + constants.IS_LOW_HS_EDUCATION_LOW_HIGHER_ED_PRIORITIZED, + ) ? + properties[constants.IS_LOW_HS_EDUCATION_LOW_HIGHER_ED_PRIORITIZED] : + null; } }; @@ -338,80 +338,80 @@ const AreaDetail = ({ properties }: IAreaDetailProps) => { const expAgLoss: indicatorInfo = { label: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATORS.EXP_AG_LOSS), description: intl.formatMessage( - EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.EXP_AG_LOSS + EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.EXP_AG_LOSS, ), type: "percentile", - value: properties.hasOwnProperty(constants.EXP_AGRICULTURE_LOSS_PERCENTILE) - ? properties[constants.EXP_AGRICULTURE_LOSS_PERCENTILE] - : null, - isDisadvagtaged: properties[constants.IS_EXCEEDS_THRESH_FOR_EXP_AGR_LOSS] - ? properties[constants.IS_EXCEEDS_THRESH_FOR_EXP_AGR_LOSS] - : null, + value: properties.hasOwnProperty(constants.EXP_AGRICULTURE_LOSS_PERCENTILE) ? + properties[constants.EXP_AGRICULTURE_LOSS_PERCENTILE] : + null, + isDisadvagtaged: properties[constants.IS_EXCEEDS_THRESH_FOR_EXP_AGR_LOSS] ? + properties[constants.IS_EXCEEDS_THRESH_FOR_EXP_AGR_LOSS] : + null, }; const expBldLoss: indicatorInfo = { label: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATORS.EXP_BLD_LOSS), description: intl.formatMessage( - EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.EXP_BLD_LOSS + EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.EXP_BLD_LOSS, ), type: "percentile", - value: properties.hasOwnProperty(constants.EXP_BUILDING_LOSS_PERCENTILE) - ? properties[constants.EXP_BUILDING_LOSS_PERCENTILE] - : null, - isDisadvagtaged: properties[constants.IS_EXCEEDS_THRESH_FOR_EXP_BLD_LOSS] - ? properties[constants.IS_EXCEEDS_THRESH_FOR_EXP_BLD_LOSS] - : null, + value: properties.hasOwnProperty(constants.EXP_BUILDING_LOSS_PERCENTILE) ? + properties[constants.EXP_BUILDING_LOSS_PERCENTILE] : + null, + isDisadvagtaged: properties[constants.IS_EXCEEDS_THRESH_FOR_EXP_BLD_LOSS] ? + properties[constants.IS_EXCEEDS_THRESH_FOR_EXP_BLD_LOSS] : + null, }; const expPopLoss: indicatorInfo = { label: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATORS.EXP_POP_LOSS), description: intl.formatMessage( - EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.EXP_POP_LOSS + EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.EXP_POP_LOSS, ), type: "percentile", - value: properties.hasOwnProperty(constants.EXP_POPULATION_LOSS_PERCENTILE) - ? properties[constants.EXP_POPULATION_LOSS_PERCENTILE] - : null, - isDisadvagtaged: properties[constants.IS_EXCEEDS_THRESH_FOR_EXP_POP_LOSS] - ? properties[constants.IS_EXCEEDS_THRESH_FOR_EXP_POP_LOSS] - : null, + value: properties.hasOwnProperty(constants.EXP_POPULATION_LOSS_PERCENTILE) ? + properties[constants.EXP_POPULATION_LOSS_PERCENTILE] : + null, + isDisadvagtaged: properties[constants.IS_EXCEEDS_THRESH_FOR_EXP_POP_LOSS] ? + properties[constants.IS_EXCEEDS_THRESH_FOR_EXP_POP_LOSS] : + null, }; const flooding: indicatorInfo = { label: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATORS.FLOODING), description: intl.formatMessage( - EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.FLOODING + EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.FLOODING, ), type: "percentile", - value: properties.hasOwnProperty(constants.FLOODING_PERCENTILE) - ? properties[constants.FLOODING_PERCENTILE] - : null, - isDisadvagtaged: properties[constants.IS_EXCEEDS_THRESH_FLOODING] - ? properties[constants.IS_EXCEEDS_THRESH_FLOODING] - : null, + value: properties.hasOwnProperty(constants.FLOODING_PERCENTILE) ? + properties[constants.FLOODING_PERCENTILE] : + null, + isDisadvagtaged: properties[constants.IS_EXCEEDS_THRESH_FLOODING] ? + properties[constants.IS_EXCEEDS_THRESH_FLOODING] : + null, }; const wildfire: indicatorInfo = { label: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATORS.WILDFIRE), description: intl.formatMessage( - EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.WILDFIRE + EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.WILDFIRE, ), type: "percentile", - value: properties.hasOwnProperty(constants.WILDFIRE_PERCENTILE) - ? properties[constants.WILDFIRE_PERCENTILE] - : null, - isDisadvagtaged: properties[constants.IS_EXCEEDS_THRESH_WILDFIRE] - ? properties[constants.IS_EXCEEDS_THRESH_WILDFIRE] - : null, + value: properties.hasOwnProperty(constants.WILDFIRE_PERCENTILE) ? + properties[constants.WILDFIRE_PERCENTILE] : + null, + isDisadvagtaged: properties[constants.IS_EXCEEDS_THRESH_WILDFIRE] ? + properties[constants.IS_EXCEEDS_THRESH_WILDFIRE] : + null, }; const lowInc: indicatorInfo = { label: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATORS.LOW_INCOME), description: intl.formatMessage( - EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.LOW_INCOME + EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.LOW_INCOME, ), type: "percentile", - value: properties.hasOwnProperty(constants.POVERTY_BELOW_200_PERCENTILE) - ? properties[constants.POVERTY_BELOW_200_PERCENTILE] - : null, - isDisadvagtaged: properties[constants.IS_FEDERAL_POVERTY_LEVEL_200] - ? properties[constants.IS_FEDERAL_POVERTY_LEVEL_200] - : null, + value: properties.hasOwnProperty(constants.POVERTY_BELOW_200_PERCENTILE) ? + properties[constants.POVERTY_BELOW_200_PERCENTILE] : + null, + isDisadvagtaged: properties[constants.IS_FEDERAL_POVERTY_LEVEL_200] ? + properties[constants.IS_FEDERAL_POVERTY_LEVEL_200] : + null, threshold: 65, }; // const higherEd: indicatorInfo = { @@ -429,342 +429,343 @@ const AreaDetail = ({ properties }: IAreaDetailProps) => { const energyCost: indicatorInfo = { label: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATORS.ENERGY_COST), description: intl.formatMessage( - EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.ENERGY_COST + EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.ENERGY_COST, ), type: "percentile", - value: properties.hasOwnProperty(constants.ENERGY_PERCENTILE) - ? properties[constants.ENERGY_PERCENTILE] - : null, - isDisadvagtaged: properties[constants.IS_EXCEEDS_THRESH_FOR_ENERGY_BURDEN] - ? properties[constants.IS_EXCEEDS_THRESH_FOR_ENERGY_BURDEN] - : null, + value: properties.hasOwnProperty(constants.ENERGY_PERCENTILE) ? + properties[constants.ENERGY_PERCENTILE] : + null, + isDisadvagtaged: properties[constants.IS_EXCEEDS_THRESH_FOR_ENERGY_BURDEN] ? + properties[constants.IS_EXCEEDS_THRESH_FOR_ENERGY_BURDEN] : + null, }; const pm25: indicatorInfo = { label: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATORS.PM_2_5), description: intl.formatMessage( - EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.PM_2_5 + EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.PM_2_5, ), type: "percentile", - value: properties.hasOwnProperty(constants.PM25_PERCENTILE) - ? properties[constants.PM25_PERCENTILE] - : null, - isDisadvagtaged: properties[constants.IS_EXCEEDS_THRESH_FOR_PM25] - ? properties[constants.IS_EXCEEDS_THRESH_FOR_PM25] - : null, + value: properties.hasOwnProperty(constants.PM25_PERCENTILE) ? + properties[constants.PM25_PERCENTILE] : + null, + isDisadvagtaged: properties[constants.IS_EXCEEDS_THRESH_FOR_PM25] ? + properties[constants.IS_EXCEEDS_THRESH_FOR_PM25] : + null, }; // Health category const asthma: indicatorInfo = { label: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATORS.ASTHMA), description: intl.formatMessage( - EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.ASTHMA + EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.ASTHMA, ), type: "percentile", - value: properties.hasOwnProperty(constants.ASTHMA_PERCENTILE) - ? properties[constants.ASTHMA_PERCENTILE] - : null, - isDisadvagtaged: properties[constants.IS_EXCEEDS_THRESH_FOR_ASTHMA] - ? properties[constants.IS_EXCEEDS_THRESH_FOR_ASTHMA] - : null, + value: properties.hasOwnProperty(constants.ASTHMA_PERCENTILE) ? + properties[constants.ASTHMA_PERCENTILE] : + null, + isDisadvagtaged: properties[constants.IS_EXCEEDS_THRESH_FOR_ASTHMA] ? + properties[constants.IS_EXCEEDS_THRESH_FOR_ASTHMA] : + null, }; const diabetes: indicatorInfo = { label: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATORS.DIABETES), description: intl.formatMessage( - EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.DIABETES + EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.DIABETES, ), type: "percentile", - value: properties.hasOwnProperty(constants.DIABETES_PERCENTILE) - ? properties[constants.DIABETES_PERCENTILE] - : null, - isDisadvagtaged: properties[constants.IS_EXCEEDS_THRESH_FOR_DIABETES] - ? properties[constants.IS_EXCEEDS_THRESH_FOR_DIABETES] - : null, + value: properties.hasOwnProperty(constants.DIABETES_PERCENTILE) ? + properties[constants.DIABETES_PERCENTILE] : + null, + isDisadvagtaged: properties[constants.IS_EXCEEDS_THRESH_FOR_DIABETES] ? + properties[constants.IS_EXCEEDS_THRESH_FOR_DIABETES] : + null, }; const heartDisease: indicatorInfo = { label: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATORS.HEART_DISEASE), description: intl.formatMessage( - EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.HEART_DISEASE + EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.HEART_DISEASE, ), type: "percentile", - value: properties.hasOwnProperty(constants.HEART_PERCENTILE) - ? properties[constants.HEART_PERCENTILE] - : null, - isDisadvagtaged: properties[constants.IS_EXCEEDS_THRESH_FOR_HEART_DISEASE] - ? properties[constants.IS_EXCEEDS_THRESH_FOR_HEART_DISEASE] - : null, + value: properties.hasOwnProperty(constants.HEART_PERCENTILE) ? + properties[constants.HEART_PERCENTILE] : + null, + isDisadvagtaged: properties[constants.IS_EXCEEDS_THRESH_FOR_HEART_DISEASE] ? + properties[constants.IS_EXCEEDS_THRESH_FOR_HEART_DISEASE] : + null, }; const lifeExpect: indicatorInfo = { label: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATORS.LIFE_EXPECT), description: intl.formatMessage( - EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.LOW_LIFE_EXPECT + EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.LOW_LIFE_EXPECT, ), type: "percentile", - value: properties.hasOwnProperty(constants.LIFE_PERCENTILE) - ? properties[constants.LIFE_PERCENTILE] - : null, - isDisadvagtaged: properties[constants.IS_EXCEEDS_THRESH_FOR_LOW_LIFE_EXP] - ? properties[constants.IS_EXCEEDS_THRESH_FOR_LOW_LIFE_EXP] - : null, + value: properties.hasOwnProperty(constants.LIFE_PERCENTILE) ? + properties[constants.LIFE_PERCENTILE] : + null, + isDisadvagtaged: properties[constants.IS_EXCEEDS_THRESH_FOR_LOW_LIFE_EXP] ? + properties[constants.IS_EXCEEDS_THRESH_FOR_LOW_LIFE_EXP] : + null, }; // Housing category const historicUnderinvest: indicatorInfo = { label: intl.formatMessage( - EXPLORE_COPY.SIDE_PANEL_INDICATORS.HIST_UNDERINVEST + EXPLORE_COPY.SIDE_PANEL_INDICATORS.HIST_UNDERINVEST, ), description: intl.formatMessage( - EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.HIST_UNDERINVEST + EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.HIST_UNDERINVEST, ), type: "boolean", value: properties.hasOwnProperty( - constants.HISTORIC_UNDERINVESTMENT_EXCEED_THRESH - ) - ? properties[constants.HISTORIC_UNDERINVESTMENT_EXCEED_THRESH] === - constants.HISTORIC_UNDERINVESTMENT_RAW_YES - ? true - : false - : null, + constants.HISTORIC_UNDERINVESTMENT_EXCEED_THRESH, + ) ? + properties[constants.HISTORIC_UNDERINVESTMENT_EXCEED_THRESH] === + constants.HISTORIC_UNDERINVESTMENT_RAW_YES ? + true : + false : + null, isDisadvagtaged: properties.hasOwnProperty( - constants.HISTORIC_UNDERINVESTMENT_EXCEED_THRESH + constants.HISTORIC_UNDERINVESTMENT_EXCEED_THRESH, ) && properties[constants.HISTORIC_UNDERINVESTMENT_EXCEED_THRESH] === - constants.HISTORIC_UNDERINVESTMENT_RAW_YES - ? true - : false, + constants.HISTORIC_UNDERINVESTMENT_RAW_YES ? + true : + false, }; const houseCost: indicatorInfo = { label: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATORS.HOUSE_COST), description: intl.formatMessage( - EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.HOUSE_COST + EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.HOUSE_COST, ), type: "percentile", value: properties.hasOwnProperty( - constants.HOUSING_BURDEN_PROPERTY_PERCENTILE - ) - ? properties[constants.HOUSING_BURDEN_PROPERTY_PERCENTILE] - : null, - isDisadvagtaged: properties[constants.IS_EXCEEDS_THRESH_FOR_HOUSE_BURDEN] - ? properties[constants.IS_EXCEEDS_THRESH_FOR_HOUSE_BURDEN] - : null, + constants.HOUSING_BURDEN_PROPERTY_PERCENTILE, + ) ? + properties[constants.HOUSING_BURDEN_PROPERTY_PERCENTILE] : + null, + isDisadvagtaged: properties[constants.IS_EXCEEDS_THRESH_FOR_HOUSE_BURDEN] ? + properties[constants.IS_EXCEEDS_THRESH_FOR_HOUSE_BURDEN] : + null, }; const lackGreenSpace: indicatorInfo = { label: intl.formatMessage( - EXPLORE_COPY.SIDE_PANEL_INDICATORS.LACK_GREEN_SPACE + EXPLORE_COPY.SIDE_PANEL_INDICATORS.LACK_GREEN_SPACE, ), description: intl.formatMessage( - EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.LACK_GREEN_SPACE + EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.LACK_GREEN_SPACE, ), type: "percentile", - value: properties.hasOwnProperty(constants.IMPERVIOUS_PERCENTILE) - ? properties[constants.IMPERVIOUS_PERCENTILE] - : null, - isDisadvagtaged: properties[constants.IS_EXCEEDS_THRESH_IMPERVIOUS] - ? properties[constants.IS_EXCEEDS_THRESH_IMPERVIOUS] - : null, + value: properties.hasOwnProperty(constants.IMPERVIOUS_PERCENTILE) ? + properties[constants.IMPERVIOUS_PERCENTILE] : + null, + isDisadvagtaged: properties[constants.IS_EXCEEDS_THRESH_IMPERVIOUS] ? + properties[constants.IS_EXCEEDS_THRESH_IMPERVIOUS] : + null, }; const lackPlumbing: indicatorInfo = { label: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATORS.LACK_PLUMBING), description: intl.formatMessage( - EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.LACK_PLUMBING + EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.LACK_PLUMBING, ), type: "percentile", - value: properties.hasOwnProperty(constants.KITCHEN_PLUMB_PERCENTILE) - ? properties[constants.KITCHEN_PLUMB_PERCENTILE] - : null, - isDisadvagtaged: properties[constants.IS_EXCEEDS_THRESH_KITCHEN_PLUMB] - ? properties[constants.IS_EXCEEDS_THRESH_KITCHEN_PLUMB] - : null, + value: properties.hasOwnProperty(constants.KITCHEN_PLUMB_PERCENTILE) ? + properties[constants.KITCHEN_PLUMB_PERCENTILE] : + null, + isDisadvagtaged: properties[constants.IS_EXCEEDS_THRESH_KITCHEN_PLUMB] ? + properties[constants.IS_EXCEEDS_THRESH_KITCHEN_PLUMB] : + null, }; const leadPaint: indicatorInfo = { label: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATORS.LEAD_PAINT), description: intl.formatMessage( - EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.LEAD_PAINT + EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.LEAD_PAINT, ), type: "percentile", - value: properties.hasOwnProperty(constants.LEAD_PAINT_PERCENTILE) - ? properties[constants.LEAD_PAINT_PERCENTILE] - : null, + value: properties.hasOwnProperty(constants.LEAD_PAINT_PERCENTILE) ? + properties[constants.LEAD_PAINT_PERCENTILE] : + null, isDisadvagtaged: properties[ - constants.IS_EXCEEDS_THRESH_FOR_LEAD_PAINT_AND_MEDIAN_HOME_VAL - ] - ? properties[ + constants.IS_EXCEEDS_THRESH_FOR_LEAD_PAINT_AND_MEDIAN_HOME_VAL + ] ? + properties[ constants.IS_EXCEEDS_THRESH_FOR_LEAD_PAINT_AND_MEDIAN_HOME_VAL - ] - : null, + ] : + null, }; // Pollution categeory const abandonMines: indicatorInfo = { label: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATORS.ABANDON_MINES), description: intl.formatMessage( - EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.ABANDON_MINES + EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.ABANDON_MINES, ), type: "boolean", value: properties.hasOwnProperty( - constants.ABANDON_LAND_MINES_EXCEEDS_THRESH - ) - ? properties[constants.ABANDON_LAND_MINES_EXCEEDS_THRESH] - : null, + constants.ABANDON_LAND_MINES_EXCEEDS_THRESH, + ) ? + properties[constants.ABANDON_LAND_MINES_EXCEEDS_THRESH] : + null, isDisadvagtaged: properties.hasOwnProperty( - constants.ABANDON_LAND_MINES_EXCEEDS_THRESH - ) - ? properties[constants.ABANDON_LAND_MINES_EXCEEDS_THRESH] - : null, + constants.ABANDON_LAND_MINES_EXCEEDS_THRESH, + ) ? + properties[constants.ABANDON_LAND_MINES_EXCEEDS_THRESH] : + null, }; const formerDefSites: indicatorInfo = { label: intl.formatMessage( - EXPLORE_COPY.SIDE_PANEL_INDICATORS.FORMER_DEF_SITES + EXPLORE_COPY.SIDE_PANEL_INDICATORS.FORMER_DEF_SITES, ), description: intl.formatMessage( - EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.FORMER_DEF_SITES + EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.FORMER_DEF_SITES, ), type: "boolean", - value: properties.hasOwnProperty(constants.FORMER_DEF_SITES_RAW_VALUE) // double equality is used in this instance as it seems that FUDS_RAW could be "1" or 1 from the BE - ? properties[constants.FORMER_DEF_SITES_RAW_VALUE] == - constants.FUDS_RAW_YES - ? true - : false - : null, + // double equality is used in this instance as it seems that FUDS_RAW could be "1" or 1 from the BE + value: properties.hasOwnProperty(constants.FORMER_DEF_SITES_RAW_VALUE) ? + properties[constants.FORMER_DEF_SITES_RAW_VALUE] == + constants.FUDS_RAW_YES ? + true : + false : + null, isDisadvagtaged: properties.hasOwnProperty( - constants.FORMER_DEF_SITES_EXCEEDS_THRESH - ) - ? properties[constants.FORMER_DEF_SITES_EXCEEDS_THRESH] - : null, + constants.FORMER_DEF_SITES_EXCEEDS_THRESH, + ) ? + properties[constants.FORMER_DEF_SITES_EXCEEDS_THRESH] : + null, }; const proxHaz: indicatorInfo = { label: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATORS.PROX_HAZ), description: intl.formatMessage( - EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.PROX_HAZ + EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.PROX_HAZ, ), type: "percentile", - value: properties.hasOwnProperty(constants.PROXIMITY_TSDF_SITES_PERCENTILE) - ? properties[constants.PROXIMITY_TSDF_SITES_PERCENTILE] - : null, - isDisadvagtaged: properties[constants.IS_EXCEEDS_THRESH_FOR_HAZARD_WASTE] - ? properties[constants.IS_EXCEEDS_THRESH_FOR_HAZARD_WASTE] - : null, + value: properties.hasOwnProperty(constants.PROXIMITY_TSDF_SITES_PERCENTILE) ? + properties[constants.PROXIMITY_TSDF_SITES_PERCENTILE] : + null, + isDisadvagtaged: properties[constants.IS_EXCEEDS_THRESH_FOR_HAZARD_WASTE] ? + properties[constants.IS_EXCEEDS_THRESH_FOR_HAZARD_WASTE] : + null, }; const proxRMP: indicatorInfo = { label: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATORS.PROX_RMP), description: intl.formatMessage( - EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.PROX_RMP + EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.PROX_RMP, ), type: "percentile", - value: properties.hasOwnProperty(constants.PROXIMITY_RMP_SITES_PERCENTILE) - ? properties[constants.PROXIMITY_RMP_SITES_PERCENTILE] - : null, - isDisadvagtaged: properties[constants.IS_EXCEEDS_THRESH_FOR_RMP] - ? properties[constants.IS_EXCEEDS_THRESH_FOR_RMP] - : null, + value: properties.hasOwnProperty(constants.PROXIMITY_RMP_SITES_PERCENTILE) ? + properties[constants.PROXIMITY_RMP_SITES_PERCENTILE] : + null, + isDisadvagtaged: properties[constants.IS_EXCEEDS_THRESH_FOR_RMP] ? + properties[constants.IS_EXCEEDS_THRESH_FOR_RMP] : + null, }; const proxNPL: indicatorInfo = { label: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATORS.PROX_NPL), description: intl.formatMessage( - EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.PROX_NPL + EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.PROX_NPL, ), type: "percentile", - value: properties.hasOwnProperty(constants.PROXIMITY_NPL_SITES_PERCENTILE) - ? properties[constants.PROXIMITY_NPL_SITES_PERCENTILE] - : null, - isDisadvagtaged: properties[constants.IS_EXCEEDS_THRESH_FOR_SUPERFUND] - ? properties[constants.IS_EXCEEDS_THRESH_FOR_SUPERFUND] - : null, + value: properties.hasOwnProperty(constants.PROXIMITY_NPL_SITES_PERCENTILE) ? + properties[constants.PROXIMITY_NPL_SITES_PERCENTILE] : + null, + isDisadvagtaged: properties[constants.IS_EXCEEDS_THRESH_FOR_SUPERFUND] ? + properties[constants.IS_EXCEEDS_THRESH_FOR_SUPERFUND] : + null, }; // Transpotation category const dieselPartMatter: indicatorInfo = { label: intl.formatMessage( - EXPLORE_COPY.SIDE_PANEL_INDICATORS.DIESEL_PARTICULATE_MATTER + EXPLORE_COPY.SIDE_PANEL_INDICATORS.DIESEL_PARTICULATE_MATTER, ), description: intl.formatMessage( - EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.DIESEL_PARTICULATE_MATTER + EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.DIESEL_PARTICULATE_MATTER, ), type: "percentile", - value: properties.hasOwnProperty(constants.DIESEL_MATTER_PERCENTILE) - ? properties[constants.DIESEL_MATTER_PERCENTILE] - : null, - isDisadvagtaged: properties[constants.IS_EXCEEDS_THRESH_FOR_DIESEL_PM] - ? properties[constants.IS_EXCEEDS_THRESH_FOR_DIESEL_PM] - : null, + value: properties.hasOwnProperty(constants.DIESEL_MATTER_PERCENTILE) ? + properties[constants.DIESEL_MATTER_PERCENTILE] : + null, + isDisadvagtaged: properties[constants.IS_EXCEEDS_THRESH_FOR_DIESEL_PM] ? + properties[constants.IS_EXCEEDS_THRESH_FOR_DIESEL_PM] : + null, }; const barrierTransport: indicatorInfo = { label: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATORS.BARRIER_TRANS), description: intl.formatMessage( - EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.BARRIER_TRANS + EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.BARRIER_TRANS, ), type: "percentile", - value: properties.hasOwnProperty(constants.TRAVEL_DISADV_PERCENTILE) - ? properties[constants.TRAVEL_DISADV_PERCENTILE] - : null, - isDisadvagtaged: properties[constants.IS_EXCEEDS_THRESH_TRAVEL_DISADV] - ? properties[constants.IS_EXCEEDS_THRESH_TRAVEL_DISADV] - : null, + value: properties.hasOwnProperty(constants.TRAVEL_DISADV_PERCENTILE) ? + properties[constants.TRAVEL_DISADV_PERCENTILE] : + null, + isDisadvagtaged: properties[constants.IS_EXCEEDS_THRESH_TRAVEL_DISADV] ? + properties[constants.IS_EXCEEDS_THRESH_TRAVEL_DISADV] : + null, }; const trafficVolume: indicatorInfo = { label: intl.formatMessage( - EXPLORE_COPY.SIDE_PANEL_INDICATORS.TRAFFIC_VOLUME + EXPLORE_COPY.SIDE_PANEL_INDICATORS.TRAFFIC_VOLUME, ), description: intl.formatMessage( - EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.TRAFFIC_VOLUME + EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.TRAFFIC_VOLUME, ), type: "percentile", - value: properties.hasOwnProperty(constants.TRAFFIC_PERCENTILE) - ? properties[constants.TRAFFIC_PERCENTILE] - : null, - isDisadvagtaged: properties[constants.IS_EXCEEDS_THRESH_FOR_TRAFFIC_PROX] - ? properties[constants.IS_EXCEEDS_THRESH_FOR_TRAFFIC_PROX] - : null, + value: properties.hasOwnProperty(constants.TRAFFIC_PERCENTILE) ? + properties[constants.TRAFFIC_PERCENTILE] : + null, + isDisadvagtaged: properties[constants.IS_EXCEEDS_THRESH_FOR_TRAFFIC_PROX] ? + properties[constants.IS_EXCEEDS_THRESH_FOR_TRAFFIC_PROX] : + null, }; // Water category const leakyTanks: indicatorInfo = { label: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATORS.LEAKY_TANKS), description: intl.formatMessage( - EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.LEAKY_TANKS + EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.LEAKY_TANKS, ), type: "percentile", - value: properties.hasOwnProperty(constants.LEAKY_UNDER_PERCENTILE) - ? properties[constants.LEAKY_UNDER_PERCENTILE] - : null, - isDisadvagtaged: properties[constants.IS_EXCEEDS_THRESH_LEAKY_UNDER] - ? properties[constants.IS_EXCEEDS_THRESH_LEAKY_UNDER] - : null, + value: properties.hasOwnProperty(constants.LEAKY_UNDER_PERCENTILE) ? + properties[constants.LEAKY_UNDER_PERCENTILE] : + null, + isDisadvagtaged: properties[constants.IS_EXCEEDS_THRESH_LEAKY_UNDER] ? + properties[constants.IS_EXCEEDS_THRESH_LEAKY_UNDER] : + null, }; const wasteWater: indicatorInfo = { label: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATORS.WASTE_WATER), description: intl.formatMessage( - EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.WASTE_WATER + EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.WASTE_WATER, ), type: "percentile", - value: properties.hasOwnProperty(constants.WASTEWATER_PERCENTILE) - ? properties[constants.WASTEWATER_PERCENTILE] - : null, - isDisadvagtaged: properties[constants.IS_EXCEEDS_THRESH_FOR_WASTEWATER] - ? properties[constants.IS_EXCEEDS_THRESH_FOR_WASTEWATER] - : null, + value: properties.hasOwnProperty(constants.WASTEWATER_PERCENTILE) ? + properties[constants.WASTEWATER_PERCENTILE] : + null, + isDisadvagtaged: properties[constants.IS_EXCEEDS_THRESH_FOR_WASTEWATER] ? + properties[constants.IS_EXCEEDS_THRESH_FOR_WASTEWATER] : + null, }; // Workforce dev category const lingIso: indicatorInfo = { label: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATORS.LING_ISO), description: intl.formatMessage( - EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.LING_ISO + EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.LING_ISO, ), type: "percentile", value: properties.hasOwnProperty( - constants.LINGUISTIC_ISOLATION_PROPERTY_PERCENTILE - ) - ? properties[constants.LINGUISTIC_ISOLATION_PROPERTY_PERCENTILE] - : null, - isDisadvagtaged: properties[constants.IS_EXCEEDS_THRESH_FOR_LINGUISITIC_ISO] - ? properties[constants.IS_EXCEEDS_THRESH_FOR_LINGUISITIC_ISO] - : null, + constants.LINGUISTIC_ISOLATION_PROPERTY_PERCENTILE, + ) ? + properties[constants.LINGUISTIC_ISOLATION_PROPERTY_PERCENTILE] : + null, + isDisadvagtaged: properties[constants.IS_EXCEEDS_THRESH_FOR_LINGUISITIC_ISO] ? + properties[constants.IS_EXCEEDS_THRESH_FOR_LINGUISITIC_ISO] : + null, }; const lowMedInc: indicatorInfo = { label: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATORS.LOW_MED_INC), description: intl.formatMessage( - EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.LOW_MED_INCOME + EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.LOW_MED_INCOME, ), type: "percentile", value: getWorkForceIndicatorValue("lowMedInc"), @@ -773,7 +774,7 @@ const AreaDetail = ({ properties }: IAreaDetailProps) => { const unemploy: indicatorInfo = { label: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATORS.UNEMPLOY), description: intl.formatMessage( - EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.UNEMPLOY + EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.UNEMPLOY, ), type: "percentile", value: getWorkForceIndicatorValue("unemploy"), @@ -782,7 +783,7 @@ const AreaDetail = ({ properties }: IAreaDetailProps) => { const poverty: indicatorInfo = { label: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATORS.POVERTY), description: intl.formatMessage( - EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.POVERTY + EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.POVERTY, ), type: "percentile", value: getWorkForceIndicatorValue("poverty"), @@ -791,7 +792,7 @@ const AreaDetail = ({ properties }: IAreaDetailProps) => { const highSchool: indicatorInfo = { label: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATORS.HIGH_SCL), description: intl.formatMessage( - EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.HIGH_SKL + EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.HIGH_SKL, ), type: "percent", value: getWorkForceIndicatorValue("highSchool"), @@ -811,66 +812,66 @@ const AreaDetail = ({ properties }: IAreaDetailProps) => { titleText: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_CATEGORY.CLIMATE), indicators: [expAgLoss, expBldLoss, expPopLoss, flooding, wildfire], socioEcIndicators: [lowInc], - isDisadvagtaged: properties[constants.IS_CLIMATE_FACTOR_DISADVANTAGED] - ? properties[constants.IS_CLIMATE_FACTOR_DISADVANTAGED] - : null, + isDisadvagtaged: properties[constants.IS_CLIMATE_FACTOR_DISADVANTAGED] ? + properties[constants.IS_CLIMATE_FACTOR_DISADVANTAGED] : + null, isExceed1MoreBurden: properties[ - constants.IS_CLIMATE_EXCEED_ONE_OR_MORE_INDICATORS - ] - ? properties[constants.IS_CLIMATE_EXCEED_ONE_OR_MORE_INDICATORS] - : null, + constants.IS_CLIMATE_EXCEED_ONE_OR_MORE_INDICATORS + ] ? + properties[constants.IS_CLIMATE_EXCEED_ONE_OR_MORE_INDICATORS] : + null, isExceedBothSocioBurdens: properties[ - constants.IS_EXCEED_BOTH_SOCIO_INDICATORS - ] - ? properties[constants.IS_EXCEED_BOTH_SOCIO_INDICATORS] - : null, + constants.IS_EXCEED_BOTH_SOCIO_INDICATORS + ] ? + properties[constants.IS_EXCEED_BOTH_SOCIO_INDICATORS] : + null, }, { id: "clean-energy", titleText: intl.formatMessage( - EXPLORE_COPY.SIDE_PANEL_CATEGORY.CLEAN_ENERGY + EXPLORE_COPY.SIDE_PANEL_CATEGORY.CLEAN_ENERGY, ), indicators: [energyCost, pm25], socioEcIndicators: [lowInc], - isDisadvagtaged: properties[constants.IS_ENERGY_FACTOR_DISADVANTAGED] - ? properties[constants.IS_ENERGY_FACTOR_DISADVANTAGED] - : null, + isDisadvagtaged: properties[constants.IS_ENERGY_FACTOR_DISADVANTAGED] ? + properties[constants.IS_ENERGY_FACTOR_DISADVANTAGED] : + null, isExceed1MoreBurden: properties[ - constants.IS_ENERGY_EXCEED_ONE_OR_MORE_INDICATORS - ] - ? properties[constants.IS_ENERGY_EXCEED_ONE_OR_MORE_INDICATORS] - : null, + constants.IS_ENERGY_EXCEED_ONE_OR_MORE_INDICATORS + ] ? + properties[constants.IS_ENERGY_EXCEED_ONE_OR_MORE_INDICATORS] : + null, isExceedBothSocioBurdens: properties[ - constants.IS_EXCEED_BOTH_SOCIO_INDICATORS - ] - ? properties[constants.IS_EXCEED_BOTH_SOCIO_INDICATORS] - : null, + constants.IS_EXCEED_BOTH_SOCIO_INDICATORS + ] ? + properties[constants.IS_EXCEED_BOTH_SOCIO_INDICATORS] : + null, }, { id: "health-burdens", titleText: intl.formatMessage( - EXPLORE_COPY.SIDE_PANEL_CATEGORY.HEALTH_BURDEN + EXPLORE_COPY.SIDE_PANEL_CATEGORY.HEALTH_BURDEN, ), indicators: [asthma, diabetes, heartDisease, lifeExpect], socioEcIndicators: [lowInc], - isDisadvagtaged: properties[constants.IS_HEALTH_FACTOR_DISADVANTAGED] - ? properties[constants.IS_HEALTH_FACTOR_DISADVANTAGED] - : null, + isDisadvagtaged: properties[constants.IS_HEALTH_FACTOR_DISADVANTAGED] ? + properties[constants.IS_HEALTH_FACTOR_DISADVANTAGED] : + null, isExceed1MoreBurden: properties[ - constants.IS_HEALTH_EXCEED_ONE_OR_MORE_INDICATORS - ] - ? properties[constants.IS_HEALTH_EXCEED_ONE_OR_MORE_INDICATORS] - : null, + constants.IS_HEALTH_EXCEED_ONE_OR_MORE_INDICATORS + ] ? + properties[constants.IS_HEALTH_EXCEED_ONE_OR_MORE_INDICATORS] : + null, isExceedBothSocioBurdens: properties[ - constants.IS_EXCEED_BOTH_SOCIO_INDICATORS - ] - ? properties[constants.IS_EXCEED_BOTH_SOCIO_INDICATORS] - : null, + constants.IS_EXCEED_BOTH_SOCIO_INDICATORS + ] ? + properties[constants.IS_EXCEED_BOTH_SOCIO_INDICATORS] : + null, }, { id: "sustain-house", titleText: intl.formatMessage( - EXPLORE_COPY.SIDE_PANEL_CATEGORY.SUSTAIN_HOUSE + EXPLORE_COPY.SIDE_PANEL_CATEGORY.SUSTAIN_HOUSE, ), indicators: [ historicUnderinvest, @@ -880,101 +881,101 @@ const AreaDetail = ({ properties }: IAreaDetailProps) => { leadPaint, ], socioEcIndicators: [lowInc], - isDisadvagtaged: properties[constants.IS_HOUSING_FACTOR_DISADVANTAGED] - ? properties[constants.IS_HOUSING_FACTOR_DISADVANTAGED] - : null, + isDisadvagtaged: properties[constants.IS_HOUSING_FACTOR_DISADVANTAGED] ? + properties[constants.IS_HOUSING_FACTOR_DISADVANTAGED] : + null, isExceed1MoreBurden: properties[ - constants.IS_HOUSING_EXCEED_ONE_OR_MORE_INDICATORS - ] - ? properties[constants.IS_HOUSING_EXCEED_ONE_OR_MORE_INDICATORS] - : null, + constants.IS_HOUSING_EXCEED_ONE_OR_MORE_INDICATORS + ] ? + properties[constants.IS_HOUSING_EXCEED_ONE_OR_MORE_INDICATORS] : + null, isExceedBothSocioBurdens: properties[ - constants.IS_EXCEED_BOTH_SOCIO_INDICATORS - ] - ? properties[constants.IS_EXCEED_BOTH_SOCIO_INDICATORS] - : null, + constants.IS_EXCEED_BOTH_SOCIO_INDICATORS + ] ? + properties[constants.IS_EXCEED_BOTH_SOCIO_INDICATORS] : + null, }, { id: "leg-pollute", titleText: intl.formatMessage( - EXPLORE_COPY.SIDE_PANEL_CATEGORY.LEG_POLLUTE + EXPLORE_COPY.SIDE_PANEL_CATEGORY.LEG_POLLUTE, ), indicators: [abandonMines, formerDefSites, proxHaz, proxRMP, proxNPL], socioEcIndicators: [lowInc], - isDisadvagtaged: properties[constants.IS_POLLUTION_FACTOR_DISADVANTAGED] - ? properties[constants.IS_POLLUTION_FACTOR_DISADVANTAGED] - : null, + isDisadvagtaged: properties[constants.IS_POLLUTION_FACTOR_DISADVANTAGED] ? + properties[constants.IS_POLLUTION_FACTOR_DISADVANTAGED] : + null, isExceed1MoreBurden: properties[ - constants.IS_POLLUTION_EXCEED_ONE_OR_MORE_INDICATORS - ] - ? properties[constants.IS_POLLUTION_EXCEED_ONE_OR_MORE_INDICATORS] - : null, + constants.IS_POLLUTION_EXCEED_ONE_OR_MORE_INDICATORS + ] ? + properties[constants.IS_POLLUTION_EXCEED_ONE_OR_MORE_INDICATORS] : + null, isExceedBothSocioBurdens: properties[ - constants.IS_EXCEED_BOTH_SOCIO_INDICATORS - ] - ? properties[constants.IS_EXCEED_BOTH_SOCIO_INDICATORS] - : null, + constants.IS_EXCEED_BOTH_SOCIO_INDICATORS + ] ? + properties[constants.IS_EXCEED_BOTH_SOCIO_INDICATORS] : + null, }, { id: "clean-transport", titleText: intl.formatMessage( - EXPLORE_COPY.SIDE_PANEL_CATEGORY.CLEAN_TRANSPORT + EXPLORE_COPY.SIDE_PANEL_CATEGORY.CLEAN_TRANSPORT, ), indicators: [dieselPartMatter, barrierTransport, trafficVolume], socioEcIndicators: [lowInc], - isDisadvagtaged: properties[constants.IS_TRANSPORT_FACTOR_DISADVANTAGED] - ? properties[constants.IS_TRANSPORT_FACTOR_DISADVANTAGED] - : null, + isDisadvagtaged: properties[constants.IS_TRANSPORT_FACTOR_DISADVANTAGED] ? + properties[constants.IS_TRANSPORT_FACTOR_DISADVANTAGED] : + null, isExceed1MoreBurden: properties[ - constants.IS_TRANSPORT_EXCEED_ONE_OR_MORE_INDICATORS - ] - ? properties[constants.IS_TRANSPORT_EXCEED_ONE_OR_MORE_INDICATORS] - : null, + constants.IS_TRANSPORT_EXCEED_ONE_OR_MORE_INDICATORS + ] ? + properties[constants.IS_TRANSPORT_EXCEED_ONE_OR_MORE_INDICATORS] : + null, isExceedBothSocioBurdens: properties[ - constants.IS_EXCEED_BOTH_SOCIO_INDICATORS - ] - ? properties[constants.IS_EXCEED_BOTH_SOCIO_INDICATORS] - : null, + constants.IS_EXCEED_BOTH_SOCIO_INDICATORS + ] ? + properties[constants.IS_EXCEED_BOTH_SOCIO_INDICATORS] : + null, }, { id: "clean-water", titleText: intl.formatMessage( - EXPLORE_COPY.SIDE_PANEL_CATEGORY.CLEAN_WATER + EXPLORE_COPY.SIDE_PANEL_CATEGORY.CLEAN_WATER, ), indicators: [leakyTanks, wasteWater], socioEcIndicators: [lowInc], - isDisadvagtaged: properties[constants.IS_WATER_FACTOR_DISADVANTAGED] - ? properties[constants.IS_WATER_FACTOR_DISADVANTAGED] - : null, + isDisadvagtaged: properties[constants.IS_WATER_FACTOR_DISADVANTAGED] ? + properties[constants.IS_WATER_FACTOR_DISADVANTAGED] : + null, isExceed1MoreBurden: properties[ - constants.IS_WATER_EXCEED_ONE_OR_MORE_INDICATORS - ] - ? properties[constants.IS_WATER_EXCEED_ONE_OR_MORE_INDICATORS] - : null, + constants.IS_WATER_EXCEED_ONE_OR_MORE_INDICATORS + ] ? + properties[constants.IS_WATER_EXCEED_ONE_OR_MORE_INDICATORS] : + null, isExceedBothSocioBurdens: properties[ - constants.IS_EXCEED_BOTH_SOCIO_INDICATORS - ] - ? properties[constants.IS_EXCEED_BOTH_SOCIO_INDICATORS] - : null, + constants.IS_EXCEED_BOTH_SOCIO_INDICATORS + ] ? + properties[constants.IS_EXCEED_BOTH_SOCIO_INDICATORS] : + null, }, { id: "work-dev", titleText: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_CATEGORY.WORK_DEV), indicators: [lingIso, lowMedInc, poverty, unemploy], socioEcIndicators: [highSchool], - isDisadvagtaged: properties[constants.IS_WORKFORCE_FACTOR_DISADVANTAGED] - ? properties[constants.IS_WORKFORCE_FACTOR_DISADVANTAGED] - : null, + isDisadvagtaged: properties[constants.IS_WORKFORCE_FACTOR_DISADVANTAGED] ? + properties[constants.IS_WORKFORCE_FACTOR_DISADVANTAGED] : + null, isExceed1MoreBurden: properties[ - constants.IS_WORKFORCE_EXCEED_ONE_OR_MORE_INDICATORS - ] - ? properties[constants.IS_WORKFORCE_EXCEED_ONE_OR_MORE_INDICATORS] - : null, + constants.IS_WORKFORCE_EXCEED_ONE_OR_MORE_INDICATORS + ] ? + properties[constants.IS_WORKFORCE_EXCEED_ONE_OR_MORE_INDICATORS] : + null, isExceedBothSocioBurdens: properties[ - constants.IS_WORKFORCE_EXCEED_BOTH_SOCIO_INDICATORS - ] - ? properties[constants.IS_WORKFORCE_EXCEED_BOTH_SOCIO_INDICATORS] - : null, + constants.IS_WORKFORCE_EXCEED_BOTH_SOCIO_INDICATORS + ] ? + properties[constants.IS_WORKFORCE_EXCEED_BOTH_SOCIO_INDICATORS] : + null, }, ]; @@ -987,7 +988,7 @@ const AreaDetail = ({ properties }: IAreaDetailProps) => { if (sidePanelState === constants.SIDE_PANEL_STATE_VALUES.PUERTO_RICO) { // Allow all categories except health burdens: categories = categories.filter( - (category) => category.id !== "health-burdens" + (category) => category.id !== "health-burdens", ); // Re-define which burdens show up for each category: @@ -1052,12 +1053,12 @@ const AreaDetail = ({ properties }: IAreaDetailProps) => { <> {/* Indicators - filters then map */} {category.indicators - .filter( - indicatorFilter(EXPLORE_COPY.SIDE_PANEL_INDICATORS.HIST_UNDERINVEST) - ) - .map((indicator: any, index: number) => { - return ; - })} + .filter( + indicatorFilter(EXPLORE_COPY.SIDE_PANEL_INDICATORS.HIST_UNDERINVEST), + ) + .map((indicator: any, index: number) => { + return ; + })} {/* AND */}
@@ -1113,19 +1114,19 @@ const AreaDetail = ({ properties }: IAreaDetailProps) => {
= 1 - ? properties[constants.TRIBAL_AREAS_COUNT_AK] - : null + properties[constants.TRIBAL_AREAS_COUNT_AK] >= 1 ? + properties[constants.TRIBAL_AREAS_COUNT_AK] : + null } tribalCountUS={ - properties[constants.TRIBAL_AREAS_COUNT_CONUS] >= 1 - ? properties[constants.TRIBAL_AREAS_COUNT_CONUS] - : null + properties[constants.TRIBAL_AREAS_COUNT_CONUS] >= 1 ? + properties[constants.TRIBAL_AREAS_COUNT_CONUS] : + null } percentTractTribal={percentTractTribal} /> @@ -1146,14 +1147,14 @@ const AreaDetail = ({ properties }: IAreaDetailProps) => { properties[constants.ADJACENCY_LOW_INCOME_EXCEEDS_THRESH] } tribalCountAK={ - properties[constants.TRIBAL_AREAS_COUNT_AK] >= 1 - ? properties[constants.TRIBAL_AREAS_COUNT_AK] - : null + properties[constants.TRIBAL_AREAS_COUNT_AK] >= 1 ? + properties[constants.TRIBAL_AREAS_COUNT_AK] : + null } tribalCountUS={ - properties[constants.TRIBAL_AREAS_COUNT_CONUS] >= 1 - ? properties[constants.TRIBAL_AREAS_COUNT_CONUS] - : null + properties[constants.TRIBAL_AREAS_COUNT_CONUS] >= 1 ? + properties[constants.TRIBAL_AREAS_COUNT_CONUS] : + null } percentTractTribal={percentTractTribal} /> @@ -1168,14 +1169,14 @@ const AreaDetail = ({ properties }: IAreaDetailProps) => { properties[constants.ADJACENCY_LOW_INCOME_EXCEEDS_THRESH] } tribalCountAK={ - properties[constants.TRIBAL_AREAS_COUNT_AK] >= 1 - ? properties[constants.TRIBAL_AREAS_COUNT_AK] - : null + properties[constants.TRIBAL_AREAS_COUNT_AK] >= 1 ? + properties[constants.TRIBAL_AREAS_COUNT_AK] : + null } tribalCountUS={ - properties[constants.TRIBAL_AREAS_COUNT_CONUS] >= 1 - ? properties[constants.TRIBAL_AREAS_COUNT_CONUS] - : null + properties[constants.TRIBAL_AREAS_COUNT_CONUS] >= 1 ? + properties[constants.TRIBAL_AREAS_COUNT_CONUS] : + null } percentTractTribal={percentTractTribal} /> @@ -1185,23 +1186,23 @@ const AreaDetail = ({ properties }: IAreaDetailProps) => { {/* Only show the DonutCopy if Adjacency index is true and the total number of disadv ind == 0 */} {properties[constants.ADJACENCY_EXCEEDS_THRESH] && properties[constants.TOTAL_NUMBER_OF_DISADVANTAGE_INDICATORS] === 0 && ( - 0 - ? properties[constants.POVERTY_BELOW_200_PERCENTILE] - : null - } - /> - )} + 0 ? + properties[constants.POVERTY_BELOW_200_PERCENTILE] : + null + } + /> + )} {/* Send Feedback button */} { className={styles.buttonImage} src={launchIcon} alt={intl.formatMessage( - EXPLORE_COPY.COMMUNITY.SEND_FEEDBACK.IMG_ICON.ALT_TAG + EXPLORE_COPY.COMMUNITY.SEND_FEEDBACK.IMG_ICON.ALT_TAG, )} />