From fb69a09485ee628a7dd5d3d8fa857ab1cf99a3d8 Mon Sep 17 00:00:00 2001 From: Vim <86254807+vim-usds@users.noreply.github.com> Date: Thu, 3 Feb 2022 15:07:44 -0500 Subject: [PATCH] Update FE to Def M (#1235) * Update to Def M - update first column of meth page, formula intro, ID,AND, & remove THEN - remove Low income box under download box - update id as disadv. in each category - modify AND clause in each category - add dataset Higher ed enrollment - update snapshots * Fix HS and higher ed DOM id in links * Update side panel description to def m * Fix typo on AND part of the formula * Update snapshots * Update snapshot * Resolve rebase error where Send feedback was removed - add back send feedback button - update snapshots * Add back blue indicator boolean --- .../src/components/AreaDetail/AreaDetail.tsx | 442 ++++++++++++++++++ client/src/components/AreaDetail/index.tsx | 441 +---------------- .../__snapshots__/areaDetail.test.tsx.snap | 46 +- .../__snapshots__/Categories.test.tsx.snap | 287 ++++++++---- .../CategoryCard/CategoryCard.module.scss | 4 + .../CategoryCard.module.scss.d.ts | 1 + .../components/CategoryCard/CategoryCard.tsx | 5 +- .../__snapshots__/CategoryCard.test.tsx.snap | 36 +- .../__snapshots__/datasetCard.test.tsx.snap | 2 +- .../datasetContainer.test.tsx.snap | 49 +- .../MethodologyFormula/MethodologyFormula.tsx | 9 +- .../MethodologyFormula.test.tsx.snap | 22 +- client/src/data/copy/explore.tsx | 16 +- client/src/data/copy/methodology.tsx | 330 ++++++------- .../__snapshots__/methodology.test.tsx.snap | 376 ++++++++++----- client/src/pages/methodology.tsx | 12 +- client/src/styles/global.scss | 5 - 17 files changed, 1227 insertions(+), 856 deletions(-) create mode 100644 client/src/components/AreaDetail/AreaDetail.tsx diff --git a/client/src/components/AreaDetail/AreaDetail.tsx b/client/src/components/AreaDetail/AreaDetail.tsx new file mode 100644 index 00000000..e35cbe38 --- /dev/null +++ b/client/src/components/AreaDetail/AreaDetail.tsx @@ -0,0 +1,442 @@ +/* eslint-disable quotes */ +// External Libs: +import React from 'react'; +import {useIntl, FormattedMessage} from 'gatsby-plugin-intl'; +import {Accordion, Button} from '@trussworks/react-uswds'; + +// Components: +import Category from '../Category'; +import DisadvantageDot from '../DisadvantageDot'; +import Indicator from '../Indicator'; + +// Styles and constants +import * as styles from './areaDetail.module.scss'; +import * as constants from '../../data/constants'; +import * as EXPLORE_COPY from '../../data/copy/explore'; +import * as CONTACT_COPY from '../../data/copy/contact'; +// @ts-ignore +// import mailIcon from '/node_modules/uswds/dist/img/usa-icons/mail.svg'; + +interface IAreaDetailProps { + properties: constants.J40Properties, +} + +/** + * This interface is used as define the various fields for each indicator in the side panel + * label: the indicator label or title + * description: the description of the indicator used in the side panel + * value: the number from the geoJSON tile + * isDisadvagtaged: the flag from the geoJSON tile + * isPercent: is the value a percent or percentile + * */ +export interface indicatorInfo { + label: string, + description: string, + value: number, + isDisadvagtaged: boolean, + isPercent?: boolean, +} + +const AreaDetail = ({properties}:IAreaDetailProps) => { + const intl = useIntl(); + + // console.log the properties of the census that is selected: + console.log("Area Detail properies: ", properties); + + const score = properties[constants.SCORE_PROPERTY_HIGH] ? properties[constants.SCORE_PROPERTY_HIGH] as number : 0; + const blockGroup = properties[constants.GEOID_PROPERTY] ? properties[constants.GEOID_PROPERTY] : "N/A"; + const population = properties[constants.TOTAL_POPULATION] ? properties[constants.TOTAL_POPULATION] : "N/A"; + const countyName = properties[constants.COUNTY_NAME] ? properties[constants.COUNTY_NAME] : "N/A"; + const stateName = properties[constants.STATE_NAME] ? properties[constants.STATE_NAME] : "N/A"; + + const isCommunityFocus = score >= constants.SCORE_BOUNDARY_THRESHOLD; + + const feedbackEmailSubject = `Census tract ID ${blockGroup}, ${countyName}, ${stateName}`; + const feedbackEmailBody = intl.formatMessage(EXPLORE_COPY.SEND_FEEDBACK.EMAIL_BODY); + + + // Define each indicator in the side panel with constants from copy file (for intl) + // Indicators are grouped by category + 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), + value: properties[constants.EXP_AGRICULTURE_LOSS_PERCENTILE] ? + properties[constants.EXP_AGRICULTURE_LOSS_PERCENTILE] : null, + isDisadvagtaged: properties[constants.IS_GTE_90_EXP_AGR_LOSS_AND_IS_LOW_INCOME] ? + properties[constants.IS_GTE_90_EXP_AGR_LOSS_AND_IS_LOW_INCOME] : 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), + value: properties[constants.EXP_BUILDING_LOSS_PERCENTILE] ? + properties[constants.EXP_BUILDING_LOSS_PERCENTILE] : null, + isDisadvagtaged: properties[constants.IS_GTE_90_EXP_BLD_LOSS_AND_IS_LOW_INCOME] ? + properties[constants.IS_GTE_90_EXP_BLD_LOSS_AND_IS_LOW_INCOME] : 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), + value: properties[constants.EXP_POPULATION_LOSS_PERCENTILE] ? + properties[constants.EXP_POPULATION_LOSS_PERCENTILE] : null, + isDisadvagtaged: properties[constants.IS_GTE_90_EXP_POP_LOSS_AND_IS_LOW_INCOME] ? + properties[constants.IS_GTE_90_EXP_POP_LOSS_AND_IS_LOW_INCOME] : 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), + value: properties[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, + }; + + const energyBurden:indicatorInfo = { + label: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATORS.ENERGY_BURDEN), + description: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.ENERGY_BURDEN), + value: properties[constants.ENERGY_PERCENTILE] ? + properties[constants.ENERGY_PERCENTILE] : null, + isDisadvagtaged: properties[constants.IS_GTE_90_ENERGY_BURDEN_AND_IS_LOW_INCOME] ? + properties[constants.IS_GTE_90_ENERGY_BURDEN_AND_IS_LOW_INCOME] : 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), + value: properties[constants.PM25_PERCENTILE] ? + properties[constants.PM25_PERCENTILE] : null, + isDisadvagtaged: properties[constants.IS_GTE_90_PM25_AND_IS_LOW_INCOME] ? + properties[constants.IS_GTE_90_PM25_AND_IS_LOW_INCOME] : null, + }; + + const dieselPartMatter:indicatorInfo = { + label: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATORS.DIESEL_PARTICULATE_MATTER), + description: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.DIESEL_PARTICULATE_MATTER), + value: properties[constants.DIESEL_MATTER_PERCENTILE] ? + properties[constants.DIESEL_MATTER_PERCENTILE] : null, + isDisadvagtaged: properties[constants.IS_GTE_90_DIESEL_PM_AND_IS_LOW_INCOME] ? + properties[constants.IS_GTE_90_DIESEL_PM_AND_IS_LOW_INCOME] : null, + }; + const trafficVolume:indicatorInfo = { + label: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATORS.TRAFFIC_VOLUME), + description: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.TRAFFIC_VOLUME), + value: properties[constants.TRAFFIC_PERCENTILE] ? + properties[constants.TRAFFIC_PERCENTILE] : null, + isDisadvagtaged: properties[constants.IS_GTE_90_TRAFFIC_PROX_AND_IS_LOW_INCOME] ? + properties[constants.IS_GTE_90_TRAFFIC_PROX_AND_IS_LOW_INCOME] : null, + }; + + const houseBurden:indicatorInfo = { + label: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATORS.HOUSE_BURDEN), + description: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.HOUSE_BURDEN), + value: properties[constants.HOUSING_BURDEN_PROPERTY_PERCENTILE] ? + properties[constants.HOUSING_BURDEN_PROPERTY_PERCENTILE] : null, + isDisadvagtaged: properties[constants.IS_GTE_90_HOUSE_BURDEN_AND_IS_LOW_INCOME] ? + properties[constants.IS_GTE_90_HOUSE_BURDEN_AND_IS_LOW_INCOME] : 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), + value: properties[constants.LEAD_PAINT_PERCENTILE] ? + properties[constants.LEAD_PAINT_PERCENTILE] : null, + isDisadvagtaged: properties[constants.IS_GTE_90_LEAD_PAINT_AND_MEDIAN_HOME_VAL_AND_IS_LOW_INCOME] ? + properties[constants.IS_GTE_90_LEAD_PAINT_AND_MEDIAN_HOME_VAL_AND_IS_LOW_INCOME] : null, + }; + // const medHomeVal:indicatorInfo = { + // label: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATORS.MED_HOME_VAL), + // description: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.MED_HOME_VAL), + // value: properties[constants.MEDIAN_HOME_VALUE_PERCENTILE] ? + // properties[constants.MEDIAN_HOME_VALUE_PERCENTILE] : null, + // isDisadvagtaged: false, // TODO + // }; + + const proxHaz:indicatorInfo = { + label: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATORS.PROX_HAZ), + description: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.PROX_HAZ), + value: properties[constants.PROXIMITY_TSDF_SITES_PERCENTILE] ? + properties[constants.PROXIMITY_TSDF_SITES_PERCENTILE] : null, + isDisadvagtaged: properties[constants.IS_GTE_90_HAZARD_WASTE_AND_IS_LOW_INCOME] ? + properties[constants.IS_GTE_90_HAZARD_WASTE_AND_IS_LOW_INCOME] : 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), + value: properties[constants.PROXIMITY_NPL_SITES_PERCENTILE] ? + properties[constants.PROXIMITY_NPL_SITES_PERCENTILE] : null, + isDisadvagtaged: properties[constants.IS_GTE_90_SUPERFUND_AND_IS_LOW_INCOME] ? + properties[constants.IS_GTE_90_SUPERFUND_AND_IS_LOW_INCOME] : 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), + value: properties[constants.PROXIMITY_RMP_SITES_PERCENTILE] ? + properties[constants.PROXIMITY_RMP_SITES_PERCENTILE] : null, + isDisadvagtaged: properties[constants.IS_GTE_90_RMP_AND_IS_LOW_INCOME] ? + properties[constants.IS_GTE_90_RMP_AND_IS_LOW_INCOME] : 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), + value: properties[constants.WASTEWATER_PERCENTILE] ? + properties[constants.WASTEWATER_PERCENTILE] : null, + isDisadvagtaged: properties[constants.IS_GTE_90_WASTEWATER_AND_IS_LOW_INCOME] ? + properties[constants.IS_GTE_90_WASTEWATER_AND_IS_LOW_INCOME] : null, + }; + + const asthma:indicatorInfo = { + label: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATORS.ASTHMA), + description: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.ASTHMA), + value: properties[constants.ASTHMA_PERCENTILE] ? + properties[constants.ASTHMA_PERCENTILE] : null, + isDisadvagtaged: properties[constants.IS_GTE_90_ASTHMA_AND_IS_LOW_INCOME] ? + properties[constants.IS_GTE_90_ASTHMA_AND_IS_LOW_INCOME] : null, + }; + const diabetes:indicatorInfo = { + label: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATORS.DIABETES), + description: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.DIABETES), + value: properties[constants.DIABETES_PERCENTILE] ? + properties[constants.DIABETES_PERCENTILE] : null, + isDisadvagtaged: properties[constants.IS_GTE_90_DIABETES_AND_IS_LOW_INCOME] ? + properties[constants.IS_GTE_90_DIABETES_AND_IS_LOW_INCOME] : 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), + value: properties[constants.HEART_PERCENTILE] ? + properties[constants.HEART_PERCENTILE] : null, + isDisadvagtaged: properties[constants.IS_GTE_90_HEART_DISEASE_AND_IS_LOW_INCOME] ? + properties[constants.IS_GTE_90_HEART_DISEASE_AND_IS_LOW_INCOME] : 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), + value: properties[constants.LIFE_PERCENTILE] ? + properties[constants.LIFE_PERCENTILE] : null, + isDisadvagtaged: properties[constants.IS_GTE_90_LOW_LIFE_EXP_AND_IS_LOW_INCOME] ? + properties[constants.IS_GTE_90_LOW_LIFE_EXP_AND_IS_LOW_INCOME] : 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), + value: properties[constants.LOW_MEDIAN_INCOME_PERCENTILE] ? + properties[constants.LOW_MEDIAN_INCOME_PERCENTILE] : null, + isDisadvagtaged: properties[constants.IS_GTE_90_LOW_MEDIAN_INCOME_AND_LOW_HIGH_SCHOOL_EDU] ? + properties[constants.IS_GTE_90_LOW_MEDIAN_INCOME_AND_LOW_HIGH_SCHOOL_EDU] : null, + }; + const lingIso:indicatorInfo = { + label: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATORS.LING_ISO), + description: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.LING_ISO), + value: properties[constants.LINGUISTIC_ISOLATION_PROPERTY_PERCENTILE] ? + properties[constants.LINGUISTIC_ISOLATION_PROPERTY_PERCENTILE] : null, + isDisadvagtaged: properties[constants.IS_GTE_90_LINGUISITIC_ISO_AND_IS_LOW_INCOME] ? + properties[constants.IS_GTE_90_LINGUISITIC_ISO_AND_IS_LOW_INCOME] : null, + }; + const unemploy:indicatorInfo = { + label: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATORS.UNEMPLOY), + description: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.UNEMPLOY), + value: properties[constants.UNEMPLOYMENT_PROPERTY_PERCENTILE] ? + properties[constants.UNEMPLOYMENT_PROPERTY_PERCENTILE] : null, + isDisadvagtaged: properties[constants.IS_GTE_90_UNEMPLOYMENT_AND_LOW_HIGH_SCHOOL_EDU] ? + properties[constants.IS_GTE_90_UNEMPLOYMENT_AND_LOW_HIGH_SCHOOL_EDU] : null, + }; + const poverty:indicatorInfo = { + label: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATORS.POVERTY), + description: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.POVERTY), + value: properties[constants.POVERTY_PROPERTY_PERCENTILE] ? + properties[constants.POVERTY_PROPERTY_PERCENTILE] : null, + isDisadvagtaged: properties[constants.IS_GTE_90_BELOW_100_POVERTY_AND_LOW_HIGH_SCHOOL_EDU] ? + properties[constants.IS_GTE_90_BELOW_100_POVERTY_AND_LOW_HIGH_SCHOOL_EDU] : null, + }; + const highSchool:indicatorInfo = { + label: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATORS.HIGH_SCL), + description: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.HIGH_SKL), + value: properties[constants.HIGH_SCHOOL_PROPERTY_PERCENTILE] ? + properties[constants.HIGH_SCHOOL_PROPERTY_PERCENTILE] : null, + isDisadvagtaged: properties[constants.IS_LOW_HS_EDUCATION_LOW_HIGHER_ED_PRIORITIZED] && + properties[constants.IS_LOW_HS_EDUCATION_LOW_HIGHER_ED_PRIORITIZED] == 1 ? + true : false, + isPercent: true, + }; + + // Aggregate indicators based on categories + const categories = [ + { + id: 'climate-change', + titleText: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_CATEGORY.CLIMATE), + indicators: [expAgLoss, expBldLoss, expPopLoss, lowInc], + isDisadvagtaged: properties[constants.IS_CLIMATE_FACTOR_DISADVANTAGED_M] ? + properties[constants.IS_CLIMATE_FACTOR_DISADVANTAGED_M] : null, + }, + { + id: 'clean-energy', + titleText: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_CATEGORY.CLEAN_ENERGY), + indicators: [energyBurden, pm25, lowInc], + isDisadvagtaged: properties[constants.IS_ENERGY_FACTOR_DISADVANTAGED_M] ? + properties[constants.IS_ENERGY_FACTOR_DISADVANTAGED_M] : null, + }, + { + id: 'clean-transport', + titleText: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_CATEGORY.CLEAN_TRANSPORT), + indicators: [dieselPartMatter, trafficVolume, lowInc], + isDisadvagtaged: properties[constants.IS_TRANSPORT_FACTOR_DISADVANTAGED_M] ? + properties[constants.IS_TRANSPORT_FACTOR_DISADVANTAGED_M] : null, + }, + { + id: 'sustain-house', + titleText: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_CATEGORY.SUSTAIN_HOUSE), + indicators: [houseBurden, leadPaint, lowInc], + isDisadvagtaged: properties[constants.IS_HOUSING_FACTOR_DISADVANTAGED_M] ? + properties[constants.IS_HOUSING_FACTOR_DISADVANTAGED_M] : null, + }, + { + id: 'leg-pollute', + titleText: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_CATEGORY.LEG_POLLUTE), + indicators: [proxHaz, proxNPL, proxRMP, lowInc], + isDisadvagtaged: properties[constants.IS_POLLUTION_FACTOR_DISADVANTAGED_M] ? + properties[constants.IS_POLLUTION_FACTOR_DISADVANTAGED_M] : null, + }, + { + id: 'clean-water', + titleText: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_CATEGORY.CLEAN_WATER), + indicators: [wasteWater, lowInc], + isDisadvagtaged: properties[constants.IS_WATER_FACTOR_DISADVANTAGED_M] ? + properties[constants.IS_WATER_FACTOR_DISADVANTAGED_M] : null, + }, + { + id: 'health-burdens', + titleText: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_CATEGORY.HEALTH_BURDEN), + indicators: [asthma, diabetes, heartDisease, lifeExpect, lowInc], + isDisadvagtaged: properties[constants.IS_HEALTH_FACTOR_DISADVANTAGED_M] ? + properties[constants.IS_HEALTH_FACTOR_DISADVANTAGED_M] : null, + }, + { + id: 'work-dev', + titleText: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_CATEGORY.WORK_DEV), + indicators: [lowMedInc, lingIso, unemploy, poverty, highSchool], + isDisadvagtaged: properties[constants.IS_WORKFORCE_FACTOR_DISADVANTAGED_M] ? + properties[constants.IS_WORKFORCE_FACTOR_DISADVANTAGED_M] : null, + }, + ]; + + // Create the AccoridionItems by mapping over the categories array. In this array we define the + // various indicators for a specific category. This is an array which then maps over the + // component to render the actual Indicator + const categoryItems = categories.map((category) => ({ + id: category.id, + title: , + content: ( + <> + {/* Category Header */} +
+
{intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_CATEGORY.INDICATOR)}
+
{intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_CATEGORY.PERCENTILE)}
+
+ + {/* Category Indicators */} + {category.indicators.map((indicator:any, index:number) => { + return ; + })} + + ), + expanded: false, + })); + + return ( + + ); +}; + +export default AreaDetail; diff --git a/client/src/components/AreaDetail/index.tsx b/client/src/components/AreaDetail/index.tsx index 480af0be..6e264b24 100644 --- a/client/src/components/AreaDetail/index.tsx +++ b/client/src/components/AreaDetail/index.tsx @@ -1,442 +1,3 @@ -/* eslint-disable quotes */ -// External Libs: -import React from 'react'; -import {useIntl, FormattedMessage} from 'gatsby-plugin-intl'; -import {Accordion, Button} from '@trussworks/react-uswds'; - -// Components: -import Category from '../Category'; -import DisadvantageDot from '../DisadvantageDot'; -import Indicator from '../Indicator'; - -// Styles and constants -import * as styles from './areaDetail.module.scss'; -import * as constants from '../../data/constants'; -import * as EXPLORE_COPY from '../../data/copy/explore'; -import * as CONTACT_COPY from '../../data/copy/contact'; -// @ts-ignore -// import mailIcon from '/node_modules/uswds/dist/img/usa-icons/mail.svg'; - -interface IAreaDetailProps { - properties: constants.J40Properties, -} - -/** - * This interface is used as define the various fields for each indicator in the side panel - * label: the indicator label or title - * description: the description of the indicator used in the side panel - * value: the number from the geoJSON tile - * isDisadvagtaged: the flag from the geoJSON tile - * isPercent: is the value a percent or percentile - * */ -export interface indicatorInfo { - label: string, - description: string, - value: number, - isDisadvagtaged: boolean, - isPercent?: boolean, -} - -const AreaDetail = ({properties}:IAreaDetailProps) => { - const intl = useIntl(); - - // console.log the properties of the census that is selected: - console.log("Area Detail properies: ", properties); - - const score = properties[constants.SCORE_PROPERTY_HIGH] ? properties[constants.SCORE_PROPERTY_HIGH] as number : 0; - const blockGroup = properties[constants.GEOID_PROPERTY] ? properties[constants.GEOID_PROPERTY] : "N/A"; - const population = properties[constants.TOTAL_POPULATION] ? properties[constants.TOTAL_POPULATION] : "N/A"; - const countyName = properties[constants.COUNTY_NAME] ? properties[constants.COUNTY_NAME] : "N/A"; - const stateName = properties[constants.STATE_NAME] ? properties[constants.STATE_NAME] : "N/A"; - - const isCommunityFocus = score >= constants.SCORE_BOUNDARY_THRESHOLD; - - const feedbackEmailSubject = `Census tract ID ${blockGroup}, ${countyName}, ${stateName}`; - const feedbackEmailBody = intl.formatMessage(EXPLORE_COPY.SEND_FEEDBACK.EMAIL_BODY); - - - // Define each indicator in the side panel with constants from copy file (for intl) - // Indicators are grouped by category - 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), - value: properties[constants.EXP_AGRICULTURE_LOSS_PERCENTILE] ? - properties[constants.EXP_AGRICULTURE_LOSS_PERCENTILE] : null, - isDisadvagtaged: properties[constants.IS_GTE_90_EXP_AGR_LOSS_AND_IS_LOW_INCOME] ? - properties[constants.IS_GTE_90_EXP_AGR_LOSS_AND_IS_LOW_INCOME] : 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), - value: properties[constants.EXP_BUILDING_LOSS_PERCENTILE] ? - properties[constants.EXP_BUILDING_LOSS_PERCENTILE] : null, - isDisadvagtaged: properties[constants.IS_GTE_90_EXP_BLD_LOSS_AND_IS_LOW_INCOME] ? - properties[constants.IS_GTE_90_EXP_BLD_LOSS_AND_IS_LOW_INCOME] : 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), - value: properties[constants.EXP_POPULATION_LOSS_PERCENTILE] ? - properties[constants.EXP_POPULATION_LOSS_PERCENTILE] : null, - isDisadvagtaged: properties[constants.IS_GTE_90_EXP_POP_LOSS_AND_IS_LOW_INCOME] ? - properties[constants.IS_GTE_90_EXP_POP_LOSS_AND_IS_LOW_INCOME] : 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), - value: properties[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, - }; - - const energyBurden:indicatorInfo = { - label: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATORS.ENERGY_BURDEN), - description: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.ENERGY_BURDEN), - value: properties[constants.ENERGY_PERCENTILE] ? - properties[constants.ENERGY_PERCENTILE] : null, - isDisadvagtaged: properties[constants.IS_GTE_90_ENERGY_BURDEN_AND_IS_LOW_INCOME] ? - properties[constants.IS_GTE_90_ENERGY_BURDEN_AND_IS_LOW_INCOME] : 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), - value: properties[constants.PM25_PERCENTILE] ? - properties[constants.PM25_PERCENTILE] : null, - isDisadvagtaged: properties[constants.IS_GTE_90_PM25_AND_IS_LOW_INCOME] ? - properties[constants.IS_GTE_90_PM25_AND_IS_LOW_INCOME] : null, - }; - - const dieselPartMatter:indicatorInfo = { - label: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATORS.DIESEL_PARTICULATE_MATTER), - description: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.DIESEL_PARTICULATE_MATTER), - value: properties[constants.DIESEL_MATTER_PERCENTILE] ? - properties[constants.DIESEL_MATTER_PERCENTILE] : null, - isDisadvagtaged: properties[constants.IS_GTE_90_DIESEL_PM_AND_IS_LOW_INCOME] ? - properties[constants.IS_GTE_90_DIESEL_PM_AND_IS_LOW_INCOME] : null, - }; - const trafficVolume:indicatorInfo = { - label: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATORS.TRAFFIC_VOLUME), - description: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.TRAFFIC_VOLUME), - value: properties[constants.TRAFFIC_PERCENTILE] ? - properties[constants.TRAFFIC_PERCENTILE] : null, - isDisadvagtaged: properties[constants.IS_GTE_90_TRAFFIC_PROX_AND_IS_LOW_INCOME] ? - properties[constants.IS_GTE_90_TRAFFIC_PROX_AND_IS_LOW_INCOME] : null, - }; - - const houseBurden:indicatorInfo = { - label: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATORS.HOUSE_BURDEN), - description: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.HOUSE_BURDEN), - value: properties[constants.HOUSING_BURDEN_PROPERTY_PERCENTILE] ? - properties[constants.HOUSING_BURDEN_PROPERTY_PERCENTILE] : null, - isDisadvagtaged: properties[constants.IS_GTE_90_HOUSE_BURDEN_AND_IS_LOW_INCOME] ? - properties[constants.IS_GTE_90_HOUSE_BURDEN_AND_IS_LOW_INCOME] : 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), - value: properties[constants.LEAD_PAINT_PERCENTILE] ? - properties[constants.LEAD_PAINT_PERCENTILE] : null, - isDisadvagtaged: properties[constants.IS_GTE_90_LEAD_PAINT_AND_MEDIAN_HOME_VAL_AND_IS_LOW_INCOME] ? - properties[constants.IS_GTE_90_LEAD_PAINT_AND_MEDIAN_HOME_VAL_AND_IS_LOW_INCOME] : null, - }; - // const medHomeVal:indicatorInfo = { - // label: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATORS.MED_HOME_VAL), - // description: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.MED_HOME_VAL), - // value: properties[constants.MEDIAN_HOME_VALUE_PERCENTILE] ? - // properties[constants.MEDIAN_HOME_VALUE_PERCENTILE] : null, - // isDisadvagtaged: false, // TODO - // }; - - const proxHaz:indicatorInfo = { - label: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATORS.PROX_HAZ), - description: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.PROX_HAZ), - value: properties[constants.PROXIMITY_TSDF_SITES_PERCENTILE] ? - properties[constants.PROXIMITY_TSDF_SITES_PERCENTILE] : null, - isDisadvagtaged: properties[constants.IS_GTE_90_HAZARD_WASTE_AND_IS_LOW_INCOME] ? - properties[constants.IS_GTE_90_HAZARD_WASTE_AND_IS_LOW_INCOME] : 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), - value: properties[constants.PROXIMITY_NPL_SITES_PERCENTILE] ? - properties[constants.PROXIMITY_NPL_SITES_PERCENTILE] : null, - isDisadvagtaged: properties[constants.IS_GTE_90_SUPERFUND_AND_IS_LOW_INCOME] ? - properties[constants.IS_GTE_90_SUPERFUND_AND_IS_LOW_INCOME] : 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), - value: properties[constants.PROXIMITY_RMP_SITES_PERCENTILE] ? - properties[constants.PROXIMITY_RMP_SITES_PERCENTILE] : null, - isDisadvagtaged: properties[constants.IS_GTE_90_RMP_AND_IS_LOW_INCOME] ? - properties[constants.IS_GTE_90_RMP_AND_IS_LOW_INCOME] : 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), - value: properties[constants.WASTEWATER_PERCENTILE] ? - properties[constants.WASTEWATER_PERCENTILE] : null, - isDisadvagtaged: properties[constants.IS_GTE_90_WASTEWATER_AND_IS_LOW_INCOME] ? - properties[constants.IS_GTE_90_WASTEWATER_AND_IS_LOW_INCOME] : null, - }; - - const asthma:indicatorInfo = { - label: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATORS.ASTHMA), - description: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.ASTHMA), - value: properties[constants.ASTHMA_PERCENTILE] ? - properties[constants.ASTHMA_PERCENTILE] : null, - isDisadvagtaged: properties[constants.IS_GTE_90_ASTHMA_AND_IS_LOW_INCOME] ? - properties[constants.IS_GTE_90_ASTHMA_AND_IS_LOW_INCOME] : null, - }; - const diabetes:indicatorInfo = { - label: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATORS.DIABETES), - description: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.DIABETES), - value: properties[constants.DIABETES_PERCENTILE] ? - properties[constants.DIABETES_PERCENTILE] : null, - isDisadvagtaged: properties[constants.IS_GTE_90_DIABETES_AND_IS_LOW_INCOME] ? - properties[constants.IS_GTE_90_DIABETES_AND_IS_LOW_INCOME] : 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), - value: properties[constants.HEART_PERCENTILE] ? - properties[constants.HEART_PERCENTILE] : null, - isDisadvagtaged: properties[constants.IS_GTE_90_HEART_DISEASE_AND_IS_LOW_INCOME] ? - properties[constants.IS_GTE_90_HEART_DISEASE_AND_IS_LOW_INCOME] : 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), - value: properties[constants.LIFE_PERCENTILE] ? - properties[constants.LIFE_PERCENTILE] : null, - isDisadvagtaged: properties[constants.IS_GTE_90_LOW_LIFE_EXP_AND_IS_LOW_INCOME] ? - properties[constants.IS_GTE_90_LOW_LIFE_EXP_AND_IS_LOW_INCOME] : 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), - value: properties[constants.LOW_MEDIAN_INCOME_PERCENTILE] ? - properties[constants.LOW_MEDIAN_INCOME_PERCENTILE] : null, - isDisadvagtaged: properties[constants.IS_GTE_90_LOW_MEDIAN_INCOME_AND_LOW_HIGH_SCHOOL_EDU] ? - properties[constants.IS_GTE_90_LOW_MEDIAN_INCOME_AND_LOW_HIGH_SCHOOL_EDU] : null, - }; - const lingIso:indicatorInfo = { - label: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATORS.LING_ISO), - description: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.LING_ISO), - value: properties[constants.LINGUISTIC_ISOLATION_PROPERTY_PERCENTILE] ? - properties[constants.LINGUISTIC_ISOLATION_PROPERTY_PERCENTILE] : null, - isDisadvagtaged: properties[constants.IS_GTE_90_LINGUISITIC_ISO_AND_IS_LOW_INCOME] ? - properties[constants.IS_GTE_90_LINGUISITIC_ISO_AND_IS_LOW_INCOME] : null, - }; - const unemploy:indicatorInfo = { - label: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATORS.UNEMPLOY), - description: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.UNEMPLOY), - value: properties[constants.UNEMPLOYMENT_PROPERTY_PERCENTILE] ? - properties[constants.UNEMPLOYMENT_PROPERTY_PERCENTILE] : null, - isDisadvagtaged: properties[constants.IS_GTE_90_UNEMPLOYMENT_AND_LOW_HIGH_SCHOOL_EDU] ? - properties[constants.IS_GTE_90_UNEMPLOYMENT_AND_LOW_HIGH_SCHOOL_EDU] : null, - }; - const poverty:indicatorInfo = { - label: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATORS.POVERTY), - description: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.POVERTY), - value: properties[constants.POVERTY_PROPERTY_PERCENTILE] ? - properties[constants.POVERTY_PROPERTY_PERCENTILE] : null, - isDisadvagtaged: properties[constants.IS_GTE_90_BELOW_100_POVERTY_AND_LOW_HIGH_SCHOOL_EDU] ? - properties[constants.IS_GTE_90_BELOW_100_POVERTY_AND_LOW_HIGH_SCHOOL_EDU] : null, - }; - const highSchool:indicatorInfo = { - label: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATORS.HIGH_SCL), - description: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.HIGH_SKL), - value: properties[constants.HIGH_SCHOOL_PROPERTY_PERCENTILE] ? - properties[constants.HIGH_SCHOOL_PROPERTY_PERCENTILE] : null, - isDisadvagtaged: properties[constants.IS_LOW_HS_EDUCATION_LOW_HIGHER_ED_PRIORITIZED] && - properties[constants.IS_LOW_HS_EDUCATION_LOW_HIGHER_ED_PRIORITIZED] == 1 ? - true : false, - isPercent: true, - }; - - // Aggregate indicators based on categories - const categories = [ - { - id: 'climate-change', - titleText: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_CATEGORY.CLIMATE), - indicators: [expAgLoss, expBldLoss, expPopLoss, lowInc], - isDisadvagtaged: properties[constants.IS_CLIMATE_FACTOR_DISADVANTAGED_M] ? - properties[constants.IS_CLIMATE_FACTOR_DISADVANTAGED_M] : null, - }, - { - id: 'clean-energy', - titleText: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_CATEGORY.CLEAN_ENERGY), - indicators: [energyBurden, pm25, lowInc], - isDisadvagtaged: properties[constants.IS_ENERGY_FACTOR_DISADVANTAGED_M] ? - properties[constants.IS_ENERGY_FACTOR_DISADVANTAGED_M] : null, - }, - { - id: 'clean-transport', - titleText: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_CATEGORY.CLEAN_TRANSPORT), - indicators: [dieselPartMatter, trafficVolume, lowInc], - isDisadvagtaged: properties[constants.IS_TRANSPORT_FACTOR_DISADVANTAGED_M] ? - properties[constants.IS_TRANSPORT_FACTOR_DISADVANTAGED_M] : null, - }, - { - id: 'sustain-house', - titleText: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_CATEGORY.SUSTAIN_HOUSE), - indicators: [houseBurden, leadPaint, lowInc], - isDisadvagtaged: properties[constants.IS_HOUSING_FACTOR_DISADVANTAGED_M] ? - properties[constants.IS_HOUSING_FACTOR_DISADVANTAGED_M] : null, - }, - { - id: 'leg-pollute', - titleText: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_CATEGORY.LEG_POLLUTE), - indicators: [proxHaz, proxNPL, proxRMP, lowInc], - isDisadvagtaged: properties[constants.IS_POLLUTION_FACTOR_DISADVANTAGED_M] ? - properties[constants.IS_POLLUTION_FACTOR_DISADVANTAGED_M] : null, - }, - { - id: 'clean-water', - titleText: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_CATEGORY.CLEAN_WATER), - indicators: [wasteWater, lowInc], - isDisadvagtaged: properties[constants.IS_WATER_FACTOR_DISADVANTAGED_M] ? - properties[constants.IS_WATER_FACTOR_DISADVANTAGED_M] : null, - }, - { - id: 'health-burdens', - titleText: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_CATEGORY.HEALTH_BURDEN), - indicators: [asthma, diabetes, heartDisease, lifeExpect, lowInc], - isDisadvagtaged: properties[constants.IS_HEALTH_FACTOR_DISADVANTAGED_M] ? - properties[constants.IS_HEALTH_FACTOR_DISADVANTAGED_M] : null, - }, - { - id: 'work-dev', - titleText: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_CATEGORY.WORK_DEV), - indicators: [lowMedInc, lingIso, unemploy, poverty, highSchool], - isDisadvagtaged: properties[constants.IS_WORKFORCE_FACTOR_DISADVANTAGED_M] ? - properties[constants.IS_WORKFORCE_FACTOR_DISADVANTAGED_M] : null, - }, - ]; - - // Create the AccoridionItems by mapping over the categories array. In this array we define the - // various indicators for a specific category. This is an array which then maps over the - // component to render the actual Indicator - const categoryItems = categories.map((category) => ({ - id: category.id, - title: , - content: ( - <> - {/* Category Header */} -
-
{intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_CATEGORY.INDICATOR)}
-
{intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_CATEGORY.PERCENTILE)}
-
- - {/* Category Indicators */} - {category.indicators.map((indicator:any, index:number) => { - return ; - })} - - ), - expanded: false, - })); - - return ( - - ); -}; +import AreaDetail from './AreaDetail'; export default AreaDetail; diff --git a/client/src/components/AreaDetail/tests/__snapshots__/areaDetail.test.tsx.snap b/client/src/components/AreaDetail/tests/__snapshots__/areaDetail.test.tsx.snap index bc51b14e..10f2b159 100644 --- a/client/src/components/AreaDetail/tests/__snapshots__/areaDetail.test.tsx.snap +++ b/client/src/components/AreaDetail/tests/__snapshots__/areaDetail.test.tsx.snap @@ -174,7 +174,10 @@ exports[`rendering of the AreaDetail checks if various text fields are visible 1
Low income
- Household income is less than or equal to twice the federal poverty level + + Household income is less than or equal to twice the federal poverty level when higher ed enrollment + rate is less than 20% in order to exclude areas with college and graduate students +
@@ -265,7 +268,10 @@ exports[`rendering of the AreaDetail checks if various text fields are visible 1
Low income
- Household income is less than or equal to twice the federal poverty level + + Household income is less than or equal to twice the federal poverty level when higher ed enrollment + rate is less than 20% in order to exclude areas with college and graduate students +
@@ -356,7 +362,10 @@ exports[`rendering of the AreaDetail checks if various text fields are visible 1
Low income
- Household income is less than or equal to twice the federal poverty level + + Household income is less than or equal to twice the federal poverty level when higher ed enrollment + rate is less than 20% in order to exclude areas with college and graduate students +
@@ -431,7 +440,10 @@ exports[`rendering of the AreaDetail checks if various text fields are visible 1
Lead paint
- Percent of pre-1960 housing with a median home value is at or below 90th + + Percent of pre-1960 housing when median home value is at or below 90th percentile in order to + exclude areas with high value, older homes +
@@ -449,7 +461,10 @@ exports[`rendering of the AreaDetail checks if various text fields are visible 1
Low income
- Household income is less than or equal to twice the federal poverty level + + Household income is less than or equal to twice the federal poverty level when higher ed enrollment + rate is less than 20% in order to exclude areas with college and graduate students +
@@ -558,7 +573,10 @@ exports[`rendering of the AreaDetail checks if various text fields are visible 1
Low income
- Household income is less than or equal to twice the federal poverty level + + Household income is less than or equal to twice the federal poverty level when higher ed enrollment + rate is less than 20% in order to exclude areas with college and graduate students +
@@ -631,7 +649,10 @@ exports[`rendering of the AreaDetail checks if various text fields are visible 1
Low income
- Household income is less than or equal to twice the federal poverty level + + Household income is less than or equal to twice the federal poverty level when higher ed enrollment + rate is less than 20% in order to exclude areas with college and graduate students +
@@ -763,7 +784,10 @@ exports[`rendering of the AreaDetail checks if various text fields are visible 1
Low income
- Household income is less than or equal to twice the federal poverty level + + Household income is less than or equal to twice the federal poverty level when higher ed enrollment + rate is less than 20% in order to exclude areas with college and graduate students +
@@ -837,7 +861,7 @@ exports[`rendering of the AreaDetail checks if various text fields are visible 1 Linguistic isolation
- Percent of limited speaking households, which are households where no one over age 14 speaks English well + Percent of households where no one over the age 14 speaks English well
@@ -902,8 +926,8 @@ exports[`rendering of the AreaDetail checks if various text fields are visible 1 High school degree achievement rate
- Percent (not a percentile) of people ages 25 years or older whose education level is less than a - high school diploma + Percent of people ages 25 years or older whose education level is less than a high school diploma + when higher ed enrollment rate is less than 20% in order to exclude areas with college and graduate students
diff --git a/client/src/components/Categories/__snapshots__/Categories.test.tsx.snap b/client/src/components/Categories/__snapshots__/Categories.test.tsx.snap index 167f5aa7..2ea601ba 100644 --- a/client/src/components/Categories/__snapshots__/Categories.test.tsx.snap +++ b/client/src/components/Categories/__snapshots__/Categories.test.tsx.snap @@ -30,6 +30,15 @@ exports[`rendering of the Categories checks if component renders 1`] = `

+ Communities are + + identified as disadvantaged + + in this category + +

+

+ IF @@ -56,20 +65,27 @@ exports[`rendering of the Categories checks if component renders 1`] = `

+ + AND - is low income - - * - -

-

- - THEN - - the community is disadvantaged. + is at or above 65th percentile for + + low income + + WHEN + + higher ed enrollment rate + + is at or below 20% +

+

@@ -77,6 +93,15 @@ exports[`rendering of the Categories checks if component renders 1`] = `

+ Communities are + + identified as disadvantaged + + in this category + +

+

+ IF @@ -97,20 +122,27 @@ exports[`rendering of the Categories checks if component renders 1`] = `

+ + AND - is low income - - * - -

-

- - THEN - - the community is disadvantaged. + is at or above 65th percentile for + + low income + + WHEN + + higher ed enrollment rate + + is at or below 20% +

+

@@ -118,6 +150,15 @@ exports[`rendering of the Categories checks if component renders 1`] = `

+ Communities are + + identified as disadvantaged + + in this category + +

+

+ IF @@ -138,20 +179,27 @@ exports[`rendering of the Categories checks if component renders 1`] = `

+ + AND - is low income - - * - -

-

- - THEN - - the community is disadvantaged. + is at or above 65th percentile for + + low income + + WHEN + + higher ed enrollment rate + + is at or below 20% +

+

@@ -159,6 +207,15 @@ exports[`rendering of the Categories checks if component renders 1`] = `

+ Communities are + + identified as disadvantaged + + in this category + +

+

+ IF @@ -169,7 +226,7 @@ exports[`rendering of the Categories checks if component renders 1`] = ` > lead paint - AND + WHEN @@ -186,20 +243,27 @@ exports[`rendering of the Categories checks if component renders 1`] = `

+ + AND - is low income - - * - -

-

- - THEN - - the community is disadvantaged. + is at or above 65th percentile for + + low income + + WHEN + + higher ed enrollment rate + + is at or below 20% +

+

@@ -207,6 +271,15 @@ exports[`rendering of the Categories checks if component renders 1`] = `

+ Communities are + + identified as disadvantaged + + in this category + +

+

+ IF @@ -233,20 +306,27 @@ exports[`rendering of the Categories checks if component renders 1`] = `

+ + AND - is low income - - * - -

-

- - THEN - - the community is disadvantaged. + is at or above 65th percentile for + + low income + + WHEN + + higher ed enrollment rate + + is at or below 20% +

+

@@ -254,6 +334,15 @@ exports[`rendering of the Categories checks if component renders 1`] = `

+ Communities are + + identified as disadvantaged + + in this category + +

+

+ IF @@ -268,20 +357,27 @@ exports[`rendering of the Categories checks if component renders 1`] = `

+ + AND - is low income - - * - -

-

- - THEN - - the community is disadvantaged. + is at or above 65th percentile for + + low income + + WHEN + + higher ed enrollment rate + + is at or below 20% +

+

@@ -289,6 +385,15 @@ exports[`rendering of the Categories checks if component renders 1`] = `

+ Communities are + + identified as disadvantaged + + in this category + +

+

+ IF @@ -321,20 +426,27 @@ exports[`rendering of the Categories checks if component renders 1`] = `

+ + AND - is low income - - * - -

-

- - THEN - - the community is disadvantaged. + is at or above 65th percentile for + + low income + + WHEN + + higher ed enrollment rate + + is at or below 20% +

+

@@ -342,6 +454,15 @@ exports[`rendering of the Categories checks if component renders 1`] = `

+ Communities are + + identified as disadvantaged + + in this category + +

+

+ IF @@ -378,25 +499,27 @@ exports[`rendering of the Categories checks if component renders 1`] = `

- + AND - where + where the - the high school degree achievement rates + high school degree achievement rates - for adults 25 years and older is at or less than 90% - -

-

- - THEN - - the community is disadvantaged. + rates for adults 25 years and older is at or less than + 90% WHEN + + higher ed enrollment rate + + is at or below 20% +

+

diff --git a/client/src/components/CategoryCard/CategoryCard.module.scss b/client/src/components/CategoryCard/CategoryCard.module.scss index 5b621474..e93035d8 100644 --- a/client/src/components/CategoryCard/CategoryCard.module.scss +++ b/client/src/components/CategoryCard/CategoryCard.module.scss @@ -13,3 +13,7 @@ @include baseCard; @include u-bg('blue-cool-5'); } + +.idAsDisdvantaged { + font-style: italic; +} \ No newline at end of file diff --git a/client/src/components/CategoryCard/CategoryCard.module.scss.d.ts b/client/src/components/CategoryCard/CategoryCard.module.scss.d.ts index 65f44f6c..841fbc9d 100644 --- a/client/src/components/CategoryCard/CategoryCard.module.scss.d.ts +++ b/client/src/components/CategoryCard/CategoryCard.module.scss.d.ts @@ -1,6 +1,7 @@ declare namespace IndicatorCategoryNamespace { export interface IIndicatorCategoryScss { categoryCard: string; + idAsDisdvantaged: string; } } diff --git a/client/src/components/CategoryCard/CategoryCard.tsx b/client/src/components/CategoryCard/CategoryCard.tsx index aca2ebf6..dbbbc5ec 100644 --- a/client/src/components/CategoryCard/CategoryCard.tsx +++ b/client/src/components/CategoryCard/CategoryCard.tsx @@ -1,7 +1,7 @@ import React from 'react'; +import * as METHODOLOGY_COPY from '../../data/copy/methodology'; import * as styles from './CategoryCard.module.scss'; - interface ICategoryInterface { categoryInfo: { TITLE: JSX.Element, @@ -16,6 +16,9 @@ const CategoryCard = ({categoryInfo}: ICategoryInterface) => {

{categoryInfo.TITLE}

+

+ {METHODOLOGY_COPY.CATEGORY.ID_AS_DISADV_TEXT} +

{categoryInfo.IF}

diff --git a/client/src/components/CategoryCard/__snapshots__/CategoryCard.test.tsx.snap b/client/src/components/CategoryCard/__snapshots__/CategoryCard.test.tsx.snap index dba3718a..b56387b0 100644 --- a/client/src/components/CategoryCard/__snapshots__/CategoryCard.test.tsx.snap +++ b/client/src/components/CategoryCard/__snapshots__/CategoryCard.test.tsx.snap @@ -8,6 +8,15 @@ exports[`rendering of the CategoryCard checks if component renders 1`] = `

+ Communities are + + identified as disadvantaged + + in this category + +

+

+ IF @@ -34,20 +43,27 @@ exports[`rendering of the CategoryCard checks if component renders 1`] = `

+ + AND - is low income - - * - -

-

- - THEN - - the community is disadvantaged. + is at or above 65th percentile for + + low income + + WHEN + + higher ed enrollment rate + + is at or below 20% +

+

`; diff --git a/client/src/components/DatasetCard/tests/__snapshots__/datasetCard.test.tsx.snap b/client/src/components/DatasetCard/tests/__snapshots__/datasetCard.test.tsx.snap index 739e5c1d..86a7776f 100644 --- a/client/src/components/DatasetCard/tests/__snapshots__/datasetCard.test.tsx.snap +++ b/client/src/components/DatasetCard/tests/__snapshots__/datasetCard.test.tsx.snap @@ -19,7 +19,7 @@ exports[`rendering of indicator dataset card checks if component renders 1`] = ` Used in: - All methodologies except for training and workforce development + All categories except for training and workforce development
  • diff --git a/client/src/components/DatasetContainer/tests/__snapshots__/datasetContainer.test.tsx.snap b/client/src/components/DatasetContainer/tests/__snapshots__/datasetContainer.test.tsx.snap index e0ad1bc0..e4fa48fe 100644 --- a/client/src/components/DatasetContainer/tests/__snapshots__/datasetContainer.test.tsx.snap +++ b/client/src/components/DatasetContainer/tests/__snapshots__/datasetContainer.test.tsx.snap @@ -49,7 +49,54 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis Used in: - All methodologies except for training and workforce development + All categories except for training and workforce development +
  • +
  • + + Responsible Party: + + Census +
  • +
  • + + Source: + + + American Community Survey + + from 2015-2019 +
  • +
  • + + Available for: + + All U.S. states and the District of Columbia +
  • + +
    +
    +

    + Higher ed enrollment rate +

    +
    + + Percent of people who are currently enrolled in college or graduate school. + +
    +
      +
    • + + Used in: + + All categories
    • diff --git a/client/src/components/MethodologyFormula/MethodologyFormula.tsx b/client/src/components/MethodologyFormula/MethodologyFormula.tsx index c60f08c4..cd140c75 100644 --- a/client/src/components/MethodologyFormula/MethodologyFormula.tsx +++ b/client/src/components/MethodologyFormula/MethodologyFormula.tsx @@ -1,5 +1,4 @@ import React from 'react'; -import {useIntl} from 'gatsby-plugin-intl'; import * as METHODOLOGY_COPY from '../../data/copy/methodology'; import * as styles from './MethodologyFormula.module.scss'; @@ -9,12 +8,10 @@ import * as styles from './MethodologyFormula.module.scss'; // reserved words. const MethodologyFormula = () => { - const intl = useIntl(); - return (

      - {intl.formatMessage(METHODOLOGY_COPY.PAGE.FORMULA_INTRO)} + {METHODOLOGY_COPY.FORMULA.INTRO}

      @@ -25,9 +22,9 @@ const MethodologyFormula = () => { {METHODOLOGY_COPY.FORMULA.AND}

      -

      + {/*

      {METHODOLOGY_COPY.FORMULA.THEN} -

      +

      */}
      ); }; diff --git a/client/src/components/MethodologyFormula/__snapshots__/MethodologyFormula.test.tsx.snap b/client/src/components/MethodologyFormula/__snapshots__/MethodologyFormula.test.tsx.snap index 17b1f85f..1098ec80 100644 --- a/client/src/components/MethodologyFormula/__snapshots__/MethodologyFormula.test.tsx.snap +++ b/client/src/components/MethodologyFormula/__snapshots__/MethodologyFormula.test.tsx.snap @@ -5,26 +5,30 @@ exports[`rendering of the MethodologyFormula checks if component renders 1`] = `

      - Under the current formula, a census tract will be considered disadvantaged: + Under the current formula, a census tract will be + + identified as disadvantaged + + in one or more categories of criteria:

      + + IF - it is above the threshold for one or more climate or environmental indicator + the tract is above the thresholds for a set of environmental, climate or socioeconomic related indicators +

      + + AND - it is above the threshold for one or more socioeconomic indicator -

      -

      - - THEN - - the community is considered disadvantaged. + the tract is above the thresholds for another set of income or education related indicators +

      diff --git a/client/src/data/copy/explore.tsx b/client/src/data/copy/explore.tsx index 3282e3fb..bb7177a8 100644 --- a/client/src/data/copy/explore.tsx +++ b/client/src/data/copy/explore.tsx @@ -452,7 +452,10 @@ export const SIDE_PANEL_INDICATOR_DESCRIPTION = defineMessages({ }, LOW_INCOME: { id: 'areaDetail.indicator.description.low.income', - defaultMessage: 'Household income is less than or equal to twice the federal poverty level', + defaultMessage: ` + Household income is less than or equal to twice the federal poverty level when higher ed enrollment + rate is less than 20% in order to exclude areas with college and graduate students + `, description: 'Household income is less than or equal to twice the federal poverty level', }, @@ -480,7 +483,10 @@ export const SIDE_PANEL_INDICATOR_DESCRIPTION = defineMessages({ LEAD_PAINT: { id: 'areaDetail.indicator.description.leadPaint', - defaultMessage: 'Percent of pre-1960 housing with a median home value is at or below 90th', + defaultMessage: ` + Percent of pre-1960 housing when median home value is at or below 90th percentile in order to + exclude areas with high value, older homes + `, description: 'Pre-1960 housing', }, MED_HOME_VAL: { @@ -551,7 +557,7 @@ export const SIDE_PANEL_INDICATOR_DESCRIPTION = defineMessages({ LING_ISO: { id: 'areaDetail.indicator.description.ling.iso', defaultMessage: ` - Percent of limited speaking households, which are households where no one over age 14 speaks English well + Percent of households where no one over the age 14 speaks English well `, description: `Households in which no one age 14 and over speaks English only or also speaks a language other than English`, @@ -573,8 +579,8 @@ export const SIDE_PANEL_INDICATOR_DESCRIPTION = defineMessages({ HIGH_SKL: { id: 'areaDetail.indicator.description.high.school', defaultMessage: ` - Percent (not a percentile) of people ages 25 years or older whose education level is less than a - high school diploma + Percent of people ages 25 years or older whose education level is less than a high school diploma + when higher ed enrollment rate is less than 20% in order to exclude areas with college and graduate students `, description: 'Percent of people ages 25 years or older whose education level is less than a high school diploma', }, diff --git a/client/src/data/copy/methodology.tsx b/client/src/data/copy/methodology.tsx index f3b15ba0..4819d7cc 100644 --- a/client/src/data/copy/methodology.tsx +++ b/client/src/data/copy/methodology.tsx @@ -26,13 +26,6 @@ export const PAGE = defineMessages({ `, description: 'methodology page paragraph', }, - FORMULA_INTRO: { - id: 'methodology.page.formula.intro', - defaultMessage: ` - Under the current formula, a census tract will be considered disadvantaged: - `, - description: 'methodology page introducing the formula', - }, CATEGORY_TEXT: { id: 'methodology.page.categories.title', defaultMessage: ` @@ -46,9 +39,21 @@ export const PAGE = defineMessages({ export const FORMULA = { + INTRO: identified as disadvantaged
      , + }} + />, IF: IF, @@ -56,7 +61,9 @@ export const FORMULA = { />, AND: AND, @@ -144,19 +151,59 @@ export const CATEGORY= { defaultMessage={'Categories'} description= {'category heading'} />, + ID_AS_DISADV_TEXT: identified as disadvantaged
      , + }} + />, }; +// Category AND Clause: +export const CATEGORY_AND_CLAUSE = { + LOW_INC_65_WHEN_HIGH_ED_LTE_20: AND, + lowIncome: low income, + highEdEnrollRate: higher ed enrollment rate, + }} + />, + HS_DEG_90_WHEN_HIGH_ED_LTE_20: AND, + highSchoolRate: high school degree achievement rates, + highEdEnrollRate: higher ed enrollment rate, + }} + />, +}; // Indicator Categories copy constants: export const CATEGORIES = { - ALL: { - METHODOLOGY: - , - }, + ALL: , + ALL_EXCEPT_WORKFORCE: , CLIMATE_CHANGE: { METHODOLOGY: expected population loss rate, }} />, - AND: AND, - asterisk: *, - }} - />, - THEN: THEN, - asterisk: *, - }} - />, + AND: CATEGORY_AND_CLAUSE.LOW_INC_65_WHEN_HIGH_ED_LTE_20, + // THEN: THEN, + // asterisk: *, + // }} + // />, }, CLEAN_ENERGY: { METHODOLOGY: PM2.5 in the air, }} />, - AND: AND, - asterisk: *, - }} - />, - THEN: THEN, - asterisk: *, - }} - />, + AND: CATEGORY_AND_CLAUSE.LOW_INC_65_WHEN_HIGH_ED_LTE_20, + // THEN: THEN, + // asterisk: *, + // }} + // />, }, CLEAN_TRANSPORT: { METHODOLOGY: traffic proximity and volume, }} />, - AND: AND, - asterisk: *, - }} - />, - THEN: THEN, - asterisk: *, - }} - />, + AND: CATEGORY_AND_CLAUSE.LOW_INC_65_WHEN_HIGH_ED_LTE_20, + // THEN: THEN, + // asterisk: *, + // }} + // />, }, AFFORDABLE_HOUSING: { METHODOLOGY: housing cost burden, }} />, - AND: AND, - asterisk: *, - }} - />, - THEN: THEN, - asterisk: *, - }} - />, + AND: CATEGORY_AND_CLAUSE.LOW_INC_65_WHEN_HIGH_ED_LTE_20, + // THEN: THEN, + // asterisk: *, + // }} + // />, }, LEGACY_POLLUTION: { METHODOLOGY: proximity to RMP facilities, }} />, - AND: AND, - asterisk: *, - }} - />, - THEN: THEN, - asterisk: *, - }} - />, + AND: CATEGORY_AND_CLAUSE.LOW_INC_65_WHEN_HIGH_ED_LTE_20, + // THEN: THEN, + // asterisk: *, + // }} + // />, }, CLEAN_WATER: { METHODOLOGY: wastewater discharge, }} />, - AND: AND, - asterisk: *, - }} - />, - THEN: THEN, - asterisk: *, - }} - />, + AND: CATEGORY_AND_CLAUSE.LOW_INC_65_WHEN_HIGH_ED_LTE_20, + // THEN: THEN, + // asterisk: *, + // }} + // />, }, HEALTH_BURDENS: { METHODOLOGY: low life expectancy, }} />, - AND: AND, - asterisk: *, - }} - />, - THEN: THEN, - asterisk: *, - }} - />, + AND: CATEGORY_AND_CLAUSE.LOW_INC_65_WHEN_HIGH_ED_LTE_20, + // THEN: THEN, + // asterisk: *, + // }} + // />, }, WORKFORCE_DEV: { METHODOLOGY: poverty, }} />, - AND: AND, - highSchool: the high school degree achievement rates, - }} - />, - THEN: THEN, - asterisk: *, - }} - />, + AND: CATEGORY_AND_CLAUSE.HS_DEG_90_WHEN_HIGH_ED_LTE_20, + // THEN: THEN, + // asterisk: *, + // }} + // />, }, }; @@ -836,7 +817,26 @@ export const INDICATORS = [ `} description= {'description text for low income'} />, - usedIn: CATEGORIES.ALL.METHODOLOGY, + usedIn: CATEGORIES.ALL_EXCEPT_WORKFORCE, + responsibleParty: RESPONSIBLE_PARTIES.CENSUS, + sources: [ + { + source: SOURCE_LINKS.CENSUS_ACS_15_19, + availableFor: AVAILABLE_FOR.ALL_US_DC, + }, + ], + }, + { + domID: 'high-ed-enroll-rate', + indicator: 'Higher ed enrollment rate', + description: , + usedIn: CATEGORIES.ALL, responsibleParty: RESPONSIBLE_PARTIES.CENSUS, sources: [ { diff --git a/client/src/pages/__snapshots__/methodology.test.tsx.snap b/client/src/pages/__snapshots__/methodology.test.tsx.snap index 5d885144..debefa54 100644 --- a/client/src/pages/__snapshots__/methodology.test.tsx.snap +++ b/client/src/pages/__snapshots__/methodology.test.tsx.snap @@ -302,31 +302,33 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis

      - Under the current formula, a census tract will be considered disadvantaged: + Under the current formula, a census tract will be + + identified as disadvantaged + + in one or more categories of criteria:

      + + IF - it is above the threshold for one or more climate or environmental indicator + the tract is above the thresholds for a set of environmental, climate or socioeconomic related indicators +

      + + AND - it is above the threshold for one or more socioeconomic indicator -

      -

      - - THEN - - the community is considered disadvantaged. + the tract is above the thresholds for another set of income or education related indicators +

      -
      +

      Communities will be defined as disadvantaged for the purposes of Justice40 if they meet @@ -384,20 +386,6 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis

    -
    -

    - - * - - Low Income -

    -

    - - At or above 65th percentile for percent of census tract population of households where household - income is at or below 200% of the federal poverty level - -

    -
    @@ -429,6 +417,15 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis

    + Communities are + + identified as disadvantaged + + in this category + +

    +

    + IF @@ -455,20 +452,27 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis

    + + AND - is low income - - * - -

    -

    - - THEN - - the community is disadvantaged. + is at or above 65th percentile for + + low income + + WHEN + + higher ed enrollment rate + + is at or below 20% +

    +

    @@ -476,6 +480,15 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis

    + Communities are + + identified as disadvantaged + + in this category + +

    +

    + IF @@ -496,20 +509,27 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis

    + + AND - is low income - - * - -

    -

    - - THEN - - the community is disadvantaged. + is at or above 65th percentile for + + low income + + WHEN + + higher ed enrollment rate + + is at or below 20% +

    +

    @@ -517,6 +537,15 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis

    + Communities are + + identified as disadvantaged + + in this category + +

    +

    + IF @@ -537,20 +566,27 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis

    + + AND - is low income - - * - -

    -

    - - THEN - - the community is disadvantaged. + is at or above 65th percentile for + + low income + + WHEN + + higher ed enrollment rate + + is at or below 20% +

    +

    @@ -558,6 +594,15 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis

    + Communities are + + identified as disadvantaged + + in this category + +

    +

    + IF @@ -568,7 +613,7 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis > lead paint - AND + WHEN @@ -585,20 +630,27 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis

    + + AND - is low income - - * - -

    -

    - - THEN - - the community is disadvantaged. + is at or above 65th percentile for + + low income + + WHEN + + higher ed enrollment rate + + is at or below 20% +

    +

    @@ -606,6 +658,15 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis

    + Communities are + + identified as disadvantaged + + in this category + +

    +

    + IF @@ -632,20 +693,27 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis

    + + AND - is low income - - * - -

    -

    - - THEN - - the community is disadvantaged. + is at or above 65th percentile for + + low income + + WHEN + + higher ed enrollment rate + + is at or below 20% +

    +

    @@ -653,6 +721,15 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis

    + Communities are + + identified as disadvantaged + + in this category + +

    +

    + IF @@ -667,20 +744,27 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis

    + + AND - is low income - - * - -

    -

    - - THEN - - the community is disadvantaged. + is at or above 65th percentile for + + low income + + WHEN + + higher ed enrollment rate + + is at or below 20% +

    +

    @@ -688,6 +772,15 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis

    + Communities are + + identified as disadvantaged + + in this category + +

    +

    + IF @@ -720,20 +813,27 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis

    + + AND - is low income - - * - -

    -

    - - THEN - - the community is disadvantaged. + is at or above 65th percentile for + + low income + + WHEN + + higher ed enrollment rate + + is at or below 20% +

    +

    @@ -741,6 +841,15 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis

    + Communities are + + identified as disadvantaged + + in this category + +

    +

    + IF @@ -777,25 +886,27 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis

    - + AND - where + where the - the high school degree achievement rates + high school degree achievement rates - for adults 25 years and older is at or less than 90% - -

    -

    - - THEN - - the community is disadvantaged. + rates for adults 25 years and older is at or less than + 90% WHEN + + higher ed enrollment rate + + is at or below 20% +

    +

    Used in: - All methodologies except for training and workforce development + All categories except for training and workforce development + +
  • + + Responsible Party: + + Census +
  • +
  • + + Source: + + + American Community Survey + + from 2015-2019 +
  • +
  • + + Available for: + + All U.S. states and the District of Columbia +
  • + +
    +
    +

    + Higher ed enrollment rate +

    +
    + + Percent of people who are currently enrolled in college or graduate school. + +
    +
      +
    • + + Used in: + + All categories
    • diff --git a/client/src/pages/methodology.tsx b/client/src/pages/methodology.tsx index 26cf8c1d..de91c799 100644 --- a/client/src/pages/methodology.tsx +++ b/client/src/pages/methodology.tsx @@ -8,8 +8,6 @@ import DownloadPacket from '../components/DownloadPacket'; import J40MainGridContainer from '../components/J40MainGridContainer'; import MethodologyFormula from '../components/MethodologyFormula'; import Layout from '../components/layout'; -import LowIncome from '../components/LowIncome'; -// import ScoreStepsList from '../components/scoreStepsList'; import * as METHODOLOGY_COPY from '../data/copy/methodology'; @@ -40,7 +38,7 @@ const IndexPage = ({location}: MethodPageProps) => { {/* Category description */} -
      +

      {intl.formatMessage(METHODOLOGY_COPY.PAGE.CATEGORY_TEXT)}

      @@ -50,7 +48,6 @@ const IndexPage = ({location}: MethodPageProps) => { {/* Second column */} - @@ -58,13 +55,6 @@ const IndexPage = ({location}: MethodPageProps) => { - {/* - - - - - - */} ); }; diff --git a/client/src/styles/global.scss b/client/src/styles/global.scss index 3d186ff8..0159ecfc 100644 --- a/client/src/styles/global.scss +++ b/client/src/styles/global.scss @@ -91,11 +91,6 @@ p.flush { @include u-margin-bottom(5) } -// 56 pixel margin-top -.j40-mt-7 { - @include u-margin-top(7) -} - .j40-footer-ceq-font { @include j40-element('lg', 2, 'bold', 0 ); }