From e48ab86b852dfa42686d96a0de779b9ef546a741 Mon Sep 17 00:00:00 2001 From: Vim <86254807+vim-usds@users.noreply.github.com> Date: Thu, 17 Feb 2022 18:50:30 -0500 Subject: [PATCH] Update copy from CEQ (#1296) * Update copy - updates from CEQ - meth page - side panel pages - low median income - update snapshots * QA udpates --- .../src/components/AreaDetail/AreaDetail.tsx | 26 ++-- .../__snapshots__/areaDetail.test.tsx.snap | 134 ++++++++---------- .../__snapshots__/Categories.test.tsx.snap | 74 +++++----- .../__snapshots__/CategoryCard.test.tsx.snap | 8 +- .../datasetContainer.test.tsx.snap | 35 +++-- .../__snapshots__/howYouCanHelp.test.tsx.snap | 12 +- .../MethodologyFormula.test.tsx.snap | 5 +- client/src/data/constants.tsx | 2 + client/src/data/copy/about.tsx | 2 +- client/src/data/copy/explore.tsx | 52 ++++--- client/src/data/copy/methodology.tsx | 63 ++++---- .../pages/__snapshots__/index.test.tsx.snap | 2 +- .../__snapshots__/methodology.test.tsx.snap | 123 +++++++++------- 13 files changed, 291 insertions(+), 247 deletions(-) diff --git a/client/src/components/AreaDetail/AreaDetail.tsx b/client/src/components/AreaDetail/AreaDetail.tsx index 66da3d3b..e64567b5 100644 --- a/client/src/components/AreaDetail/AreaDetail.tsx +++ b/client/src/components/AreaDetail/AreaDetail.tsx @@ -177,6 +177,14 @@ const AreaDetail = ({properties}:IAreaDetailProps) => { isDisadvagtaged: properties[constants.IS_FEDERAL_POVERTY_LEVEL_200] ? properties[constants.IS_FEDERAL_POVERTY_LEVEL_200] : null, }; + // const higherEd:indicatorInfo = { + // label: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATORS.HIGH_ED), + // description: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.HIGH_ED), + // value: properties[constants.HIGHER_ED_PERCENTILE] ? + // properties[constants.HIGHER_ED_PERCENTILE] : null, + // isDisadvagtaged: properties[constants.IS_HIGHER_ED_PERCENTILE] ? + // properties[constants.IS_HIGHER_ED_PERCENTILE] : null, + // }; const energyBurden:indicatorInfo = { label: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATORS.ENERGY_BURDEN), @@ -303,20 +311,20 @@ const AreaDetail = ({properties}:IAreaDetailProps) => { properties[constants.IS_GTE_90_LOW_LIFE_EXP_AND_IS_LOW_INCOME] : 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 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: getWorkForceIndicatorValue('lowMedInc'), isDisadvagtaged: getWorkForceIndicatorIsDisadv('lowMedInc'), }; - 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), @@ -391,7 +399,7 @@ const AreaDetail = ({properties}:IAreaDetailProps) => { { id: 'work-dev', titleText: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_CATEGORY.WORK_DEV), - indicators: [lowMedInc, lingIso, unemploy, poverty, highSchool], + indicators: [lingIso, lowMedInc, , unemploy, poverty, highSchool], isDisadvagtaged: properties[constants.IS_WORKFORCE_FACTOR_DISADVANTAGED_M] ? properties[constants.IS_WORKFORCE_FACTOR_DISADVANTAGED_M] : null, }, 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 2869414c..259db9d6 100644 --- a/client/src/components/AreaDetail/tests/__snapshots__/areaDetail.test.tsx.snap +++ b/client/src/components/AreaDetail/tests/__snapshots__/areaDetail.test.tsx.snap @@ -159,8 +159,8 @@ exports[`rendering of the AreaDetail checks if indicators for ISLAND AREAS are p Poverty
@@ -70,19 +70,19 @@ exports[`rendering of the Categories checks if component renders 1`] = ` AND - is at or above 65th percentile for + is above 65th percentile for low income - WHEN + AND at or below 20% for higher ed enrollment rate - is at or below 20% +
@@ -97,7 +97,7 @@ exports[`rendering of the Categories checks if component renders 1`] = ` identified as disadvantaged - in this category +@@ -110,9 +110,9 @@ exports[`rendering of the Categories checks if component renders 1`] = ` - energy cost burden + energy burden - score OR + OR @@ -127,19 +127,19 @@ exports[`rendering of the Categories checks if component renders 1`] = ` AND - is at or above 65th percentile for + is above 65th percentile for low income - WHEN + AND at or below 20% for higher ed enrollment rate - is at or below 20% +
@@ -154,7 +154,7 @@ exports[`rendering of the Categories checks if component renders 1`] = ` identified as disadvantaged - in this category +@@ -184,19 +184,19 @@ exports[`rendering of the Categories checks if component renders 1`] = ` AND - is at or above 65th percentile for + is above 65th percentile for low income - WHEN + AND at or below 20% for higher ed enrollment rate - is at or below 20% +
@@ -211,7 +211,7 @@ exports[`rendering of the Categories checks if component renders 1`] = ` identified as disadvantaged - in this category +@@ -226,7 +226,7 @@ exports[`rendering of the Categories checks if component renders 1`] = ` > lead paint - WHEN + AND @@ -248,19 +248,19 @@ exports[`rendering of the Categories checks if component renders 1`] = ` AND - is at or above 65th percentile for + is above 65th percentile for low income - WHEN + AND at or below 20% for higher ed enrollment rate - is at or below 20% +
@@ -275,7 +275,7 @@ exports[`rendering of the Categories checks if component renders 1`] = ` identified as disadvantaged - in this category +@@ -311,19 +311,19 @@ exports[`rendering of the Categories checks if component renders 1`] = ` AND - is at or above 65th percentile for + is above 65th percentile for low income - WHEN + AND at or below 20% for higher ed enrollment rate - is at or below 20% +
@@ -338,7 +338,7 @@ exports[`rendering of the Categories checks if component renders 1`] = ` identified as disadvantaged - in this category +@@ -362,19 +362,19 @@ exports[`rendering of the Categories checks if component renders 1`] = ` AND - is at or above 65th percentile for + is above 65th percentile for low income - WHEN + AND at or below 20% for higher ed enrollment rate - is at or below 20% +
@@ -389,7 +389,7 @@ exports[`rendering of the Categories checks if component renders 1`] = ` identified as disadvantaged - in this category +@@ -431,19 +431,19 @@ exports[`rendering of the Categories checks if component renders 1`] = ` AND - is at or above 65th percentile for + is above 65th percentile for low income - WHEN + AND at or below 20% for higher ed enrollment rate - is at or below 20% +
@@ -458,7 +458,7 @@ exports[`rendering of the Categories checks if component renders 1`] = ` identified as disadvantaged - in this category +@@ -503,20 +503,20 @@ exports[`rendering of the Categories checks if component renders 1`] = ` AND - where the + is at or less than 90% for - high school degree achievement rates + high school degree attainment rate - rates for adults 25 years and older is at or less than - 90% WHEN + for adults 25 years and older AND + at or below 20% for higher ed enrollment rate - is at or below 20% +
diff --git a/client/src/components/CategoryCard/__snapshots__/CategoryCard.test.tsx.snap b/client/src/components/CategoryCard/__snapshots__/CategoryCard.test.tsx.snap index b56387b0..b12f358b 100644 --- a/client/src/components/CategoryCard/__snapshots__/CategoryCard.test.tsx.snap +++ b/client/src/components/CategoryCard/__snapshots__/CategoryCard.test.tsx.snap @@ -12,7 +12,7 @@ exports[`rendering of the CategoryCard checks if component renders 1`] = ` identified as disadvantaged - in this category +@@ -48,19 +48,19 @@ exports[`rendering of the CategoryCard checks if component renders 1`] = ` AND - is at or above 65th percentile for + is above 65th percentile for low income - WHEN + AND at or below 20% for higher ed enrollment rate - is at or below 20% +
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 41c5b95e..e502f53f 100644 --- a/client/src/components/DatasetContainer/tests/__snapshots__/datasetContainer.test.tsx.snap +++ b/client/src/components/DatasetContainer/tests/__snapshots__/datasetContainer.test.tsx.snap @@ -307,7 +307,7 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis id="energy-burden" >+ + Note: + + + Unlike most of the other datasets, high values of this data indicate low burdens. For + percentile calculations of burden, the percentile is calculated in reverse order, so that the + tract with the highest median income relative to area median income (lowest burden on this + measure) is at the 0th percentile, and the tract with the lowest median income relative to + area median income (highest burden on this measure) is at the 100th percentile. Tracts with + the highest number have the lowest median income. + +
+@@ -27,7 +28,7 @@ exports[`rendering of the MethodologyFormula checks if component renders 1`] = ` AND - the tract is above the thresholds for another set of income or education related indicators + the tract is above the thresholds for both socioeconomic indicators
diff --git a/client/src/data/constants.tsx b/client/src/data/constants.tsx index 8fc896f8..e8cfd785 100644 --- a/client/src/data/constants.tsx +++ b/client/src/data/constants.tsx @@ -76,6 +76,7 @@ export const POVERTY_BELOW_200_PERCENTILE = 'P200_PFS'; export const PROXIMITY_NPL_SITES_PERCENTILE = 'NPL_PFS'; export const PROXIMITY_RMP_SITES_PERCENTILE = 'RMP_PFS'; export const PROXIMITY_TSDF_SITES_PERCENTILE = 'TSDF_PFS'; +export const HIGHER_ED_PERCENTILE = 'XXXXX'; export const ISLAND_AREAS_UNEMPLOYMENT_LOW_HS_EDU_PERCENTILE_FIELD= 'IAULHSE_PFS'; export const ISLAND_AREAS_POVERTY_LOW_HS_EDU_PERCENTILE_FIELD= 'IAPLHSE_PFS'; @@ -120,6 +121,7 @@ export const IS_GTE_90_BELOW_100_POVERTY_AND_LOW_HIGH_SCHOOL_EDU = 'PLHSE'; export const IS_GTE_90_LOW_MEDIAN_INCOME_AND_LOW_HIGH_SCHOOL_EDU = 'LMILHSE'; export const IS_GTE_90_UNEMPLOYMENT_AND_LOW_HIGH_SCHOOL_EDU = 'ULHSE'; export const IS_FEDERAL_POVERTY_LEVEL_200 = 'FPL200S'; +export const IS_HIGHER_ED_PERCENTILE = 'XXXXXXX'; export const TOTAL_THRESHOLD_CRITERIA = 'TC'; export const IS_GTE_90_ISLAND_AREA_UNEMPLOYMENT_AND_IS_LOW_HS_EDU_2009 = 'IAULHSE'; export const IS_GTE_90_ISLAND_AREA_BELOW_100_POVERTY_AND_IS_LOW_HS_EDU_2009 = 'IAPLHSE'; diff --git a/client/src/data/copy/about.tsx b/client/src/data/copy/about.tsx index 15b0d8f9..e391493a 100644 --- a/client/src/data/copy/about.tsx +++ b/client/src/data/copy/about.tsx @@ -57,7 +57,7 @@ export const HEADING_1 = { to create a Climate and Economic Justice Screening Tool. The purpose of the tool is to help Federal agencies identify disadvantaged communities that are marginalized, underserved, and overburdened by pollution. The current version of the tool provides socioeconomic, environmental, - and climate information to inform decisions that may affect these communities. The + health and climate information to inform decisions that may affect these communities. The tool identifies disadvantaged communities through publicly-available, nationally-consistent datasets. `} values={{ diff --git a/client/src/data/copy/explore.tsx b/client/src/data/copy/explore.tsx index 6dfc515d..fbb20114 100644 --- a/client/src/data/copy/explore.tsx +++ b/client/src/data/copy/explore.tsx @@ -326,9 +326,14 @@ export const SIDE_PANEL_INDICATORS = defineMessages({ defaultMessage: 'Low income', description: 'low income', }, + HIGH_ED: { + id: 'areaDetail.indicator.high.ed', + defaultMessage: 'Higher ed enrollment rate', + description: 'Higher ed degree achievement rate', + }, ENERGY_BURDEN: { id: 'areaDetail.indicator.energyBurden', - defaultMessage: 'Energy cost burden', + defaultMessage: 'Energy burden', description: 'Average annual energy cost ($) divided by household income', }, PM_2_5: { @@ -428,9 +433,8 @@ export const SIDE_PANEL_INDICATORS = defineMessages({ }, HIGH_SCL: { id: 'areaDetail.indicator.high.school', - defaultMessage: 'High school degree achievement rate', + defaultMessage: 'High school degree attainment rate', description: 'High school degree achievement rate', - }, }); @@ -449,19 +453,24 @@ export const SIDE_PANEL_INDICATOR_DESCRIPTION = defineMessages({ EXP_POP_LOSS: { id: 'areaDetail.indicator.description.exp.pop.loss', defaultMessage: ` - Rate relative to the population in fatalities and injuries resulting from natural hazards each year + Rate of fatalities and injuries resulting from natural hazards each year `, description: 'Economic loss rate to the population in fatalities and injuries resulting from natural hazards', }, LOW_INCOME: { id: 'areaDetail.indicator.description.low.income', 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 + Household income is less than or equal to twice the federal poverty level `, description: 'Household income is less than or equal to twice the federal poverty level', }, - + HIGH_ED: { + id: 'areaDetail.indicator.description.high.ed', + defaultMessage: ` + Percent of population enrolled in college, university, or graduate school + `, + description: 'Percent of people ages 25 years or older whose education level is less than a high school diploma', + }, ENERGY_BURDEN: { id: 'areaDetail.indicator.description.energyBurden', defaultMessage: 'Average annual energy costs divided by household income', @@ -487,7 +496,7 @@ export const SIDE_PANEL_INDICATOR_DESCRIPTION = defineMessages({ LEAD_PAINT: { id: 'areaDetail.indicator.description.leadPaint', defaultMessage: ` - Percent of pre-1960 housing when median home value at or below 90th percentile + Percentile of number of homes built before 1960 that are not among the most expensive `, description: 'Pre-1960 housing', }, @@ -505,18 +514,18 @@ export const SIDE_PANEL_INDICATOR_DESCRIPTION = defineMessages({ PROX_HAZ: { id: 'areaDetail.indicator.description.prox.haz', - defaultMessage: 'Count of hazardous waste facilities within 5 km', - description: 'Count of hazardous waste facilities within 5 km', + defaultMessage: 'Count of hazardous waste facilities within 5 kilometers', + description: 'Count of hazardous waste facilities within 5 kilometers', }, PROX_NPL: { id: 'areaDetail.indicator.description.prox.npl', - defaultMessage: 'Proposed or listed NPL (Superfund) sites within 5 km', - description: 'Proposed or listed NPL (Superfund) sites within 5 km', + defaultMessage: 'Proposed or listed NPL (Superfund) sites within 5 kilometers', + description: 'Proposed or listed NPL (Superfund) sites within 5 kilometers', }, PROX_RMP: { id: 'areaDetail.indicator.description.prox.npl', - defaultMessage: 'Risk Management Plan facilities within 5 km', - description: 'Risk Management Plan facilities within 5 km', + defaultMessage: 'Risk Management Plan facilities within 5 kilometers', + description: 'Risk Management Plan facilities within 5 kilometers', }, WASTE_WATER: { @@ -547,7 +556,7 @@ export const SIDE_PANEL_INDICATOR_DESCRIPTION = defineMessages({ }, LOW_LIFE_EXPECT: { id: 'areaDetail.indicator.description.lifeExpect', - defaultMessage: 'Average number of years of life a person can expect to live', + defaultMessage: 'Average number of years a person can expect to live', description: 'Average number of years of life a person can expect to live', }, @@ -572,8 +581,8 @@ export const SIDE_PANEL_INDICATOR_DESCRIPTION = defineMessages({ POVERTY: { id: 'areaDetail.indicator.description.poverty', defaultMessage: ` - Percent of a tract's population in households where the household income is at or below - 100% of the federal poverty level + Percent of a tract's population in households where the household income is at or below 100% of + the Federal poverty level `, description: `Percent of individuals in households where the household income is at or below 100% of the federal poverty level`, @@ -581,8 +590,7 @@ export const SIDE_PANEL_INDICATOR_DESCRIPTION = defineMessages({ HIGH_SKL: { id: 'areaDetail.indicator.description.high.school', defaultMessage: ` - 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 + Poportion of people ages 25 years or older whose education level is less than a high school diploma `, description: 'Percent of people ages 25 years or older whose education level is less than a high school diploma', }, @@ -593,8 +601,8 @@ export const DOWNLOAD_DRAFT = { id={'download.draft.ptag.1'} description={'Download the current list of communities and datasets used.'} defaultMessage={` - {downloadDraft} of communities and datasets used (ZIP file will contain one .xlsx, - one .csv, and one .pdf, with a size of {downloadFileSize}). Last updated: {dateUpdated}. + {downloadDraft} of communities and datasets used (ZIP file will contain one .xlsx + and one .csv, with a size of {downloadFileSize}). Last updated: {dateUpdated}. `} values={{ downloadDraft: @@ -754,7 +762,7 @@ export const HOW_YOU_CAN_HELP_LIST_ITEMS = { LIST_ITEM_3:@@ -323,7 +325,7 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis AND - the tract is above the thresholds for another set of income or education related indicators + the tract is above the thresholds for both socioeconomic indicators
@@ -349,15 +351,15 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis@@ -457,19 +459,19 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis AND - is at or above 65th percentile for + is above 65th percentile for low income - WHEN + AND at or below 20% for higher ed enrollment rate - is at or below 20% +
@@ -484,7 +486,7 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis identified as disadvantaged - in this category +@@ -497,9 +499,9 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis - energy cost burden + energy burden - score OR + OR @@ -514,19 +516,19 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis AND - is at or above 65th percentile for + is above 65th percentile for low income - WHEN + AND at or below 20% for higher ed enrollment rate - is at or below 20% +
@@ -541,7 +543,7 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis identified as disadvantaged - in this category +@@ -571,19 +573,19 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis AND - is at or above 65th percentile for + is above 65th percentile for low income - WHEN + AND at or below 20% for higher ed enrollment rate - is at or below 20% +
@@ -598,7 +600,7 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis identified as disadvantaged - in this category +@@ -613,7 +615,7 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis > lead paint - WHEN + AND @@ -635,19 +637,19 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis AND - is at or above 65th percentile for + is above 65th percentile for low income - WHEN + AND at or below 20% for higher ed enrollment rate - is at or below 20% +
@@ -662,7 +664,7 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis identified as disadvantaged - in this category +@@ -698,19 +700,19 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis AND - is at or above 65th percentile for + is above 65th percentile for low income - WHEN + AND at or below 20% for higher ed enrollment rate - is at or below 20% +
@@ -725,7 +727,7 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis identified as disadvantaged - in this category +@@ -749,19 +751,19 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis AND - is at or above 65th percentile for + is above 65th percentile for low income - WHEN + AND at or below 20% for higher ed enrollment rate - is at or below 20% +
@@ -776,7 +778,7 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis identified as disadvantaged - in this category +@@ -818,19 +820,19 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis AND - is at or above 65th percentile for + is above 65th percentile for low income - WHEN + AND at or below 20% for higher ed enrollment rate - is at or below 20% +
@@ -845,7 +847,7 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis identified as disadvantaged - in this category +@@ -890,20 +892,20 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis AND - where the + is at or less than 90% for - high school degree achievement rates + high school degree attainment rate - rates for adults 25 years and older is at or less than - 90% WHEN + for adults 25 years and older AND + at or below 20% for higher ed enrollment rate - is at or below 20% +
@@ -1214,7 +1216,7 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis id="energy-burden" >+ + Note: + + + Unlike most of the other datasets, high values of this data indicate low burdens. For + percentile calculations of burden, the percentile is calculated in reverse order, so that the + tract with the highest median income relative to area median income (lowest burden on this + measure) is at the 0th percentile, and the tract with the lowest median income relative to + area median income (highest burden on this measure) is at the 100th percentile. Tracts with + the highest number have the lowest median income. + +
+