Update version number on frontend (#730)

* Update version number on frontend

- add verion to download packet
- add verison to side panel
- update snaphots
- add version to constant file

* Add minor UI changes from QA

- adjust copy in download package
- update tests

* Refactor all intl code and will add page tests

- remove all copy app wide and place into respective data/copy folder
- adds tests for each page
- allow product to make copy changes in one place
- prepare for spanish language effort
This commit is contained in:
Vim 2021-09-22 23:56:23 -07:00 committed by GitHub
commit 53c2d98eaa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
41 changed files with 3992 additions and 1050 deletions

View file

@ -6,12 +6,13 @@ import LinkTypeWrapper from '../LinkTypeWrapper';
interface AboutCardProps {
imgSrc: string;
header: string;
size?: 'small' | 'large';
size: 'small' | 'large';
linkText?: string;
url?: string;
openUrlNewTab?: boolean;
className?: string;
internal?:boolean;
// body:string | React.ReactNode;
}
const AboutCard = (props: React.PropsWithChildren<AboutCardProps>) => {
@ -30,7 +31,7 @@ const AboutCard = (props: React.PropsWithChildren<AboutCardProps>) => {
<Grid tablet={{col: 9}}>
<Grid row>
<h2 data-cy={'about-screen-tool-heading'}>{props.header} </h2>
<h2 data-cy={'about-screen-tool-heading'}>{props.header}</h2>
{props.children}
</Grid>
</Grid>
@ -54,7 +55,7 @@ const AboutCard = (props: React.PropsWithChildren<AboutCardProps>) => {
<Grid tablet={{col: 9}}>
<Grid row>
<h3>{props.header}</h3>
<p>{props.children}</p>
{props.children}
<div className={'j40-aboutcard-sm-link'}>
<LinkTypeWrapper
linkText={props.linkText}

View file

@ -31,9 +31,7 @@ exports[`rendering of the AboutCard checks if component renders 1`] = `
<h3>
Test Header
</h3>
<p>
Content body of the action card.
</p>
<div
class="j40-aboutcard-sm-link"
>

View file

@ -3,64 +3,34 @@ import {Alert} from '@trussworks/react-uswds';
import {useIntl} from 'gatsby-plugin-intl';
import * as styles from './alertWrapper.module.scss';
import {defineMessages} from 'react-intl';
import * as COMMON_COPY from '../../data/copy/common';
interface IAlertWrapperProps {
showBetaAlert?: boolean, // defaults to true
showBetaAlert?: boolean, // defaults to false
showLimitedDataAlert?: boolean, // defaults to false
}
// use like this:
// <AlertWrapper showBetaAlert={true} showLimitedDataAlert={true}/>
// <AlertWrapper showBetaAlert={true}/>
const AlertWrapper = ({
showBetaAlert = false,
showLimitedDataAlert = false,
}: IAlertWrapperProps) => {
const intl = useIntl();
const messages = defineMessages({
alertBetaTitle: {
id: 'alert.alertBetaTitle',
defaultMessage:
'Public beta',
description: 'Title for an alert inform users that datasets may change',
},
alertBetaBody: {
id: 'alert.alertBetaBody',
defaultMessage:
'This website may be continuously updated',
description: 'Body for an alert inform users that datasets may change',
},
alertDataLimitedTitle: {
id: 'alert.alertDataLimitedTitle',
defaultMessage:
'Limited data sources',
description: 'Title for an alert inform users that datasets may change',
},
alertDataLimitedBody: {
id: 'alert.alertDataLimitedBody',
defaultMessage:
'Datasets may be added, updated, or removed.',
description: 'Body for an alert inform users that datasets may change',
},
});
return (
<div className={styles.alertWrapper}>
{showBetaAlert && (
<Alert className={'j40-sitealert'} type="info">
<span className={'j40-sitealert-title'}>{intl.formatMessage(messages.alertBetaTitle)}</span>
<span className={'j40-sitealert-body'}> {intl.formatMessage(messages.alertBetaBody)}</span>
<span className={'j40-sitealert-title'}>{intl.formatMessage(COMMON_COPY.ALERTS.BETA_TITLE)}</span>
<span className={'j40-sitealert-body'}> {intl.formatMessage(COMMON_COPY.ALERTS.BETA_BODY)}</span>
<br/>
</Alert>
)}
{showLimitedDataAlert && (
<Alert className={'j40-sitealert'} type="warning">
<span className={'j40-sitealert-title'}>{intl.formatMessage(messages.alertDataLimitedTitle)}</span>
<span className={'j40-sitealert-body'}> {intl.formatMessage(messages.alertDataLimitedBody)}</span>
<span className={'j40-sitealert-title'}>{intl.formatMessage(COMMON_COPY.ALERTS.LIMITED_TITLE)}</span>
<span className={'j40-sitealert-body'}> {intl.formatMessage(COMMON_COPY.ALERTS.LIMITED_BODY)}</span>
<br/>
</Alert>
)}

View file

@ -2,7 +2,6 @@
// External Libs:
import * as React from 'react';
import {useIntl} from 'gatsby-plugin-intl';
import {defineMessages} from 'react-intl';
// Components:
// import {Accordion} from '@trussworks/react-uswds';
@ -10,6 +9,8 @@ import {defineMessages} from 'react-intl';
// 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 METHODOLOGY_COPY from '../../data/copy/methodology';
export const readablePercentile = (percentile: number) => {
return Math.round(percentile * 100);
@ -37,13 +38,13 @@ export const getCategorization = (percentile: number) => {
let categoryCircleStyle;
if (percentile >= constants.SCORE_BOUNDARY_PRIORITIZED ) {
categorization = 'Community of focus';
categorization = EXPLORE_COPY.COMMUNITY.OF_FOCUS;
categoryCircleStyle = styles.prioritized;
} else if (constants.SCORE_BOUNDARY_THRESHOLD <= percentile && percentile < constants.SCORE_BOUNDARY_PRIORITIZED) {
categorization = 'Not a community of focus';
categorization = EXPLORE_COPY.COMMUNITY.NOT_OF_FOCUS;
categoryCircleStyle = styles.threshold;
} else {
categorization = 'Not a community of focus';
categorization = EXPLORE_COPY.COMMUNITY.NOT_OF_FOCUS;
categoryCircleStyle = styles.nonPrioritized;
}
return [categorization, categoryCircleStyle];
@ -55,140 +56,6 @@ interface IAreaDetailProps {
const AreaDetail = ({properties}:IAreaDetailProps) => {
const intl = useIntl();
const messages = defineMessages({
percentile: {
id: 'areaDetail.priorityInfo.percentile',
defaultMessage: 'percentile',
description: 'the percentil of the feature selected',
},
categorization: {
id: 'areaDetail.priorityInfo.categorization',
defaultMessage: 'Categorization',
description: 'the categorization of prioritized, threshold or non-prioritized',
},
censusBlockGroup: {
id: 'areaDetail.geographicInfo.censusBlockGroup',
defaultMessage: 'Census block group:',
description: 'the census block group id number of the feature selected',
},
county: {
id: 'areaDetail.geographicInfo.county',
defaultMessage: 'County:',
description: 'the county of the feature selected',
},
state: {
id: 'areaDetail.geographicInfo.state',
defaultMessage: 'State: ',
description: 'the state of the feature selected',
},
population: {
id: 'areaDetail.geographicInfo.population',
defaultMessage: 'Population:',
description: 'the population of the feature selected',
},
indicatorColumnHeader: {
id: 'areaDetail.indicators.indicatorColumnHeader',
defaultMessage: 'Indicator',
description: 'the population of the feature selected',
},
percentileColumnHeader: {
id: 'areaDetail.indicators.percentileColumnHeader',
defaultMessage: 'Percentile (0-100)',
description: 'the population of the feature selected',
},
poverty: {
id: 'areaDetail.indicator.poverty',
defaultMessage: 'Poverty',
description: 'Household income is less than or equal to twice the federal "poverty level"',
},
areaMedianIncome: {
id: 'areaDetail.indicator.areaMedianIncome',
defaultMessage: 'Area Median Income',
description: 'calculated as percent of the area median income',
},
education: {
id: 'areaDetail.indicator.education',
defaultMessage: 'Education, less than high school',
description: 'Percent of people age 25 or older that didnt get a high school diploma',
},
linguisticIsolation: {
id: 'areaDetail.indicator.linguisticIsolation',
defaultMessage: 'Linguistic isolation',
description: 'Households in which all members speak a non-English language and ' +
'speak English less than "very well"',
},
unemployment: {
id: 'areaDetail.indicator.unemployment',
defaultMessage: 'Unemployment rate',
description: 'Number of unemployed people as a percentage of the labor force',
},
asthma: {
id: 'areaDetail.indicator.asthma',
defaultMessage: 'Asthma',
description: 'have asthma or been diagnosed by a doctor to have asthma',
},
diabetes: {
id: 'areaDetail.indicator.diabetes',
defaultMessage: 'Diabetes',
description: 'diabetes from dr or nurse',
},
dieselPartMatter: {
id: 'areaDetail.indicator.dieselPartMatter',
defaultMessage: 'Diesel particulate matter',
description: 'Diesel particulate matter level in air',
},
energyBurden: {
id: 'areaDetail.indicator.energyBurden',
defaultMessage: 'Energy burden',
description: 'Average annual energy cost ($) divided by household income',
},
femaRisk: {
id: 'areaDetail.indicator.femaRisk',
defaultMessage: 'FEMA Risk Index',
description: 'Risk based on 18 natural hazard types, in addition to a'+
"community's social vulnerability and community resilience",
},
heartDisease: {
id: 'areaDetail.indicator.heartDisease',
defaultMessage: 'Heart disease',
description: 'People ages 18 and up who report ever having been told by a' +
'doctor, nurse, or other health professionals that they had angina or coronary heart disease',
},
houseBurden: {
id: 'areaDetail.indicator.houseBurden',
defaultMessage: 'Housing cost burden',
description: 'People ages 18 and up who report having been told by a doctor,' +
' nurse, or other health professionals that they have diabetes other than diabetes during pregnancy',
},
leadPaint: {
id: 'areaDetail.indicator.leadPaint',
defaultMessage: 'Lead paint',
description: 'Housing units built pre-1960, used as an indicator of potential'+
' lead paint exposure in homes',
},
lifeExpect: {
id: 'areaDetail.indicator.lifeExpect',
defaultMessage: 'Life expectancy',
description: 'Estimated years of life expectancy',
},
pm25: {
id: 'areaDetail.indicator.pm25',
defaultMessage: 'PM2.5',
description: 'Fine inhalable particles, with diameters that are generally 2.5 micrometers and smaller',
},
trafficVolume: {
id: 'areaDetail.indicator.trafficVolume',
defaultMessage: 'Traffic proximity and volume',
description: 'Count of vehicles (average annual daily traffic) at major roads within 500 meters,' +
' divided by distance in meters',
},
wasteWater: {
id: 'areaDetail.indicator.wasteWater',
defaultMessage: 'Wastewater discharge',
description: 'Toxic concentrations at stream segments within 500 meters divided by distance in' +
' kilometers',
},
});
const score = properties[constants.SCORE_PROPERTY_HIGH] as number;
const blockGroup = properties[constants.GEOID_PROPERTY];
@ -204,99 +71,78 @@ const AreaDetail = ({properties}:IAreaDetailProps) => {
// Todo: Ticket #367 will be replacing descriptions with YAML file
const areaMedianIncome:indicatorInfo = {
label: intl.formatMessage(messages.areaMedianIncome),
description: 'Median income of the census block group calculated as a percent of the metropolitan'+
" areas or state's median income",
label: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATORS.AREA_MEDIAN_INCOME),
description: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.AREA_MEDIAN_INCOME),
value: properties[constants.POVERTY_PROPERTY_PERCENTILE],
};
const eduInfo:indicatorInfo = {
label: intl.formatMessage(messages.education),
description: 'Percent of people age 25 or older that didnt get a high school diploma',
label: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATORS.EDUCATION),
description: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.EDUCATION),
value: properties[constants.EDUCATION_PROPERTY_PERCENTILE],
};
const poverty:indicatorInfo = {
label: intl.formatMessage(messages.poverty),
description: "Percent of a block group's population in households where the household income" +
' is at or below 100% of the federal poverty level',
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],
};
// const linIsoInfo:indicatorInfo = {
// label: intl.formatMessage(messages.linguisticIsolation),
// eslint-disable-next-line max-len
// description: 'Households in which all members speak a non-English language and speak English less than "very well"',
// value: properties[constants.LINGUISTIC_ISOLATION_PROPERTY_PERCENTILE],
// };
// const umemployInfo:indicatorInfo = {
// label: intl.formatMessage(messages.unemployment),
// description: 'Number of unemployed people as a percentage of the labor force',
// value: properties[constants.UNEMPLOYMENT_PROPERTY_PERCENTILE],
// };
const asthma:indicatorInfo = {
label: intl.formatMessage(messages.asthma),
description: 'People who answer “yes” to both of the questions: “Have you ever been told by' +
' a doctor nurse, or other health professional that you have asthma?” and “Do you still have asthma?"',
label: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATORS.ASTHMA),
description: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.ASTHMA),
value: properties[constants.ASTHMA_PERCENTILE],
};
const diabetes:indicatorInfo = {
label: intl.formatMessage(messages.diabetes),
description: 'People ages 18 and up who report having been told by a doctor, nurse, or other' +
' health professionals that they have diabetes other than diabetes during pregnancy',
label: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATORS.DIABETES),
description: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.DIABETES),
value: properties[constants.DIABETES_PERCENTILE],
};
const dieselPartMatter:indicatorInfo = {
label: intl.formatMessage(messages.dieselPartMatter),
description: 'Mixture of particles that is part of diesel exhaust in the air',
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],
};
const lifeExpect:indicatorInfo = {
label: intl.formatMessage(messages.lifeExpect),
description: 'Estimated years of life expectancy',
label: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATORS.LIFE_EXPECT),
description: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.LIFE_EXPECT),
value: properties[constants.LIFE_PERCENTILE],
};
const energyBurden:indicatorInfo = {
label: intl.formatMessage(messages.energyBurden),
description: 'Average annual energy cost ($) divided by household income',
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],
};
const pm25:indicatorInfo = {
label: intl.formatMessage(messages.pm25),
description: 'Fine inhalable particles, with diameters that are generally 2.5 micrometers and smaller',
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],
};
const leadPaint:indicatorInfo = {
label: intl.formatMessage(messages.leadPaint),
description: 'Housing units built pre-1960, used as an indicator of potential'+
' lead paint exposure in homes',
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],
};
const trafficVolume:indicatorInfo = {
label: intl.formatMessage(messages.trafficVolume),
description: 'Count of vehicles (average annual daily traffic) at major roads within 500 meters,' +
' divided by distance in meters',
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],
};
const wasteWater:indicatorInfo = {
label: intl.formatMessage(messages.wasteWater),
description: 'Toxic concentrations at stream segments within 500 meters divided by distance in' +
' kilometers',
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],
};
const femaRisk:indicatorInfo = {
label: intl.formatMessage(messages.femaRisk),
description: 'Expected Annual Loss Score, which is the average economic loss in dollars' +
' resulting from natural hazards each year.',
label: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATORS.FEMA_RISK),
description: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATOR_DESCRIPTION.FEMA_RISK),
value: properties[constants.FEMA_PERCENTILE],
};
const heartDisease:indicatorInfo = {
label: intl.formatMessage(messages.heartDisease),
description: 'People ages 18 and up who report ever having been told by a' +
' doctor, nurse, or other health professionals that they had angina or coronary heart disease',
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],
};
const houseBurden:indicatorInfo = {
label: intl.formatMessage(messages.houseBurden),
description: 'Households that are low income and spend more than 30% of their income on' +
' housing costs',
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],
};
@ -313,19 +159,27 @@ const AreaDetail = ({properties}:IAreaDetailProps) => {
<aside className={styles.areaDetailContainer} data-cy={'aside'}>
<ul className={styles.censusRow}>
<li>
<span className={styles.censusLabel}>{intl.formatMessage(messages.censusBlockGroup)} </span>
<span className={styles.censusLabel}>
{intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_CBG_INFO.CENSUS_BLOCK_GROUP)}
</span>
<span className={styles.censusText}>{blockGroup}</span>
</li>
<li>
<span className={styles.censusLabel}>{intl.formatMessage(messages.county)} </span>
<span className={styles.censusLabel}>
{intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_CBG_INFO.COUNTY)}
</span>
<span className={styles.censusText}>{countyName}</span>
</li>
<li>
<span className={styles.censusLabel}>{intl.formatMessage(messages.state)}</span>
<span className={styles.censusLabel}>
{intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_CBG_INFO.STATE)}
</span>
<span className={styles.censusText}>{stateName}</span>
</li>
<li>
<span className={styles.censusLabel}>{intl.formatMessage(messages.population)} </span>
<span className={styles.censusLabel}>
{intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_CBG_INFO.POPULATION)}
</span>
<span className={styles.censusText}>{population.toLocaleString()}</span>
</li>
</ul>
@ -334,10 +188,15 @@ const AreaDetail = ({properties}:IAreaDetailProps) => {
<div className={categoryCircleStyle} />
<h3>{categorization}</h3>
</div>
<p className={"secondary"}>version {METHODOLOGY_COPY.VERSION_NUMBER}</p>
</div>
<div className={styles.divider}>
<h6>{intl.formatMessage(messages.indicatorColumnHeader)}</h6>
<h6>{intl.formatMessage(messages.percentileColumnHeader)}</h6>
<h6>
{intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATORS.INDICATOR_COLUMN_HEADER)}
</h6>
<h6>
{intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INDICATORS.PERCENTILE_COLUMN_HEADER)}
</h6>
</div>
<>

View file

@ -42,6 +42,11 @@ exports[`rendering of the AreaDetail checks if various text fields are visible 1
Community of focus
</h3>
</div>
<p
class="secondary"
>
version 0.1
</p>
</div>
<div>
<h6>

View file

@ -2,7 +2,9 @@ import * as React from 'react';
import {render} from '@testing-library/react';
import AreaDetail, {getCategorization, readablePercentile} from '..';
import {LocalizedComponent} from '../../../test/testHelpers';
import * as constants from '../../../data/constants';
import * as EXPLORE_COPY from '../../../data/copy/explore';
describe('rendering of the AreaDetail', () => {
const properties = {
@ -37,14 +39,14 @@ describe('tests the readablePercentile function', () => {
describe('tests the getCategorization function', () => {
it(`should equal Community of focus for value >= ${constants.SCORE_BOUNDARY_LOW}`, () => {
expect(getCategorization(.756)).toEqual(['Community of focus', undefined]);
expect(getCategorization(.756)).toEqual([EXPLORE_COPY.COMMUNITY.OF_FOCUS, undefined]);
});
it(`should equal Threshold for .60 <= value < ${constants.SCORE_BOUNDARY_THRESHOLD}`, () => {
expect(getCategorization(.65)).toEqual(['Not a community of focus', undefined]);
expect(getCategorization(.65)).toEqual([EXPLORE_COPY.COMMUNITY.NOT_OF_FOCUS, undefined]);
});
it(`should equal Non-prioritized for value < ${constants.SCORE_BOUNDARY_PRIORITIZED}`, () => {
expect(getCategorization(.53)).toEqual(['Not a community of focus', undefined]);
expect(getCategorization(.53)).toEqual([EXPLORE_COPY.COMMUNITY.NOT_OF_FOCUS, undefined]);
});
});

View file

@ -1,7 +1,8 @@
import React from 'react';
import {useIntl} from 'gatsby-plugin-intl';
import {defineMessages} from 'react-intl';
import * as styles from './datasetCard.module.scss';
import * as METHODOLOGY_COPY from '../../data/copy/methodology';
interface IDatasetCardProps {
datasetCardProps: { [key:string]: string }
@ -10,23 +11,6 @@ interface IDatasetCardProps {
const DatasetCard = ({datasetCardProps, additionalIndicator}:IDatasetCardProps) => {
const intl = useIntl();
const messages = defineMessages({
dataResolution: {
id: 'datasetCard.dataResolution',
defaultMessage: 'Data resolution: ',
description: 'label associated with explaining the card',
},
dataSource: {
id: 'datasetCard.dataSource',
defaultMessage: 'Data source: ',
description: 'label associated with explaining the card',
},
dataDateRange: {
id: 'datasetCard.dataDateRange',
defaultMessage: 'Data date range: ',
description: 'label associated with explaining the card',
},
});
return (
<div className={additionalIndicator ? styles.datasetCardAdditional : styles.datasetCard}>
@ -38,7 +22,7 @@ const DatasetCard = ({datasetCardProps, additionalIndicator}:IDatasetCardProps)
<ul className={styles.datasetCardList}>
<li className={styles.datasetCardListItem}>
<span className={styles.datasetCardLabels}>
{intl.formatMessage(messages.dataSource)}
{intl.formatMessage(METHODOLOGY_COPY.DATASET_CARD_LABELS.SOURCE)}
</span>
<a href={datasetCardProps.dataSourceURL} target={'_blank'} rel="noreferrer">
{datasetCardProps.dataSourceLabel}
@ -46,13 +30,13 @@ const DatasetCard = ({datasetCardProps, additionalIndicator}:IDatasetCardProps)
</li>
<li className={styles.datasetCardListItem}>
<span className={styles.datasetCardLabels}>
{intl.formatMessage(messages.dataResolution)}
{intl.formatMessage(METHODOLOGY_COPY.DATASET_CARD_LABELS.RESOLUTION)}
</span>
{datasetCardProps.dataResolution}
</li>
<li className={styles.datasetCardListItem}>
<span className={styles.datasetCardLabels}>
{intl.formatMessage(messages.dataDateRange)}
{intl.formatMessage(METHODOLOGY_COPY.DATASET_CARD_LABELS.DATE_RANGE)}
</span>
{datasetCardProps.dataDateRange}
</li>

View file

@ -1,6 +1,8 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`rendering of the DatasetCard checks if component renders 1`] = `
exports[`rendering of addtional indicator dataset card checks if component renders 1`] = `<DocumentFragment />`;
exports[`rendering of indicator dataset card checks if component renders 1`] = `
<DocumentFragment>
<div>
<h3>

View file

@ -3,12 +3,24 @@ import {render} from '@testing-library/react';
import {LocalizedComponent} from '../../../test/testHelpers';
import DatasetCard from '../../DatasetCard';
import {indicators} from '../../DatasetContainer/index';
import * as METHODOLOGY_COPY from '../../../data/copy/methodology';
describe('rendering of the DatasetCard', () => {
describe('rendering of indicator dataset card', () => {
const {asFragment} = render(
<LocalizedComponent>
<DatasetCard key={0} datasetCardProps={indicators[0]}/>
<DatasetCard key={0} datasetCardProps={METHODOLOGY_COPY.INDICATORS[0]} additionalIndicator={false}/>
</LocalizedComponent>,
);
it('checks if component renders', () => {
expect(asFragment()).toMatchSnapshot();
});
});
describe('rendering of addtional indicator dataset card', () => {
const {asFragment} = render(
<LocalizedComponent>
<DatasetCard key={0} datasetCardProps={METHODOLOGY_COPY.ADDITIONAL_INDICATORS[0]} additionalIndicator={true}/>
</LocalizedComponent>,
);

View file

@ -1,6 +1,5 @@
import React from 'react';
import {useIntl} from 'gatsby-plugin-intl';
import {defineMessages} from 'react-intl';
import {Grid} from '@trussworks/react-uswds';
import AlertWrapper from '../AlertWrapper';
@ -8,185 +7,12 @@ import DatasetCard from '../DatasetCard';
import J40MainGridContainer from '../J40MainGridContainer';
import * as styles from './dsContainer.module.scss';
import * as METHODOLOGY_COPY from '../../data/copy/methodology';
export const indicators = [
{
indicator: 'Area Median Income',
description: `Median income of the census block group calculated as a percent
of the metropolitan areas or state's median income.`,
dataResolution: `Census block group`,
dataSourceLabel: `Census's American Community Survey`,
dataSourceURL: `https://www.census.gov/programs-surveys/acs`,
dataDateRange: `2015-2019`,
},
{
indicator: 'Poverty',
description: `Percent of a block group's population in households where the household income` +
` is at or below 100% of the federal poverty level`,
dataResolution: `Census block group`,
dataSourceLabel: `Census's American Community Survey`,
dataSourceURL: `https://www.census.gov/programs-surveys/acs`,
dataDateRange: `2015-2019`,
},
{
indicator: 'Education, less than high school education',
description: `Percent of people ages 25 years or older in a block group whose
education level is less than a high school diploma.`,
dataResolution: `Census block group`,
dataSourceLabel: `Census's American Community Survey`,
dataSourceURL: `https://www.census.gov/programs-surveys/acs`,
dataDateRange: `2015-2019`,
},
];
export const additionalIndicators = [
{
indicator: 'Diabetes',
description: `People ages 18 years and older who report having ever been
told by a doctor, nurse, or other health professionals that they have
diabetes other than diabetes during pregnancy.`,
dataResolution: `Census tract`,
dataSourceLabel: `Centers for Disease Control and Prevention (CDC) PLACES`,
dataSourceURL: `https://www.cdc.gov/places/index.html`,
dataDateRange: `2016-2019`,
},
{
indicator: 'Asthma',
description: `Weighted number of respondents people who answer “yes” both
to both of the following questions: Have you ever been told by a doctor,
nurse, or other health professional that you have asthma? and the question
Do you still have asthma?`,
dataResolution: `Census tract`,
dataSourceLabel: `Centers for Disease Control and Prevention (CDC) PLACES`,
dataSourceURL: `https://www.cdc.gov/places/index.html`,
dataDateRange: `2016-2019`,
},
{
indicator: 'Heart disease',
description: `People ages 18 years and older who report ever having been told
by a doctor, nurse, or other health professionals that they had angina or
coronary heart disease.`,
dataResolution: `Census tract`,
dataSourceLabel: `Centers for Disease Control and Prevention (CDC) PLACES`,
dataSourceURL: `https://www.cdc.gov/places/index.html`,
dataDateRange: `2016-2019`,
},
{
indicator: 'Life expectancy',
description: `Estimated years of life expectancy.`,
dataResolution: `Census tract`,
dataSourceLabel: `Centers for Disease Control and Prevention (CDC)
US Small-area Life Expectancy Estimates Project`,
dataSourceURL: `https://www.cdc.gov/nchs/nvss/usaleep/usaleep.html#data`,
dataDateRange: `2010-2015`,
},
{
indicator: 'Traffic proximity and volume',
description: `Count of vehicles (average annual daily traffic) at major roads
within 500 meters, divided by distance in meters (not km).`,
dataResolution: `Census block group`,
dataSourceLabel: `Department of Transportation (DOT) traffic data`,
dataSourceURL: `https://www.fhwa.dot.gov/policyinformation/hpms/shapefiles.cfm`,
dataDateRange: `2017`,
},
{
indicator: 'FEMA Risk Index Expected Annual Loss Score',
description: `Average economic loss in dollars resulting from natural
hazards each year. It is calculated for each hazard type and quantifies
loss for relevant consequence types: buildings, people, and agriculture.`,
dataResolution: `Census tract`,
dataSourceLabel: `Federal Emergency Management Agency (FEMA)`,
dataSourceURL: `https://hazards.fema.gov/nri/expected-annual-loss`,
dataDateRange: `2014-2017`,
},
{
indicator: 'Energy burden',
description: `Average annual energy cost ($) divided by household income.`,
dataResolution: `Census tract`,
dataSourceLabel: `Department of Energy (DOE) LEAD Score`,
dataSourceURL: `https://www.energy.gov/eere/slsc/low-income-energy-affordability-data-lead-tool`,
dataDateRange: `2018`,
},
{
indicator: 'Housing cost burden',
description: `Households that are low income and spend more than 30% of their
income to housing costs.`,
dataResolution: `Census tract`,
dataSourceLabel: `Department of Housing & Urban Developments
(HUD) Comprehensive Housing Affordability Strategy dataset`,
dataSourceURL: `https://www.huduser.gov/portal/datasets/cp.html`,
dataDateRange: `2013-2017`,
},
{
indicator: 'Wastewater discharge',
description: `RSEI modeled Toxic Concentrations at stream segments within 500
meters, divided by distance in kilometers (km).`,
dataResolution: `Census block group`,
dataSourceLabel: `Environmental Protection Agency (EPA) Risk-Screening
Environmental Indicators (RSEI) Model`,
dataSourceURL: `https://www.epa.gov/rsei`,
dataDateRange: `2020`,
},
{
indicator: 'Lead paint',
description: `Percent of housing units built pre-1960, used as an
indicator of potential lead paint exposure in homes.`,
dataResolution: `Census block group`,
dataSourceLabel: `Census's American Community Survey`,
dataSourceURL: `https://www.census.gov/programs-surveys/acs`,
dataDateRange: `2015-2019`,
},
{
indicator: 'Diesel particulate matter',
description: `Mixture of particles that is part of diesel exhaust in the air.`,
dataResolution: `Census block group`,
dataSourceLabel: `Environmental Protection Agency (EPA) National Air Toxics Assessment (NATA)
`,
dataSourceURL: `https://www.epa.gov/national-air-toxics-assessment/2014-nata-assessment-results`,
dataDateRange: `5-year estimates, 2015-2019`,
},
{
indicator: 'PM2.5',
description: `Fine inhalable particles, with diameters that are generally
2.5 micrometers and smaller.`,
dataResolution: `Census block group`,
dataSourceLabel: `Environmental Protection Agency (EPA) Office of Air
and Radiation (OAR) fusion of model and monitor data`,
dataSourceURL: `https://www.epa.gov/aboutepa/about-office-air-and-radiation-oar`,
dataDateRange: `2017`,
},
];
const DatasetContainer = () => {
const intl = useIntl();
const messages = defineMessages({
cumulativeScore: {
id: 'datasetContainer.header.cumulativeScore',
defaultMessage: 'Datasets used in methodology',
description: 'section label of which datasets are used in cumulative score',
},
subTitle: {
id: 'datasetContainer.subTitle',
defaultMessage: 'The datasets come from a variety of sources and were selected' +
' based on relevance, availability, recency, and quality. The datasets seek to' +
' identify a range of human health, environmental, climate-related, and other' +
' cumulative impacts on communities.',
description: 'description of the dataset section',
},
additionalSubtitle: {
id: 'datasetContainer.additionalSubtitle',
defaultMessage: 'Additional Indicators',
description: 'indicator heading',
},
additionalText: {
id: 'datasetContainer.additionalText',
defaultMessage: 'These datasets provide additional information about each community.',
description: 'additional indicator heading',
},
});
// JSX return value:
return (
<>
<J40MainGridContainer fullWidth={true} blueBackground={true}>
@ -195,18 +21,18 @@ const DatasetContainer = () => {
<Grid row>
<Grid col={12}>
<AlertWrapper showBetaAlert={false} showLimitedDataAlert={true}/>
<h2>{intl.formatMessage(messages.cumulativeScore)}</h2>
<h2>{intl.formatMessage(METHODOLOGY_COPY.DATASETS.HEADING)}</h2>
</Grid>
</Grid>
<Grid row>
<Grid col={12} tablet={{col: 7}} className={'j40-mb-3'}>
<p>{intl.formatMessage(messages.subTitle)}</p>
<p>{intl.formatMessage(METHODOLOGY_COPY.DATASETS.INFO)}</p>
</Grid>
</Grid>
<div className={styles.datasetCardsContainer}>
{indicators.map((card) => <DatasetCard
{METHODOLOGY_COPY.INDICATORS.map((card) => <DatasetCard
key={card.indicator}
datasetCardProps={card}
additionalIndicator={false}
@ -221,18 +47,18 @@ const DatasetContainer = () => {
<Grid row>
<Grid col={12}>
<h2>{intl.formatMessage(messages.additionalSubtitle)}</h2>
<h2>{intl.formatMessage(METHODOLOGY_COPY.DATASETS.ADDITIONAL_HEADING)}</h2>
</Grid>
</Grid>
<Grid row>
<Grid col={12} tablet={{col: 7}} className={'j40-mb-3'}>
<p>{intl.formatMessage(messages.additionalText)}</p>
<p>{intl.formatMessage(METHODOLOGY_COPY.DATASETS.ADDITIONAL_INFO)}</p>
</Grid>
</Grid>
<div className={styles.datasetCardsContainer}>
{additionalIndicators.map((card) => <DatasetCard
{METHODOLOGY_COPY.ADDITIONAL_INDICATORS.map((card) => <DatasetCard
key={card.indicator}
datasetCardProps={card}
additionalIndicator={true}

View file

@ -21,6 +21,9 @@ $primary-color: #112f4e;
.downloadBoxText {
margin-bottom: 20px;
span {
font-style: italic;
}
}
.downloadBoxButtonContainer {

View file

@ -10,6 +10,6 @@ test('download packet component defined', () => {
</LocalizedComponent>,
);
screen.getByRole('button', {name: /download packet/i});
screen.getByRole('button', {name: /download package/i});
});

View file

@ -1,49 +1,37 @@
import React from 'react';
import {Button, Grid} from '@trussworks/react-uswds';
import {useIntl} from 'gatsby-plugin-intl';
import {defineMessages} from 'react-intl';
import * as styles from './downloadPacket.module.scss';
import * as constants from '../../data/constants';
import * as METHODOLOGY_COPY from '../../data/copy/methodology';
// @ts-ignore
import downloadIcon from '/node_modules/uswds/dist/img/usa-icons/file_download.svg';
const DownloadPacket = () => {
const intl = useIntl();
const messages = defineMessages({
downloadPacketHeader: {
id: 'downloadPacket.header.text',
defaultMessage: `Draft communities list (${constants.DOWNLOAD_FILE_SIZE})`,
description: 'download packet header text',
},
downloadPacketInfo: {
id: 'downloadPacket.info.text',
defaultMessage: 'The package includes the draft list of prioritized communities (.csv and .xlsx) '+
` and information about how to use the list (.pdf). Last updated: ${constants.DOWNLOAD_LAST_UPDATED} `,
description: 'download packet info text',
},
downloadPacketButtonText: {
id: 'downloadPacket.button.text',
defaultMessage: 'Download packet',
description: 'download packet button text',
},
});
return (
<Grid>
<div className={styles.downloadBoxContainer}>
<div className={styles.downloadBox}>
<div className={styles.downloadBoxTextBox}>
<div className={styles.downloadBoxTitle}>{intl.formatMessage(messages.downloadPacketHeader)}</div>
<div className={styles.downloadBoxTitle}>
{intl.formatMessage(METHODOLOGY_COPY.DOWNLOAD_PACKAGE.TITLE)}
</div>
<div className={styles.downloadBoxText}>
{intl.formatMessage(messages.downloadPacketInfo)}
{intl.formatMessage(METHODOLOGY_COPY.DOWNLOAD_PACKAGE.DESCRIPTION)}
{' '}
<span>
{intl.formatMessage(METHODOLOGY_COPY.DOWNLOAD_PACKAGE.LAST_UPDATED)}
</span>
</div>
<div className={styles.downloadBoxButtonContainer}>
<a data-cy={'download-link'} href={constants.DOWNLOAD_ZIP_URL}>
<a data-cy={'download-link'} href={METHODOLOGY_COPY.DOWNLOAD_ZIP_URL}>
<Button className={styles.downloadBoxButton} type="button">
<div><img src={downloadIcon} /> </div>
<div className={styles.downloadPacketText}>
{intl.formatMessage(messages.downloadPacketButtonText)}
{intl.formatMessage(METHODOLOGY_COPY.DOWNLOAD_PACKAGE.BUTTON_TEXT)}
</div>
</Button>
</a>

View file

@ -2,11 +2,6 @@
.howYouCanHelpContainer {
margin: 2rem 0;
.howYouCanHelpText {
color: $headingFontColor;
padding-left: 1rem;
}
}
.howYouCanHelpList {

View file

@ -1,9 +1,7 @@
declare namespace HowYouCanHelpModuleScssNamespace {
export interface IHowYouCanHelpModuleScss {
howYouCanHelpContainer: string;
howYouCanHelpBullet: string,
listWrapper: string;
howYouCanHelpText: string;
howYouCanHelpList: string;
howYouCanHelpListWrapper: string;
}

View file

@ -1,89 +1,23 @@
import React from 'react';
import {Link} from 'gatsby-plugin-intl';
import {useIntl} from 'gatsby-plugin-intl';
import {defineMessages} from 'react-intl';
import * as styles from './howYouCanHelp.module.scss';
import * as EXPLORE_COPY from '../../data/copy/explore';
const HowYouCanHelp = () => {
const intl = useIntl();
const messages = defineMessages({
youCanHelpHeader: {
id: 'howYouCanHelp.header.text',
defaultMessage: 'How you can help improve the tool',
description: 'the header of the how you can help section',
},
youCanHelpInfoText: {
id: 'youCanHelpInfoText.list.element.prefix',
defaultMessage: 'If you have helpful information, we would love to',
description: 'you can help info text ',
},
youCanHelpInfoLinkText: {
id: 'youCanHelpInfoLink.link.text',
defaultMessage: 'recieve an email from you',
description: 'you can help info text ',
},
youCanHelpDataMethPrefixText: {
id: 'youCanHelpDataMethPrefixText.link.prefix.text',
defaultMessage: 'View our',
description: 'view our',
},
youCanHelpDataMethLinkText: {
id: 'youCanHelpDataMethLinkText.link.text',
defaultMessage: 'Data and methodology',
description: 'Data & methodology link',
},
youCanHelpDataMethSuffixText: {
id: 'youCanHelpDataMethSuffixText.link.suffix.text',
defaultMessage: 'page and send us feedback.',
description: 'send us feedbackv via email',
},
youCanHelpSharingPrefixText: {
id: 'youCanHelpSharingPrefixText.link.prefix.text',
defaultMessage: 'Find your community of interest and',
description: 'find your community',
},
youCanHelpSharingLinkText: {
id: 'youCanHelpSharingLinkText.link.text',
defaultMessage: 'share your feedback',
description: 'sharing link to email',
},
});
return (
<div className={styles.howYouCanHelpContainer}>
<h2>
{intl.formatMessage(messages.youCanHelpHeader)}
{EXPLORE_COPY.HOW_YOU_CAN_HELP_LIST_ITEMS.HEADING}
</h2>
<ul className={styles.howYouCanHelpListWrapper}>
<li className={styles.howYouCanHelpList}>
<div className={styles.howYouCanHelpText}>
{intl.formatMessage(messages.youCanHelpInfoText)}
{` `}
<a href={'mailto:screeningtool.feedback@usds.gov'}>
{intl.formatMessage(messages.youCanHelpInfoLinkText)}
</a>.
</div>
{EXPLORE_COPY.HOW_YOU_CAN_HELP_LIST_ITEMS.LIST_ITEM_1}
</li>
<li className={styles.howYouCanHelpList}>
<div className={styles.howYouCanHelpText}>
{intl.formatMessage(messages.youCanHelpDataMethPrefixText)}
{` `}
<Link to={'/methodology'}>
{intl.formatMessage(messages.youCanHelpDataMethLinkText)}
</Link>
{` `}
{intl.formatMessage(messages.youCanHelpDataMethSuffixText)}
</div>
{EXPLORE_COPY.HOW_YOU_CAN_HELP_LIST_ITEMS.LIST_ITEM_2}
</li>
<li className={styles.howYouCanHelpList}>
<div className={styles.howYouCanHelpText}>
{intl.formatMessage(messages.youCanHelpSharingPrefixText)}
{` `}
<a href={'mailto:screeningtool.feedback@usds.gov'}>
{intl.formatMessage(messages.youCanHelpSharingLinkText)}
</a>.
</div>
{EXPLORE_COPY.HOW_YOU_CAN_HELP_LIST_ITEMS.LIST_ITEM_3}
</li>
</ul>
</div>

View file

@ -8,7 +8,6 @@ exports[`rendering of the HowYouCanHelp checks if various text fields are visibl
</h2>
<ul>
<li>
<div>
If you have helpful information, we would love to
<a
href="mailto:screeningtool.feedback@usds.gov"
@ -16,10 +15,8 @@ exports[`rendering of the HowYouCanHelp checks if various text fields are visibl
recieve an email from you
</a>
.
</div>
</li>
<li>
<div>
View our
<a
href="/en/methodology"
@ -27,10 +24,8 @@ exports[`rendering of the HowYouCanHelp checks if various text fields are visibl
Data and methodology
</a>
page and send us feedback.
</div>
</li>
<li>
<div>
Find your community of interest and
<a
href="mailto:screeningtool.feedback@usds.gov"
@ -38,7 +33,6 @@ exports[`rendering of the HowYouCanHelp checks if various text fields are visibl
share your feedback
</a>
.
</div>
</li>
</ul>
</div>

View file

@ -5,56 +5,15 @@ import {
} from '@trussworks/react-uswds';
import {NavList} from '@trussworks/react-uswds';
import {useIntl} from 'gatsby-plugin-intl';
import {defineMessages} from 'react-intl';
import J40MainGridContainer from './J40MainGridContainer';
// @ts-ignore
import whitehouseIcon from '../images/eop-seal.svg';
import J40MainGridContainer from './J40MainGridContainer';
import * as COMMON_COPY from '../data/copy/common';
const J40Footer = () => {
const intl = useIntl();
const messages = defineMessages({
arialabelfooter: {
id: 'footer.arialabel',
defaultMessage: 'Footer navigation',
description: 'aria-label text for whole footer',
},
logotitle: {
id: 'footer.logo.title',
defaultMessage: 'Council on Environmental Quality',
description: 'Footer under logo',
},
moreinfoheader: {
id: 'footer.moreinfoheader',
defaultMessage: 'More information',
description: 'Footer column header',
},
foia: {
id: 'footer.foialink',
defaultMessage: 'Freedom of Information Act (FOIA)',
description: 'Footer FOIA link text',
},
privacy: {
id: 'footer.privacylink',
defaultMessage: 'Privacy Policy',
description: 'Footer privacy policy link text',
},
whitehouselogoalt: {
id: 'footer.whitehouselogoalt',
defaultMessage: 'Whitehouse logo',
description: 'Footer Whitehouse logo alt text',
},
questionsheader: {
id: 'footer.questionsheader',
defaultMessage: 'Have a question about government services?',
description: 'Footer column header',
},
contactlink: {
id: 'footer.findcontactlink',
defaultMessage: 'Find a contact at USA.gov',
description: 'Footer find contact link text',
},
});
const NAVLINKS = [
['Contact',
@ -63,15 +22,15 @@ const J40Footer = () => {
className={'j40-footer-address'}
size={'big'}
items={[
'Council on Environmental Quality',
'730 Jackson Pl NW',
'Washington, D.C. 20506',
'(202) 395-5750',
COMMON_COPY.FOOTER_CEQ_ADDRESS.NAME,
COMMON_COPY.FOOTER_CEQ_ADDRESS.STREET,
COMMON_COPY.FOOTER_CEQ_ADDRESS.CITY_STATE,
COMMON_COPY.FOOTER_CEQ_ADDRESS.PHONE,
]}
/>,
],
[
intl.formatMessage(messages.moreinfoheader),
intl.formatMessage(COMMON_COPY.FOOTER.MORE_INFO),
<a
className={'footer-link-first-child'}
key={'whitehouselink2'}
@ -83,23 +42,23 @@ const J40Footer = () => {
target={'_blank'}
rel={'noreferrer'}
href={'https://www.whitehouse.gov/ceq/foia'}>
{intl.formatMessage(messages.foia)}
{intl.formatMessage(COMMON_COPY.FOOTER.FOIA)}
</a>,
<a
key={'privacylink'}
target={'_blank'}
rel={'noreferrer'}
href={'https://www.whitehouse.gov/privacy/'}>
{intl.formatMessage(messages.privacy)}
{intl.formatMessage(COMMON_COPY.FOOTER.PRIVACY)}
</a>,
],
[
intl.formatMessage(messages.questionsheader),
intl.formatMessage(COMMON_COPY.FOOTER.QUESTIONS),
<a
className={'footer-link-first-child'}
key={'contactlink'}
href={'https://www.usa.gov/'}>
{intl.formatMessage(messages.contactlink)}
{intl.formatMessage(COMMON_COPY.FOOTER.CONTACT_LINK)}
</a>,
],
];
@ -134,9 +93,9 @@ const J40Footer = () => {
<img
className={'usa-footer__logo-img'}
src={whitehouseIcon}
alt={intl.formatMessage(messages.whitehouselogoalt)}/>
alt={intl.formatMessage(COMMON_COPY.FOOTER.LOGO_ALT)}/>
}
heading={<h5>{intl.formatMessage(messages.logotitle)}</h5>}
heading={<h5>{intl.formatMessage(COMMON_COPY.FOOTER.TITLE)}</h5>}
/>
</J40MainGridContainer>
</div>

View file

@ -7,47 +7,17 @@ import {
GovBanner,
Tag,
} from '@trussworks/react-uswds';
import {defineMessages} from 'react-intl';
// @ts-ignore
import siteLogo from '../../src/images/icon.png';
import * as COMMON_COPY from '../data/copy/common';
const J40Header = () => {
const intl = useIntl();
const [mobileNavOpen, setMobileNavOpen] = useState(false);
const messages = defineMessages({
titleLine1: {
id: 'header.title.line1',
defaultMessage: `Climate and Economic Justice`,
description: 'Title in nav header line 1 of 2',
},
titleLine2: {
id: 'header.title.line2',
defaultMessage: `Screening Tool`,
description: 'Title in nav header line 2 of 2',
},
about: {
id: 'header.about',
defaultMessage: 'About',
description: 'Header navigate item to the about page',
},
explore: {
id: 'header.explore',
defaultMessage: 'Explore the tool',
description: 'Header navigate item to the Explore the tool page',
},
methodology: {
id: 'header.methodology',
defaultMessage: 'Data & methodology',
description: 'Header navigate item to the Methodology page',
},
contact: {
id: 'header.contact',
defaultMessage: 'Contact',
description: 'Header navigate item to the Contact page',
},
});
const titleL1 = intl.formatMessage(messages.titleLine1);
const titleL2 = intl.formatMessage(messages.titleLine2);
const titleL1 = intl.formatMessage(COMMON_COPY.HEADER.TITLE_LINE_1);
const titleL2 = intl.formatMessage(COMMON_COPY.HEADER.TITLE_LINE_2);
const toggleMobileNav = (): void =>
setMobileNavOpen((prevOpen) => !prevOpen);
@ -62,9 +32,8 @@ const J40Header = () => {
key={'about'}
activeClassName="usa-current"
className={'j40-header'}
data-cy={'nav-link-about'}
>
{intl.formatMessage(messages.about)}
data-cy={'nav-link-about'}>
{intl.formatMessage(COMMON_COPY.HEADER.ABOUT)}
</Link>,
],
['cejst',
@ -73,9 +42,8 @@ const J40Header = () => {
key={'cejst'}
activeClassName="usa-current"
className={'j40-header'}
data-cy={'nav-link-explore'}
>
{intl.formatMessage(messages.explore)}
data-cy={'nav-link-explore'}>
{intl.formatMessage(COMMON_COPY.HEADER.EXPLORE)}
</Link>,
],
['methodology',
@ -84,9 +52,8 @@ const J40Header = () => {
key={'methodology'}
activeClassName="usa-current"
className={'j40-header'}
data-cy={'nav-link-methodology'}
>
{intl.formatMessage(messages.methodology)}
data-cy={'nav-link-methodology'}>
{intl.formatMessage(COMMON_COPY.HEADER.METHODOLOGY)}
</Link>,
],
['contact',
@ -95,9 +62,8 @@ const J40Header = () => {
key={'contact'}
activeClassName="usa-current"
className={'j40-header'}
data-cy={'nav-link-contact'}
>
{intl.formatMessage(messages.contact)}
data-cy={'nav-link-contact'}>
{intl.formatMessage(COMMON_COPY.HEADER.CONTACT)}
</Link>,
],
]);

View file

@ -2,7 +2,7 @@ import React from 'react';
import {useIntl} from 'gatsby-plugin-intl';
import * as styles from './mapLegend.module.scss';
import * as constants from '../../data/constants';
import * as EXPLORE_COPY from '../../data/copy/explore';
const MapLegend = () => {
const intl = useIntl();
@ -11,10 +11,10 @@ const MapLegend = () => {
<div className={styles.colorSwatch} />
<div>
<h4>
{intl.formatMessage(constants.EXPLORE_TOOL_PAGE_TEXT.PRIORITY_LABEL)}
{intl.formatMessage(EXPLORE_COPY.LEGEND.PRIORITY_LABEL)}
</h4>
<p className={'secondary'}>
{intl.formatMessage(constants.EXPLORE_TOOL_PAGE_TEXT.PRIORITY_DESCRIPT)}
{intl.formatMessage(EXPLORE_COPY.LEGEND.PRIORITY_DESCRIPT)}
</p>
</div>
</div>

View file

@ -1,37 +1,17 @@
import * as React from 'react';
import {useIntl} from 'gatsby-plugin-intl';
import {defineMessages} from 'react-intl';
import {Grid} from '@trussworks/react-uswds';
import AlertWrapper from '../AlertWrapper';
import J40Map from '../J40Map';
import * as styles from './mapWrapper.module.scss';
import * as constants from '../../data/constants';
import AlertWrapper from '../AlertWrapper';
import * as EXPLORE_COPY from '../../data/copy/explore';
interface IMapWrapperProps {
location: Location
}
const MapWrapper = ({location}: IMapWrapperProps) => {
const intl = useIntl();
const messages = defineMessages({
downloadLinkText: {
id: 'mapwrapper.download.link',
defaultMessage: 'Download the draft list ',
description: 'download link for datasets',
},
downloadLinkText1: {
id: 'mapwrapper.download1.link',
defaultMessage: `of communities of focus and datasets used. Last updated: ${constants.DOWNLOAD_LAST_UPDATED}`,
description: 'download link for datasets',
},
downloadContents: {
id: 'mapwrapper.download.contents',
defaultMessage: `ZIP file will contain one .xlsx, one .csv, and one .pdf (${constants.DOWNLOAD_FILE_SIZE}).`,
description: 'download link contents',
},
});
return (
<>
<Grid row>
@ -47,14 +27,11 @@ const MapWrapper = ({location}: IMapWrapperProps) => {
<Grid row>
<Grid col={7}>
<div className={styles.mapCaptionTextLink}>
<a href={constants.DOWNLOAD_ZIP_URL}>
{intl.formatMessage(messages.downloadLinkText)}
</a>
<span>
{intl.formatMessage(messages.downloadLinkText1)}
</span>
{EXPLORE_COPY.DOWNLOAD_DRAFT.PARAGRAPH_1}
</div>
<div>
{EXPLORE_COPY.DOWNLOAD_DRAFT.PARAGRAPH_2}
</div>
<div>{intl.formatMessage(messages.downloadContents)}</div>
</Grid>
</Grid>
</>

View file

@ -55,10 +55,8 @@ exports[`rendering of the component should match the snapshot of the MapIntroduc
<h4>
Percent of households below or at 100% of the federal poverty line
</h4>
<p
class="flush"
>
This is the percent of households in a state with a household income below or at 100% of the
This is the percent of households in a state with a household income
below or at 100% of the
<a
href="https://www.census.gov/topics/income-poverty/poverty/guidance/poverty-measures.html"
rel="noreferrer"
@ -66,8 +64,8 @@ exports[`rendering of the component should match the snapshot of the MapIntroduc
>
federal poverty line
</a>
. This federal poverty line is calculated based on the composition of each household (e.g., based on household size), but it does not vary geographically.
</p>
. This federal poverty line is calculated
based on the composition of each household (e.g., based on household size), but it does not vary geographically.
<h4>
The high school degree achievement rate for adults 25 years and older
</h4>
@ -97,21 +95,25 @@ exports[`rendering of the component should match the snapshot of the MapIntroduc
<p>
(The median income is less than 80% of the area median income
</p>
<p
class="flush"
>
OR
</p>
<p
class="flush"
>
households living in poverty (at or below 100% of the federal poverty level) is greater than 20%)
</p>
<p
class="flush"
>
AND
</p>
<p
class="flush"
>

View file

@ -1,41 +1,28 @@
import React from 'react';
import {useIntl} from 'gatsby-plugin-intl';
import {defineMessages} from 'react-intl';
// @ts-ignore
import lightbulbIcon from '/node_modules/uswds/dist/img/usa-icons/lightbulb_outline.svg';
import * as styles from './mapIntroduction.module.scss';
import * as EXPLORE_COPY from '../data/copy/explore';
const MapIntroduction = () => {
const intl = useIntl();
const messages = defineMessages({
mapIntroHeader: {
id: 'mapIntro.mapIntroHeader',
defaultMessage: 'Zoom and select a census block group to view data',
description: 'introductory text of ways to use the map',
},
didYouKnow: {
id: 'mapIntro.didYouKnow',
defaultMessage: ' Did you know?',
description: 'text prompting a cite paragraph',
},
censusBlockGroupDefinition: {
id: 'mapIntro.censusBlockGroupDefinition',
defaultMessage: 'A census block group is generally between 600 and 3,000 people. ' +
'It is the smallest geographical unit for which the U.S. Census ' +
'Bureau publishes sample data.',
description: 'cites the definition and helpful information about census groups',
},
});
return (
<aside className={styles.mapIntroContainer}>
<header className={styles.mapIntroHeader}>{intl.formatMessage(messages.mapIntroHeader)}</header>
<header className={styles.mapIntroHeader}>
{intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INITIAL_STATE.TITLE)}
</header>
<div className={styles.mapIntroText}>
<img className={styles.mapIntroLightbulb} src={lightbulbIcon} />
<div className={styles.didYouKnowBox}>
<div className={styles.didYouKnow}>{intl.formatMessage(messages.didYouKnow)}</div>
<cite className={styles.didYouKnowText}>{intl.formatMessage(messages.censusBlockGroupDefinition)}</cite>
<div className={styles.didYouKnow}>
{intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INITIAL_STATE.DID_YOU_KNOW)}
</div>
<cite className={styles.didYouKnowText}>
{intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_INITIAL_STATE.CBG_DEFINITION)}
</cite>
</div>
</div>
</aside>

View file

@ -5,89 +5,82 @@ import {
ProcessListHeading,
Grid,
} from '@trussworks/react-uswds';
import {useIntl} from 'gatsby-plugin-intl';
import * as METHODOLOGY_COPY from '../data/copy/methodology';
const ScoreStepsList = () => {
const intl = useIntl();
return (
<>
<h2>Methodology</h2>
<h2>
{intl.formatMessage(METHODOLOGY_COPY.METHODOLOGY_STEPS.HEADING)}
</h2>
<Grid row>
<Grid col={7}>
<p>
The methodology for identifying communities of focus is calculated at the
census block group level. Census block geographical boundaries are determined
by the U.S. Census Bureau once every ten years. This tool utilizes the census
block boundaries from 2010.
{intl.formatMessage(METHODOLOGY_COPY.METHODOLOGY_STEPS.DESCRIPTION_1)}
</p>
<p>
The following describes the process for identifying communities of focus.
{intl.formatMessage(METHODOLOGY_COPY.METHODOLOGY_STEPS.DESCRIPTION_2)}
</p>
</Grid>
</Grid>
<ProcessList>
{/* Step 1 */}
<ProcessListItem>
<ProcessListHeading type="h4">Gather datasets</ProcessListHeading>
<p>{' '}</p>
<p className={'flush'}>
The methodology includes the following inputs that are equally weighted.
</p>
<h4>
Percent of Area Median Income
</h4>
<p className={'flush'}>
If a census block group is in a metropolitan area, this value is the
median income of the census block group calculated as a percent of
the metropolitan areas median income.
</p>
<p>
If a census block group is not in a metropolitan area, this value is
the median income of the census block group calculated as a percent
of the states median income.
</p>
<h4>
Percent of households below or at 100% of the federal poverty line
</h4>
<p className={'flush'}>
This is the percent of households in a state with a household income
below or at 100% of the <a href="https://www.census.gov/topics/income-poverty/poverty/guidance/poverty-measures.html" target="_blank" rel="noreferrer">federal poverty line</a>. This federal poverty line is
calculated based on the composition of each household (e.g., based on
household size), but it does not vary geographically.
</p>
<h4>
The high school degree achievement rate for adults 25 years and older
</h4>
<p className={'flush'}>
The percent of individuals who are 25 or older who have received a high school degree.
</p>
</ProcessListItem>
<ProcessListItem>
<ProcessListHeading type="h4">
Determine communites of focus
{intl.formatMessage(METHODOLOGY_COPY.METHODOLOGY_STEPS.STEP_1_HEADING)}
</ProcessListHeading>
<p>{' '}</p>
<p className={'flush'}>
Under the existing formula, a census block group will be considered a
community of focus if:
{intl.formatMessage(METHODOLOGY_COPY.METHODOLOGY_STEPS.STEP_1_INFO)}
</p>
{/* Step 1 A */}
<h4>
{intl.formatMessage(METHODOLOGY_COPY.METHODOLOGY_STEPS.STEP_1_A_HEADING)}
</h4>
<p className={'flush'}>
{intl.formatMessage(METHODOLOGY_COPY.METHODOLOGY_STEPS.STEP_1_A_INFO_1)}
</p>
<p>
(The median income is less than 80% of the area median income
{intl.formatMessage(METHODOLOGY_COPY.METHODOLOGY_STEPS.STEP_1_A_INFO_2)}
</p>
{/* Step 1 B */}
<h4>
{intl.formatMessage(METHODOLOGY_COPY.METHODOLOGY_STEPS.STEP_1_B_HEADING)}
</h4>
{METHODOLOGY_COPY.COMPLEX_METH_STEPS.STEP_2_B_INFO}
{/* Step 1 C */}
<h4>
{intl.formatMessage(METHODOLOGY_COPY.METHODOLOGY_STEPS.STEP_1_C_HEADING)}
</h4>
<p className={'flush'}>
OR
{intl.formatMessage(METHODOLOGY_COPY.METHODOLOGY_STEPS.STEP_1_C_INFO)}
</p>
</ProcessListItem>
{/* Step 2 */}
<ProcessListItem>
<ProcessListHeading type="h4">
{intl.formatMessage(METHODOLOGY_COPY.METHODOLOGY_STEPS.STEP_2_HEADING)}
</ProcessListHeading>
<p>{' '}</p>
<p className={'flush'}>
households living in poverty (at or below 100% of the federal poverty level) is greater than 20%)
</p>
<p className={'flush'}>
AND
</p>
<p className={'flush'}>
The high school degree achievement rate for adults 25 years and older is greater than 95%
{intl.formatMessage(METHODOLOGY_COPY.METHODOLOGY_STEPS.STEP_2_INFO)}
</p>
{METHODOLOGY_COPY.COMPLEX_METH_STEPS.FORMULA}
</ProcessListItem>
</ProcessList>

View file

@ -1,8 +1,10 @@
import * as React from 'react';
import * as styles from './zoomWarning.module.scss';
import React from 'react';
import {useIntl} from 'react-intl';
// @ts-ignore
import zoomIcon from '/node_modules/uswds/dist/img/usa-icons/zoom_in.svg';
import * as styles from './zoomWarning.module.scss';
import * as EXPLORE_COPY from '../data/copy/explore';
interface IZoomWarningProps {
zoomLevel: number
@ -10,12 +12,14 @@ interface IZoomWarningProps {
// Update this file to trigger build
const ZoomWarning = ({zoomLevel}: IZoomWarningProps) => {
const intl = useIntl();
return (
<>
{zoomLevel <= 5 ? (
<div className={styles.zoomWarning}>
<img src={zoomIcon} alt={'zoom icon'}/>
Zoom in to the state or regional level to see prioritized communities on the map.
{intl.formatMessage(EXPLORE_COPY.MAP.ZOOM_WARNING)}
</div>
) :
''

View file

@ -1,12 +1,5 @@
import {LngLatBoundsLike} from 'maplibre-gl';
import {isMobile as isMobileReactDeviceDetect} from 'react-device-detect';
import {defineMessages} from 'react-intl';
export const DOWNLOAD_ZIP_URL = [
process.env.GATSBY_DATA_ROOT_PATH,
process.env.GATSBY_DATA_PIPELINE_SCORE_PATH,
process.env.GATSBY_SCORE_DOWNLOAD_FILE_PATH,
].join('/');
const XYZ_SUFFIX = '{z}/{x}/{y}.pbf';
export const featureURLForTilesetName = (tilesetName :string ) : string => {
@ -60,13 +53,10 @@ export const LEAD_PAINT_PERCENTILE = 'Percent pre-1960s housing (lead paint indi
export const DIESEL_MATTER_PERCENTILE = 'Diesel particulate matter (percentile)';
export const PM25_PERCENTILE = 'Particulate matter (PM2.5) (percentile)';
export type J40Properties = { [key: string]: any };
// The name of the layer within the tiles that contains the score
export const SCORE_SOURCE_LAYER = 'blocks';
export const DOWNLOAD_FILE_SIZE = '143MB';
export const DOWNLOAD_LAST_UPDATED = '09/20/21';
export type J40Properties = { [key: string]: any };
// Zoom
export const GLOBAL_MIN_ZOOM = 3;
@ -141,20 +131,4 @@ export const SCORE_BOUNDARY_LOW = 0.0;
export const SCORE_BOUNDARY_THRESHOLD = 0.6;
export const SCORE_BOUNDARY_PRIORITIZED = 0.75;
// Explore the Tool:
export const EXPLORE_TOOL_PAGE_TEXT = defineMessages({
PRIORITY_LABEL: {
id: 'legend.info.priority.label',
defaultMessage: 'Draft community of focus',
description: 'the label of the prioritized community legend',
},
PRIORITY_DESCRIPT: {
id: 'legend.info.threshold.label',
defaultMessage: 'A community identified as experiencing disadvantages that merits' +
' the focus of certain Federal investments, including through the Justice40 Initiative',
description: 'the label of the threshold community legend',
},
});
export const isMobile = isMobileReactDeviceDetect;

View file

@ -0,0 +1,144 @@
import {defineMessages} from 'react-intl';
export const PAGE = defineMessages({
TILE: {
id: 'about.page.title.text',
defaultMessage: 'About',
description: 'about page title text',
},
HEADING_1: {
id: 'index.heading.screentool',
defaultMessage: 'The screening tool',
description: 'heading for about screening tool',
},
HEADING1_DESCRIPTION1: {
id: 'about.page.sub.header.1.text.1',
defaultMessage: 'On January 27, 2021, President Biden directed the Council on'+
' Environmental Quality (CEQ) to create a climate and economic'+
' justice screening tool. The purpose of the tool is to help'+
' Federal agencies identify disadvantaged communities and provide'+
' socioeconomic, environmental, and climate information and data'+
' to inform decisions that may affect these communities. The tool'+
' identifies disadvantaged communities as communities of focus'+
' through publicly available, nationally consistent, high-quality'+
' data.',
description: 'about page sub header text',
},
HEADING1_DESCRIPTION2: {
id: 'about.page.sub.header.1.text.2',
defaultMessage: 'The current version of the tool is in a public beta form and'+
' will be updated based on feedback from the public.',
description: 'about page sub header text',
},
HEADING_2: {
id: 'index.heading.justice40',
defaultMessage: 'The Justice40 Initiative',
description: 'heading for about justice 40',
},
HEADING2_DESCRIPTION1: {
id: 'about.page.sub.header.2.text.1',
defaultMessage: 'The tool will provide important information for the Justice40'+
' Initiative. The goal of the Justice40 Initiative is to provide'+
' 40-percent of the overall benefits of certain federal'+
' programs in seven key areas to disadvantaged communities.'+
' These seven key areas are: climate change, clean energy and'+
' energy efficiency, clean transit, affordable and sustainable'+
' housing, training and workforce development, the remediation'+
' and reduction of legacy pollution, and the development of'+
' critical clean water infrastructure.',
description: 'about page sub header text',
},
HEADING2_DESCRIPTION2: {
id: 'about.page.sub.header.2.text.2',
defaultMessage: 'Read more about the Justice40 Initiative in President Bidens',
description: 'about page sub header text',
},
PRESIDENT_LINK_LABEL: {
id: 'index.presidentalLinkLabel',
defaultMessage: 'Executive Order 14008 on Tackling the Climate Crisis at Home and Abroad',
description: 'Link url to presidential actions executive order. Part of paragraph 2',
},
});
export const EXEC_ORDER_LINK = 'https://www.whitehouse.gov/briefing-room/presidential-actions/2021/01/27/' +
'executive-order-on-tackling-the-climate-crisis-at-home-and-abroad/';
export const GITHUB_LINK = 'https://github.com/usds/justice40-tool';
export const HOW_TO_GET_STARTED = defineMessages({
TITLE: {
id: 'howToGetStarted.title',
defaultMessage: 'How to get started',
description: 'sub heading of page',
},
FEDERAL_PM_HEADING: {
id: 'federal.pm.info',
defaultMessage: 'Federal program managers',
description: 'sub heading of page',
},
FEDERAL_PM_INFO: {
id: 'federal.pm.info',
defaultMessage: 'Download the screening tools draft list of communities of focus.'+
' Explore data that may be useful to your program, and provide'+
' feedback on the tool.',
description: 'sub heading of page',
},
FEDERAL_PM_LINK_TEXT: {
id: 'federal.pm.link',
defaultMessage: 'Go to data & methodology',
description: 'link text to go to methodology page',
},
COMMUNITY_MEMBERS_HEADING: {
id: 'community.members.heading',
defaultMessage: 'Community members',
description: 'sub heading of page',
},
COMMUNITY_MEMBERS_INFO: {
id: 'community.members.info',
defaultMessage: 'Explore data about communities of focus in your area, and help '+
' provide feedback on the tool.',
description: 'sub heading of page',
},
COMMUNITY_MEMBERS_LINK_TEXT: {
id: 'community.members.link',
defaultMessage: 'Explore the tool',
description: 'link to explore the tool page',
},
});
export const GET_INVOLVED = defineMessages({
TITLE: {
id: 'getInvolved.title',
defaultMessage: 'How to get started',
description: 'sub heading of page',
},
SEND_FEEDBACK_HEADING: {
id: 'send.feedback.heading',
defaultMessage: 'Send feedback',
description: 'sending feedback heading',
},
SEND_FEEDBACK_INFO: {
id: 'send.feedback.info',
defaultMessage: 'Have ideas about how this tool can be improved to better reflect'+
' the on-the-ground experiences of your community?',
description: 'sending feedback information',
},
JOIN_OSC_HEADING: {
id: 'join.opensource.heading',
defaultMessage: 'Join the open source community',
description: 'join the community heading',
},
JOIN_OSC_INFO: {
id: 'join.open.source.info',
defaultMessage: 'The screening tools code is open source, which means it is '+
' available for the public to view and contribute to. Anyone can view and contribute on GitHub.',
description: 'info on joining open source community',
},
JOIN_OSC_LINK_TEXT: {
id: 'join.open.source.link',
defaultMessage: 'Check it out on GitHub',
description: 'link to github repository',
},
});

View file

@ -0,0 +1,117 @@
import {defineMessages} from 'react-intl';
// Alerts
export const ALERTS = defineMessages({
BETA_TITLE: {
id: 'alert.alertBetaTitle',
defaultMessage:
'Public beta',
description: 'Title for an alert inform users that datasets may change',
},
BETA_BODY: {
id: 'alert.alertBetaBody',
defaultMessage:
'This website may be continuously updated',
description: 'Body for an alert inform users that datasets may change',
},
LIMITED_TITLE: {
id: 'alert.alertDataLimitedTitle',
defaultMessage:
'Limited data sources',
description: 'Title for an alert inform users that datasets may change',
},
LIMITED_BODY: {
id: 'alert.alertDataLimitedBody',
defaultMessage:
'Datasets may be added, updated, or removed.',
description: 'Body for an alert inform users that datasets may change',
},
});
// Header
export const HEADER = defineMessages({
TITLE_LINE_1: {
id: 'header.title.line1',
defaultMessage: `Climate and Economic Justice`,
description: 'Title in nav header line 1 of 2',
},
TITLE_LINE_2: {
id: 'header.title.line2',
defaultMessage: `Screening Tool`,
description: 'Title in nav header line 2 of 2',
},
ABOUT: {
id: 'header.about',
defaultMessage: 'About',
description: 'Header navigate item to the about page',
},
EXPLORE: {
id: 'header.explore',
defaultMessage: 'Explore the tool',
description: 'Header navigate item to the Explore the tool page',
},
METHODOLOGY: {
id: 'header.methodology',
defaultMessage: 'Data & methodology',
description: 'Header navigate item to the Methodology page',
},
CONTACT: {
id: 'header.contact',
defaultMessage: 'Contact',
description: 'Header navigate item to the Contact page',
},
});
// Footer
export const FOOTER = defineMessages({
ARIA_LABEL: {
id: 'footer.arialabel',
defaultMessage: 'Footer navigation',
description: 'aria-label text for whole footer',
},
TITLE: {
id: 'footer.logo.title',
defaultMessage: 'Council on Environmental Quality',
description: 'Footer under logo',
},
MORE_INFO: {
id: 'footer.moreinfoheader',
defaultMessage: 'More information',
description: 'Footer column header',
},
FOIA: {
id: 'footer.foialink',
defaultMessage: 'Freedom of Information Act (FOIA)',
description: 'Footer FOIA link text',
},
PRIVACY: {
id: 'footer.privacylink',
defaultMessage: 'Privacy Policy',
description: 'Footer privacy policy link text',
},
LOGO_ALT: {
id: 'footer.whitehouselogoalt',
defaultMessage: 'Whitehouse logo',
description: 'Footer Whitehouse logo alt text',
},
QUESTIONS: {
id: 'footer.questionsheader',
defaultMessage: 'Have a question about government services?',
description: 'Footer column header',
},
CONTACT_LINK: {
id: 'footer.findcontactlink',
defaultMessage: 'Find a contact at USA.gov',
description: 'Footer find contact link text',
},
});
export const FOOTER_CEQ_ADDRESS = {
NAME: 'Council on Environmental Quality',
STREET: '730 Jackson Pl NW',
CITY_STATE: 'Washington, D.C. 20506',
PHONE: '(202) 395-5750',
}
;

View file

@ -0,0 +1,32 @@
import {defineMessages} from 'react-intl';
export const PAGE_INTRO = defineMessages({
PAGE_TILE: {
id: 'contact.page.title.text',
defaultMessage: 'Contact',
description: 'contact page title text',
},
PAGE_HEADING: {
id: 'contact.page.header.text',
defaultMessage: 'Contact',
description: 'contact page header text',
},
PAGE_SUB_HEADING: {
id: 'contact.page.sub.header.text',
defaultMessage: 'Email us',
description: 'contact page sub header text',
},
PAGE_DESCRIPTION: {
id: 'contact.page.sub.header.text',
defaultMessage: 'Email us',
description: 'contact page sub header text',
},
});
export const CONTACT_VIA_EMAIL = {
ID: 'contact.general',
DESCRIPTION: 'Contact page body text',
DEFAULT_MESSAGE: `For general feedback, email {general_email_address}`,
};
export const FEEDBACK_EMAIL = 'screeningtool.feedback@usds.gov';

View file

@ -0,0 +1,357 @@
import React from 'react';
import {defineMessages} from 'react-intl';
import {FormattedMessage, Link} from 'gatsby-plugin-intl';
import * as CONTACT_COPY from './contact';
import * as METHODOLOGY_COPY from './methodology';
export const PAGE_INTRO = defineMessages({
PAGE_TILE: {
id: 'exploreTool.title.text',
defaultMessage: 'Explore the tool',
description: 'explore the tool title text',
},
PAGE_HEADING: {
id: 'exploreTool.heading.text',
defaultMessage: 'Explore the tool',
description: 'explore the tool heading text',
},
});
export const LEGEND = defineMessages({
PRIORITY_LABEL: {
id: 'legend.info.priority.label',
defaultMessage: 'Draft community of focus',
description: 'the label of the prioritized community legend',
},
PRIORITY_DESCRIPT: {
id: 'legend.info.threshold.label',
defaultMessage: 'A community identified as experiencing disadvantages that merits' +
' the focus of certain Federal investments, including through the Justice40 Initiative',
description: 'the label of the threshold community legend',
},
});
// Map
export const MAP = defineMessages({
ZOOM_WARNING: {
id: 'map.zoom.warning',
defaultMessage: 'Zoom in to the state or regional level to see prioritized communities on the map.',
description: 'zoom warning on map',
},
});
// Side Panel copy
export const SIDE_PANEL_INITIAL_STATE = defineMessages({
TITLE: {
id: 'mapIntro.mapIntroHeader',
defaultMessage: 'Zoom and select a census block group to view data',
description: 'introductory text of ways to use the map',
},
DID_YOU_KNOW: {
id: 'mapIntro.didYouKnow',
defaultMessage: ' Did you know?',
description: 'text prompting a cite paragraph',
},
CBG_DEFINITION: {
id: 'mapIntro.censusBlockGroupDefinition',
defaultMessage: 'A census block group is generally between 600 and 3,000 people. ' +
'It is the smallest geographical unit for which the U.S. Census ' +
'Bureau publishes sample data.',
description: 'cites the definition and helpful information about census groups',
},
});
export const SIDE_PANEL_CBG_INFO = defineMessages({
CENSUS_BLOCK_GROUP: {
id: 'areaDetail.geographicInfo.censusBlockGroup',
defaultMessage: 'Census block group:',
description: 'the census block group id number of the feature selected',
},
COUNTY: {
id: 'areaDetail.geographicInfo.county',
defaultMessage: 'County:',
description: 'the county of the feature selected',
},
STATE: {
id: 'areaDetail.geographicInfo.state',
defaultMessage: 'State: ',
description: 'the state of the feature selected',
},
POPULATION: {
id: 'areaDetail.geographicInfo.population',
defaultMessage: 'Population:',
description: 'the population of the feature selected',
},
});
export const COMMUNITY = {
OF_FOCUS: <FormattedMessage
id={'areaDetail.priorityInfo.categorization'}
defaultMessage={ 'Community of focus'}
description={'the communities the score currently is focused on'}
/>,
NOT_OF_FOCUS: <FormattedMessage
id= {'areaDetail.priorityInfo.categorization'}
defaultMessage= {'Not a community of focus'}
description= {'the communities the score currently is not focused on'}
/>,
};
export const SIDE_PANEL_INDICATORS = defineMessages({
INDICATOR_COLUMN_HEADER: {
id: 'areaDetail.indicators.indicatorColumnHeader',
defaultMessage: 'Indicator',
description: 'the population of the feature selected',
},
PERCENTILE_COLUMN_HEADER: {
id: 'areaDetail.indicators.percentileColumnHeader',
defaultMessage: 'Percentile (0-100)',
description: 'the population of the feature selected',
},
POVERTY: {
id: 'areaDetail.indicator.poverty',
defaultMessage: 'Poverty',
description: 'Household income is less than or equal to twice the federal "poverty level"',
},
AREA_MEDIAN_INCOME: {
id: 'areaDetail.indicator.areaMedianIncome',
defaultMessage: 'Area Median Income',
description: 'calculated as percent of the area median income',
},
EDUCATION: {
id: 'areaDetail.indicator.education',
defaultMessage: 'Education, less than high school',
description: 'Percent of people age 25 or older that didnt get a high school diploma',
},
ASTHMA: {
id: 'areaDetail.indicator.asthma',
defaultMessage: 'Asthma',
description: 'have asthma or been diagnosed by a doctor to have asthma',
},
DIABETES: {
id: 'areaDetail.indicator.diabetes',
defaultMessage: 'Diabetes',
description: 'diabetes from dr or nurse',
},
DIESEL_PARTICULATE_MATTER: {
id: 'areaDetail.indicator.dieselPartMatter',
defaultMessage: 'Diesel particulate matter',
description: 'Diesel particulate matter level in air',
},
ENERGY_BURDEN: {
id: 'areaDetail.indicator.energyBurden',
defaultMessage: 'Energy burden',
description: 'Average annual energy cost ($) divided by household income',
},
FEMA_RISK: {
id: 'areaDetail.indicator.femaRisk',
defaultMessage: 'FEMA Risk Index',
description: 'Risk based on 18 natural hazard types, in addition to a '+
'community\'s social vulnerability and community resilience',
},
HEART_DISEASE: {
id: 'areaDetail.indicator.heartDisease',
defaultMessage: 'Heart disease',
description: 'People ages 18 and up who report ever having been told by a' +
'doctor, nurse, or other health professionals that they had angina or coronary heart disease',
},
HOUSE_BURDEN: {
id: 'areaDetail.indicator.houseBurden',
defaultMessage: 'Housing cost burden',
description: 'People ages 18 and up who report having been told by a doctor,' +
' nurse, or other health professionals that they have diabetes other than diabetes during pregnancy',
},
LEAD_PAINT: {
id: 'areaDetail.indicator.leadPaint',
defaultMessage: 'Lead paint',
description: 'Housing units built pre-1960, used as an indicator of potential'+
' lead paint exposure in homes',
},
LIFE_EXPECT: {
id: 'areaDetail.indicator.lifeExpect',
defaultMessage: 'Life expectancy',
description: 'Estimated years of life expectancy',
},
PM_2_5: {
id: 'areaDetail.indicator.pm25',
defaultMessage: 'PM2.5',
description: 'Fine inhalable particles, with diameters that are generally 2.5 micrometers and smaller',
},
TRAFFIC_VOLUME: {
id: 'areaDetail.indicator.trafficVolume',
defaultMessage: 'Traffic proximity and volume',
description: 'Count of vehicles (average annual daily traffic) at major roads within 500 meters,' +
' divided by distance in meters',
},
WASTE_WATER: {
id: 'areaDetail.indicator.wasteWater',
defaultMessage: 'Wastewater discharge',
description: 'Toxic concentrations at stream segments within 500 meters divided by distance in' +
' kilometers',
},
});
export const SIDE_PANEL_INDICATOR_DESCRIPTION = defineMessages({
AREA_MEDIAN_INCOME: {
id: 'areaDetail.indicator.description.area_median_income',
defaultMessage: 'Median income of the census block group calculated as a percent of the metropolitan'+
' areas or state\'s median income',
description: 'Median income of the census block group calculated as a percent of the metropolitan'+
' areas or state\'s median income',
},
EDUCATION: {
id: 'areaDetail.indicator.description.education',
defaultMessage: 'Percent of people age 25 or older that didnt get a high school diploma',
description: 'Percent of people age 25 or older that didnt get a high school diploma',
},
POVERTY: {
id: 'areaDetail.indicator.description.poverty',
defaultMessage: 'Percent of a block group\'s population in households where the household income' +
' is at or below 100% of the federal poverty level',
description: 'Percent of a block group\'s population in households where the household income' +
' is at or below 100% of the federal poverty level',
},
ASTHMA: {
id: 'areaDetail.indicator.description.asthma',
defaultMessage: 'People who answer “yes” to both of the questions: “Have you ever been told by' +
' a doctor nurse, or other health professional that you have asthma?” and “Do you still have asthma?"',
description: 'People who answer “yes” to both of the questions: “Have you ever been told by' +
' a doctor nurse, or other health professional that you have asthma?” and “Do you still have asthma?"',
},
DIABETES: {
id: 'areaDetail.indicator.description.diabetes',
defaultMessage: 'People ages 18 and up who report having been told by a doctor, nurse, or other' +
' health professionals that they have diabetes other than diabetes during pregnancy',
description: 'People ages 18 and up who report having been told by a doctor, nurse, or other' +
' health professionals that they have diabetes other than diabetes during pregnancy',
},
DIESEL_PARTICULATE_MATTER: {
id: 'areaDetail.indicator.description.dieselPartMatter',
defaultMessage: 'Mixture of particles that is part of diesel exhaust in the air',
description: 'Mixture of particles that is part of diesel exhaust in the air',
},
ENERGY_BURDEN: {
id: 'areaDetail.indicator.description.energyBurden',
defaultMessage: 'Average annual energy cost ($) divided by household income',
description: 'Average annual energy cost ($) divided by household income',
},
FEMA_RISK: {
id: 'areaDetail.indicator.description.femaRisk',
defaultMessage: 'Expected Annual Loss Score, which is the average economic loss in dollars' +
' resulting from natural hazards each year.',
description: 'Expected Annual Loss Score, which is the average economic loss in dollars' +
' resulting from natural hazards each year.',
},
HEART_DISEASE: {
id: 'areaDetail.indicator.description.heartDisease',
defaultMessage: 'People ages 18 and up who report ever having been told by a' +
' doctor, nurse, or other health professionals that they had angina or coronary heart disease',
description: 'People ages 18 and up who report ever having been told by a' +
' doctor, nurse, or other health professionals that they had angina or coronary heart disease',
},
HOUSE_BURDEN: {
id: 'areaDetail.indicator.description.houseBurden',
defaultMessage: 'Households that are low income and spend more than 30% of their income on' +
' housing costs',
description: 'Households that are low income and spend more than 30% of their income on' +
' housing costs',
},
LEAD_PAINT: {
id: 'areaDetail.indicator.description.leadPaint',
defaultMessage: 'Housing units built pre-1960, used as an indicator of potential'+
' lead paint exposure in homes',
description: 'Housing units built pre-1960, used as an indicator of potential'+
' lead paint exposure in homes',
},
LIFE_EXPECT: {
id: 'areaDetail.indicator.description.lifeExpect',
defaultMessage: 'Estimated years of life expectancy',
description: 'Estimated years of life expectancy',
},
PM_2_5: {
id: 'areaDetail.indicator.description.pm25',
defaultMessage: 'Fine inhalable particles, with diameters that are generally 2.5 micrometers and smaller',
description: 'Fine inhalable particles, with diameters that are generally 2.5 micrometers and smaller',
},
TRAFFIC_VOLUME: {
id: 'areaDetail.indicator.description.trafficVolume',
defaultMessage: 'Count of vehicles (average annual daily traffic) at major roads within 500 meters,' +
' divided by distance in meters',
description: 'Count of vehicles (average annual daily traffic) at major roads within 500 meters,' +
' divided by distance in meters',
},
WASTE_WATER: {
id: 'areaDetail.indicator.description.wasteWater',
defaultMessage: 'Toxic concentrations at stream segments within 500 meters divided by distance in' +
' kilometers',
description: 'Toxic concentrations at stream segments within 500 meters divided by distance in' +
' kilometers',
},
});
export const DOWNLOAD_DRAFT = {
PARAGRAPH_1: <FormattedMessage
id={'download.draft.ptag.1'}
description={'Download the draft list of communities of focus and datasets used.'}
defaultMessage={`{downloadDraft} of communities of focus and datasets used. Last updated: {dateUpdated}.`}
values={{
downloadDraft:
<a href={METHODOLOGY_COPY.DOWNLOAD_ZIP_URL}>
{'Download the draft list'}
</a>,
dateUpdated: METHODOLOGY_COPY.DOWNLOAD_LAST_UPDATED,
}}
/>,
PARAGRAPH_2: <FormattedMessage
id={'download.draft.ptag.1'}
description={'Download the draft list of communities of focus and datasets used.'}
defaultMessage={`ZIP file will contain one .xlsx, one .csv, and one .pdf (${METHODOLOGY_COPY.DOWNLOAD_FILE_SIZE}).`}
/>,
};
export const HOW_YOU_CAN_HELP_LIST_ITEMS = {
HEADING: <FormattedMessage
id={'youCanHelpInfoText.heading'}
description={'how one can help us improve the tool'}
defaultMessage={`How you can help improve the tool`}
/>,
LIST_ITEM_1: <FormattedMessage
id={'youCanHelpInfoText.list.item.1'}
description={'how one can help us via email'}
defaultMessage={`If you have helpful information, we would love to {rxEmailFromYou}.`}
values={{
rxEmailFromYou:
<a href={`mailto:${CONTACT_COPY.FEEDBACK_EMAIL}`}>
{'recieve an email from you'}
</a>,
}}
/>,
LIST_ITEM_2: <FormattedMessage
id={'youCanHelpInfoText.list.item.2'}
description={'give us feedback on our data and methodology'}
defaultMessage={`View our {dataMeth} page and send us feedback.`}
values={{
dataMeth:
<Link to={'/methodology'}>
{'Data and methodology'}
</Link>,
}}
/>,
LIST_ITEM_3: <FormattedMessage
id={'youCanHelpInfoText.list.item.3'}
description={'share your feedback'}
defaultMessage={`Find your community of interest and {shareFeedback}.`}
values={{
shareFeedback:
<a href={`mailto:${CONTACT_COPY.FEEDBACK_EMAIL}`}>
{'share your feedback'}
</a>,
}}
/>,
};

View file

@ -0,0 +1,377 @@
import React from 'react';
import {defineMessages} from 'react-intl';
import {FormattedMessage} from 'gatsby-plugin-intl';
export const PAGE = defineMessages({
TILE: {
id: 'methodology.page.title.text',
defaultMessage: 'Data and Methodology',
description: 'methodology page title text',
},
HEADING: {
id: 'methodology.page.header.text',
defaultMessage: 'Methodology',
description: 'methodology page header text',
},
DESCRIPTION: {
id: 'methodology.page.paragraph.first',
defaultMessage: 'The methodology for identifying communities of focus is currently ' +
'in a draft, pre-decisional form that may change over time as more datasets become available.',
description: 'methodology page paragraph 1',
},
});
// Download Package
export const DOWNLOAD_FILE_SIZE = '143MB';
export const DOWNLOAD_LAST_UPDATED = '09/20/21';
export const VERSION_NUMBER = '0.1';
export const DOWNLOAD_ZIP_URL = [
process.env.GATSBY_DATA_ROOT_PATH,
process.env.GATSBY_DATA_PIPELINE_SCORE_PATH,
process.env.GATSBY_SCORE_DOWNLOAD_FILE_PATH,
].join('/');
export const DOWNLOAD_PACKAGE = defineMessages({
TITLE: {
id: 'downloadPacket.header.text',
defaultMessage: `Draft communities list v${VERSION_NUMBER} (${DOWNLOAD_FILE_SIZE})`,
description: 'download packet header text',
},
DESCRIPTION: {
id: 'downloadPacket.info.text',
defaultMessage: `The package includes draft v${VERSION_NUMBER} `+
` of the list of communities of focus (.csv and .xlsx) ` +
` and information about how to use the list (.pdf).`,
description: 'download packet info text',
},
LAST_UPDATED: {
id: 'downloadPacket.info.last.updated',
defaultMessage: `Last updated: ${DOWNLOAD_LAST_UPDATED} `,
description: 'download packet info last updated',
},
BUTTON_TEXT: {
id: 'downloadPacket.button.text',
defaultMessage: 'Download package',
description: 'download packet button text',
},
});
// Dataset section
export const DATASETS = defineMessages({
HEADING: {
id: 'datasetContainer.heading',
defaultMessage: 'Datasets used in methodology',
description: 'section heading of which datasets are used in cumulative score',
},
INFO: {
id: 'datasetContainer.info',
defaultMessage: 'The datasets come from a variety of sources and were selected' +
' based on relevance, availability, recency, and quality. The datasets seek to' +
' identify a range of human health, environmental, climate-related, and other' +
' cumulative impacts on communities.',
description: 'description of the dataset section',
},
ADDITIONAL_HEADING: {
id: 'datasetContainer.additional.heading',
defaultMessage: 'Additional Indicators',
description: 'additional indicators heading',
},
ADDITIONAL_INFO: {
id: 'datasetContainer.additional.info',
defaultMessage: 'These datasets provide additional information about each community.',
description: 'additional indicator info',
},
});
export const DATASET_CARD_LABELS = defineMessages({
RESOLUTION: {
id: 'datasetCard.dataResolution',
defaultMessage: 'Data resolution: ',
description: 'label associated with explaining the card',
},
SOURCE: {
id: 'datasetCard.dataSource',
defaultMessage: 'Data source: ',
description: 'label associated with explaining the card',
},
DATE_RANGE: {
id: 'datasetCard.dataDateRange',
defaultMessage: 'Data date range: ',
description: 'label associated with explaining the card',
},
});
export const INDICATORS = [
{
indicator: 'Area Median Income',
description: `Median income of the census block group calculated as a percent
of the metropolitan areas or state's median income.`,
dataResolution: `Census block group`,
dataSourceLabel: `Census's American Community Survey`,
dataSourceURL: `https://www.census.gov/programs-surveys/acs`,
dataDateRange: `2015-2019`,
},
{
indicator: 'Poverty',
description: `Percent of a block group's population in households where the household income` +
` is at or below 100% of the federal poverty level`,
dataResolution: `Census block group`,
dataSourceLabel: `Census's American Community Survey`,
dataSourceURL: `https://www.census.gov/programs-surveys/acs`,
dataDateRange: `2015-2019`,
},
{
indicator: 'Education, less than high school education',
description: `Percent of people ages 25 years or older in a block group whose
education level is less than a high school diploma.`,
dataResolution: `Census block group`,
dataSourceLabel: `Census's American Community Survey`,
dataSourceURL: `https://www.census.gov/programs-surveys/acs`,
dataDateRange: `2015-2019`,
},
];
export const ADDITIONAL_INDICATORS = [
{
indicator: 'Diabetes',
description: `People ages 18 years and older who report having ever been
told by a doctor, nurse, or other health professionals that they have
diabetes other than diabetes during pregnancy.`,
dataResolution: `Census tract`,
dataSourceLabel: `Centers for Disease Control and Prevention (CDC) PLACES`,
dataSourceURL: `https://www.cdc.gov/places/index.html`,
dataDateRange: `2016-2019`,
},
{
indicator: 'Asthma',
description: `Weighted number of respondents people who answer “yes” both
to both of the following questions: Have you ever been told by a doctor,
nurse, or other health professional that you have asthma? and the question
Do you still have asthma?`,
dataResolution: `Census tract`,
dataSourceLabel: `Centers for Disease Control and Prevention (CDC) PLACES`,
dataSourceURL: `https://www.cdc.gov/places/index.html`,
dataDateRange: `2016-2019`,
},
{
indicator: 'Heart disease',
description: `People ages 18 years and older who report ever having been told
by a doctor, nurse, or other health professionals that they had angina or
coronary heart disease.`,
dataResolution: `Census tract`,
dataSourceLabel: `Centers for Disease Control and Prevention (CDC) PLACES`,
dataSourceURL: `https://www.cdc.gov/places/index.html`,
dataDateRange: `2016-2019`,
},
{
indicator: 'Life expectancy',
description: `Estimated years of life expectancy.`,
dataResolution: `Census tract`,
dataSourceLabel: `Centers for Disease Control and Prevention (CDC)
US Small-area Life Expectancy Estimates Project`,
dataSourceURL: `https://www.cdc.gov/nchs/nvss/usaleep/usaleep.html#data`,
dataDateRange: `2010-2015`,
},
{
indicator: 'Traffic proximity and volume',
description: `Count of vehicles (average annual daily traffic) at major roads
within 500 meters, divided by distance in meters (not km).`,
dataResolution: `Census block group`,
dataSourceLabel: `Department of Transportation (DOT) traffic data`,
dataSourceURL: `https://www.fhwa.dot.gov/policyinformation/hpms/shapefiles.cfm`,
dataDateRange: `2017`,
},
{
indicator: 'FEMA Risk Index Expected Annual Loss Score',
description: `Average economic loss in dollars resulting from natural
hazards each year. It is calculated for each hazard type and quantifies
loss for relevant consequence types: buildings, people, and agriculture.`,
dataResolution: `Census tract`,
dataSourceLabel: `Federal Emergency Management Agency (FEMA)`,
dataSourceURL: `https://hazards.fema.gov/nri/expected-annual-loss`,
dataDateRange: `2014-2017`,
},
{
indicator: 'Energy burden',
description: `Average annual energy cost ($) divided by household income.`,
dataResolution: `Census tract`,
dataSourceLabel: `Department of Energy (DOE) LEAD Score`,
dataSourceURL: `https://www.energy.gov/eere/slsc/low-income-energy-affordability-data-lead-tool`,
dataDateRange: `2018`,
},
{
indicator: 'Housing cost burden',
description: `Households that are low income and spend more than 30% of their
income to housing costs.`,
dataResolution: `Census tract`,
dataSourceLabel: `Department of Housing & Urban Developments
(HUD) Comprehensive Housing Affordability Strategy dataset`,
dataSourceURL: `https://www.huduser.gov/portal/datasets/cp.html`,
dataDateRange: `2013-2017`,
},
{
indicator: 'Wastewater discharge',
description: `RSEI modeled Toxic Concentrations at stream segments within 500
meters, divided by distance in kilometers (km).`,
dataResolution: `Census block group`,
dataSourceLabel: `Environmental Protection Agency (EPA) Risk-Screening
Environmental Indicators (RSEI) Model`,
dataSourceURL: `https://www.epa.gov/rsei`,
dataDateRange: `2020`,
},
{
indicator: 'Lead paint',
description: `Percent of housing units built pre-1960, used as an
indicator of potential lead paint exposure in homes.`,
dataResolution: `Census block group`,
dataSourceLabel: `Census's American Community Survey`,
dataSourceURL: `https://www.census.gov/programs-surveys/acs`,
dataDateRange: `2015-2019`,
},
{
indicator: 'Diesel particulate matter',
description: `Mixture of particles that is part of diesel exhaust in the air.`,
dataResolution: `Census block group`,
dataSourceLabel: `Environmental Protection Agency (EPA) National Air Toxics Assessment (NATA)
`,
dataSourceURL: `https://www.epa.gov/national-air-toxics-assessment/2014-nata-assessment-results`,
dataDateRange: `5-year estimates, 2015-2019`,
},
{
indicator: 'PM2.5',
description: `Fine inhalable particles, with diameters that are generally
2.5 micrometers and smaller.`,
dataResolution: `Census block group`,
dataSourceLabel: `Environmental Protection Agency (EPA) Office of Air
and Radiation (OAR) fusion of model and monitor data`,
dataSourceURL: `https://www.epa.gov/aboutepa/about-office-air-and-radiation-oar`,
dataDateRange: `2017`,
},
];
// Methodology Steps:
export const METHODOLOGY_STEPS = defineMessages({
HEADING: {
id: 'methodology.steps.heading',
defaultMessage: `Methodology`,
description: 'heading of methodology section',
},
DESCRIPTION_1: {
id: 'methodology.steps.description.1',
defaultMessage: 'The methodology for identifying communities of focus is'+
' calculated at the census block group level. Census block geographical boundaries'+
' are determined by the U.S. Census Bureau once every ten years. This tool utilizes'+
' the census block boundaries from 2010.',
description: 'first description text ',
},
DESCRIPTION_2: {
id: 'methodology.steps.description.2',
defaultMessage: 'The following describes the process for identifying communities of focus.',
description: 'second description text',
},
STEP_1_HEADING: {
id: 'methodology.step.1.heading',
defaultMessage: `Gather datasets`,
description: 'first step heading',
},
STEP_1_INFO: {
id: 'methodology.step.1.info',
defaultMessage: `The methodology includes the following inputs that are equally weighted.`,
description: 'first step info',
},
STEP_1_A_HEADING: {
id: 'methodology.step.1.a.heading',
defaultMessage: `Percent of Area Median Income`,
description: 'step 1 a heading',
},
STEP_1_A_INFO_1: {
id: 'methodology.step.1.a.info.1',
defaultMessage: 'If a census block group is in a metropolitan area, this value is the'+
' median income of the census block group calculated as a percent of'+
' the metropolitan areas median income.',
description: 'step 1 a info 1',
},
STEP_1_A_INFO_2: {
id: 'methodology.step.1.a.info.2',
defaultMessage: 'If a census block group is not in a metropolitan area, this value is the'+
' median income of the census block group calculated as a percent of the states median'+
' income.',
description: 'step 1 a info 2',
},
STEP_1_B_HEADING: {
id: 'methodology.step.1.b.heading',
defaultMessage: `Percent of households below or at 100% of the federal poverty line`,
description: 'step 1 b heading',
},
STEP_1_C_HEADING: {
id: 'methodology.step.1.a.heading',
defaultMessage: `The high school degree achievement rate for adults 25 years and older`,
description: 'step 1 a heading',
},
STEP_1_C_INFO: {
id: 'methodology.step.1.c.info',
defaultMessage: 'The percent of individuals who are 25 or older who have received a high school degree.',
description: 'step 1 c info',
},
STEP_2_HEADING: {
id: 'methodology.step.2.heading',
defaultMessage: `Determine communites of focus`,
description: 'second step heading',
},
STEP_2_INFO: {
id: 'methodology.step.2.info',
defaultMessage: `Under the existing formula, a census block group will be considered a community of focus if:`,
description: 'second step info',
},
});
const FED_POVERTY_LINE_URL = 'https://www.census.gov/topics/income-poverty/poverty/guidance/poverty-measures.html';
// Copy that has links or other HTML tags in them
export const COMPLEX_METH_STEPS = {
STEP_2_B_INFO: <FormattedMessage
id={'methodology.steps.2.b.info'}
description={'Download the draft list of communities of focus and datasets used.'}
defaultMessage={`This is the percent of households in a state with a household income
below or at 100% of the {federalPovertyLine}. This federal poverty line is calculated
based on the composition of each household (e.g., based on household size), but it does not vary geographically.`}
values={{
federalPovertyLine:
<a href={FED_POVERTY_LINE_URL} target="_blank" rel="noreferrer">
federal poverty line
</a>,
}}
/>,
FORMULA: <FormattedMessage
id={'methodology.steps.2.formula'}
description={'Formala used to calculate communities of focus'}
defaultMessage={`{medianIncome} {or} {livingAtPovery} {and} {education}`}
values={{
medianIncome:
<p>
(The median income is less than 80% of the area median income
</p>,
or:
<p className={'flush'}>
OR
</p>,
livingAtPovery:
<p className={'flush'}>
households living in poverty (at or below 100% of the federal poverty level) is greater than 20%)
</p>,
and:
<p className={'flush'}>
AND
</p>,
education:
<p className={'flush'}>
The high school degree achievement rate for adults 25 years and older is greater than 95%
</p>,
}}
/>,
};

View file

@ -0,0 +1,488 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`rendering of the DatasetContainer checks if various text fields are visible 1`] = `
<DocumentFragment>
<section
class="usa-banner"
data-testid="govBanner"
>
<div
class="usa-accordion"
>
<header
class="usa-banner__header"
>
<div
class="usa-banner__inner"
>
<div
class="grid-col-auto"
>
<img
alt="U.S. flag"
class="usa-banner__header-flag"
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAMAAABBPP0LAAAAG1BMVEUdM7EeNLIeM7HgQCDaPh/bPh/bPx/////bPyBEby41AAAAUElEQVQI123MNw4CABDEwD3jC/9/MQ1BQrgeOSkIqYe2o2FZtthXgQLgbHVMZdlsfUQFQnHtjP1+8BUhBDKOqtmfot6ojqPzR7TjdU+f6vkED+IDPhTBcMAAAAAASUVORK5CYII="
/>
</div>
<div
class="grid-col-fill tablet:grid-col-auto"
>
<p
class="usa-banner__header-text"
>
An official website of the United States government
</p>
<p
aria-hidden="true"
class="usa-banner__header-action"
>
Heres how you know
</p>
</div>
<button
aria-controls="gov-banner"
aria-expanded="false"
class="usa-accordion__button usa-banner__button"
type="button"
>
<span
class="usa-banner__button-text"
>
Heres how you know
</span>
</button>
</div>
</header>
<div
class="usa-banner__content usa-accordion__content"
hidden=""
id="gov-banner"
>
<div
class="grid-row grid-gap-lg"
>
<div
class="usa-banner__guidance tablet:grid-col-6"
>
<img
alt=""
aria-hidden="true"
class="usa-banner__icon usa-media-block__img"
role="img"
src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjY0IiBoZWlnaHQ9IjY0IiB2aWV3Qm94PSIwIDAgNjQgNjQiPjx0aXRsZT5pY29uLWRvdC1nb3Y8L3RpdGxlPjxwYXRoIGZpbGw9IiMyMzc4QzMiIGZpbGwtcnVsZT0iZXZlbm9kZCIgZD0iTTMyIDBjMTcuNjczIDAgMzIgMTQuMzI3IDMyIDMyIDAgMTcuNjczLTE0LjMyNyAzMi0zMiAzMkMxNC4zMjcgNjQgMCA0OS42NzMgMCAzMiAwIDE0LjMyNyAxNC4zMjcgMCAzMiAwem0wIDEuMjA4QzE0Ljk5NCAxLjIwOCAxLjIwOCAxNC45OTQgMS4yMDggMzJTMTQuOTk0IDYyLjc5MiAzMiA2Mi43OTIgNjIuNzkyIDQ5LjAwNiA2Mi43OTIgMzIgNDkuMDA2IDEuMjA4IDMyIDEuMjA4em0xMC41OSAzOC44NThhLjg1Ny44NTcgMCAwIDEgLjg4Mi44MjJ2MS42NDJIMTguODg2di0xLjY0MmEuODU3Ljg1NyAwIDAgMSAuODgyLS44MjJINDIuNTl6TTI1LjQ0MyAyNy43NzR2OS44MjloMS42NDJ2LTkuODNoMy4yNzN2OS44M0gzMnYtOS44M2gzLjI3MnY5LjgzaDEuNjQzdi05LjgzaDMuMjcydjkuODNoLjc2YS44NTcuODU3IDAgMCAxIC44ODIuODIxdi44MjFoLTIxLjN2LS44MDlhLjg1Ny44NTcgMCAwIDEgLjg4LS44MmguNzYydi05Ljg0MmgzLjI3MnptNS43MzYtOC4xODhsMTIuMjkzIDQuOTE1djEuNjQyaC0xLjYzYS44NTcuODU3IDAgMCAxLS44ODIuODIySDIxLjQxYS44NTcuODU3IDAgMCAxLS44ODItLjgyMmgtMS42NDJ2LTEuNjQybDEyLjI5My00LjkxNXoiLz48L3N2Zz4="
/>
<div
class="usa-media-block__body"
>
<p>
<strong>
Official websites use .gov
</strong>
<br />
A
<strong>
.gov
</strong>
website belongs to an official government organization in the United States.
</p>
</div>
</div>
<div
class="usa-banner__guidance tablet:grid-col-6"
>
<img
alt=""
aria-hidden="true"
class="usa-banner__icon usa-media-block__img"
role="img"
src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjY0IiBoZWlnaHQ9IjY0IiB2aWV3Qm94PSIwIDAgNjQgNjQiPjx0aXRsZT5pY29uLWh0dHBzPC90aXRsZT48cGF0aCBmaWxsPSIjNzE5RjJBIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0zMiAwYzE3LjY3MyAwIDMyIDE0LjMyNyAzMiAzMiAwIDE3LjY3My0xNC4zMjcgMzItMzIgMzJDMTQuMzI3IDY0IDAgNDkuNjczIDAgMzIgMCAxNC4zMjcgMTQuMzI3IDAgMzIgMHptMCAxLjIwOEMxNC45OTQgMS4yMDggMS4yMDggMTQuOTk0IDEuMjA4IDMyUzE0Ljk5NCA2Mi43OTIgMzIgNjIuNzkyIDYyLjc5MiA0OS4wMDYgNjIuNzkyIDMyIDQ5LjAwNiAxLjIwOCAzMiAxLjIwOHptMCAxOC44ODZhNy4yNDUgNy4yNDUgMCAwIDEgNy4yNDUgNy4yNDV2My4xMDNoLjUyYy44NiAwIDEuNTU3LjY5OCAxLjU1NyAxLjU1OHY5LjMyMmMwIC44Ni0uNjk3IDEuNTU4LTEuNTU3IDEuNTU4aC0xNS41M2MtLjg2IDAtMS41NTctLjY5Ny0xLjU1Ny0xLjU1OFYzMmMwLS44Ni42OTctMS41NTggMS41NTctMS41NThoLjUyVjI3LjM0QTcuMjQ1IDcuMjQ1IDAgMCAxIDMyIDIwLjA5NHptMCAzLjEwM2E0LjE0MiA0LjE0MiAwIDAgMC00LjE0MiA0LjE0MnYzLjEwM2g4LjI4NFYyNy4zNEE0LjE0MiA0LjE0MiAwIDAgMCAzMiAyMy4xOTd6Ii8+PC9zdmc+"
/>
<div
class="usa-media-block__body"
>
<p>
<strong>
Secure .gov websites use HTTPS
</strong>
<br />
A
<strong>
lock (
<span
class="icon-lock"
>
<img
alt="lock"
class="usa-banner__lock-image"
role="img"
src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjUyIiBoZWlnaHQ9IjY0IiB2aWV3Qm94PSIwIDAgNTIgNjQiPjx0aXRsZT5sb2NrPC90aXRsZT48cGF0aCBmaWxsPSIjMUIxQjFCIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0yNiAwYzEwLjQ5MyAwIDE5IDguNTA3IDE5IDE5djloM2E0IDQgMCAwIDEgNCA0djI4YTQgNCAwIDAgMS00IDRINGE0IDQgMCAwIDEtNC00VjMyYTQgNCAwIDAgMSA0LTRoM3YtOUM3IDguNTA3IDE1LjUwNyAwIDI2IDB6bTAgOGMtNS45NzkgMC0xMC44NDMgNC43Ny0xMC45OTYgMTAuNzEyTDE1IDE5djloMjJ2LTljMC02LjA3NS00LjkyNS0xMS0xMS0xMXoiLz48L3N2Zz4="
title="Lock"
/>
</span>
)
</strong>
or
<strong>
https://
</strong>
means youve safely connected to the .gov website. Share sensitive information only on official, secure websites.
</p>
</div>
</div>
</div>
</div>
</div>
</section>
<header
class="usa-header usa-header--basic usa-header j40-header"
data-testid="header"
role="banner"
>
<div
class="usa-nav-container"
>
<div
class="usa-navbar"
>
<div
class="usa-logo"
>
<img
alt="Climate and Economic Justice Screening Tool"
class="j40-sitelogo"
src="test-file-stub"
/>
<span
class="usa-logo__text j40-title"
>
<span
class="j40-title-line1"
>
Climate and Economic Justice
</span>
<br />
<span
class="j40-title-line2"
>
Screening Tool
</span>
<span
class="usa-tag j40"
data-testid="tag"
>
Beta
</span>
</span>
</div>
<button
class="usa-menu-btn"
data-testid="navMenuButton"
type="button"
>
Menu
</button>
</div>
<nav
class="usa-nav j40-header"
>
<button
class="usa-nav__close"
data-testid="navCloseButton"
type="button"
>
<img
alt="close"
src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjY0IiBoZWlnaHQ9IjY0IiB2aWV3Qm94PSIwIDAgNjQgNjQiPjx0aXRsZT5jbG9zZTwvdGl0bGU+PHBhdGggZmlsbD0iIzU2NUM2NSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNTcuMDQyIDEuMTVsNS44MDkgNS44MDhhNCA0IDAgMCAxIDAgNS42NTdMNDMuNDY1IDMybDE5LjM4NiAxOS4zODVhNCA0IDAgMCAxIDAgNS42NTdsLTUuODA5IDUuODA5YTQgNCAwIDAgMS01LjY1NyAwTDMyIDQzLjQ2NSAxMi42MTUgNjIuODUxYTQgNCAwIDAgMS01LjY1NyAwbC01LjgwOS01LjgwOWE0IDQgMCAwIDEgMC01LjY1N0wyMC41MzUgMzIgMS4xNDkgMTIuNjE1YTQgNCAwIDAgMSAwLTUuNjU3bDUuODA5LTUuODA5YTQgNCAwIDAgMSA1LjY1NyAwTDMyIDIwLjUzNSA1MS4zODUgMS4xNDlhNCA0IDAgMCAxIDUuNjU3IDB6Ii8+PC9zdmc+"
/>
</button>
<ul
class="usa-nav__primary usa-accordion"
>
<li
class="usa-nav__primary-item"
>
<a
class="j40-header"
data-cy="nav-link-about"
href="/en/"
>
About
</a>
</li>
<li
class="usa-nav__primary-item"
>
<a
class="j40-header"
data-cy="nav-link-explore"
href="/en/cejst"
>
Explore the tool
</a>
</li>
<li
class="usa-nav__primary-item"
>
<a
class="j40-header"
data-cy="nav-link-methodology"
href="/en/methodology"
>
Data & methodology
</a>
</li>
<li
class="usa-nav__primary-item"
>
<a
class="j40-header"
data-cy="nav-link-contact"
href="/en/contact"
>
Contact
</a>
</li>
</ul>
</nav>
</div>
</header>
<main
id="main-content"
>
<div
class="grid-container-desktop-lg"
data-testid="gridContainer"
>
<div>
<div
class="usa-alert usa-alert--info j40-sitealert"
data-testid="alert"
>
<div
class="usa-alert__body"
>
<p
class="usa-alert__text"
>
<span
class="j40-sitealert-title"
>
Public beta
</span>
<span
class="j40-sitealert-body"
>
— This website may be continuously updated
</span>
<br />
</p>
</div>
</div>
</div>
</div>
<div
class="grid-container-desktop-lg"
data-testid="gridContainer"
>
<div
class="grid-row"
data-testid="grid"
>
<div
class="grid-col"
data-testid="grid"
>
<h1>
Contact
</h1>
<h2>
Email us
</h2>
<p>
For general feedback, email
<a
href="mailto:screeningtool.feedback@usds.gov"
>
screeningtool.feedback@usds.gov
</a>
</p>
</div>
</div>
</div>
</main>
<footer
class="j40-footer"
>
<div
class="usa-footer__primary-section pb"
>
<div
class="grid-container-desktop-lg"
data-testid="gridContainer"
>
<div
class="grid-row grid-gap-4 padding-bottom-6 tablet-lg:grid-col4"
>
<div
class="mobile-lg:grid-col-12 desktop:grid-col-4"
>
<section
class="usa-footer__primary-content"
>
<h4
class="padding-top-1 padding-bottom-0"
>
Contact
</h4>
<ul
class="usa-list usa-list--unstyled padding-bottom-4"
>
<li
class="usa-footer__secondary-link"
>
<address
class="usa-footer__address j40-footer-address"
>
<div
class="usa-footer__contact-info grid-row grid-gap"
>
<div
class="grid-col-auto"
>
Council on Environmental Quality
</div>
<div
class="grid-col-auto"
>
730 Jackson Pl NW
</div>
<div
class="grid-col-auto"
>
Washington, D.C. 20506
</div>
<div
class="grid-col-auto"
>
(202) 395-5750
</div>
</div>
</address>
</li>
</ul>
</section>
</div>
<div
class="mobile-lg:grid-col-12 desktop:grid-col-4"
>
<section
class="usa-footer__primary-content"
>
<h4
class="padding-top-1 padding-bottom-0"
>
More information
</h4>
<ul
class="usa-list usa-list--unstyled padding-bottom-4"
>
<li
class="usa-footer__secondary-link"
>
<a
class="footer-link-first-child"
href="https://www.whitehouse.gov/"
rel="noreferrer"
target="_blank"
>
Whitehouse.gov
</a>
</li>
<li
class="usa-footer__secondary-link"
>
<a
href="https://www.whitehouse.gov/ceq/foia"
rel="noreferrer"
target="_blank"
>
Freedom of Information Act (FOIA)
</a>
</li>
<li
class="usa-footer__secondary-link"
>
<a
href="https://www.whitehouse.gov/privacy/"
rel="noreferrer"
target="_blank"
>
Privacy Policy
</a>
</li>
</ul>
</section>
</div>
<div
class="mobile-lg:grid-col-12 desktop:grid-col-4"
>
<section
class="usa-footer__primary-content"
>
<h4
class="padding-top-1 padding-bottom-0"
>
Have a question about government services?
</h4>
<ul
class="usa-list usa-list--unstyled padding-bottom-4"
>
<li
class="usa-footer__secondary-link"
>
<a
class="footer-link-first-child"
href="https://www.usa.gov/"
>
Find a contact at USA.gov
</a>
</li>
</ul>
</section>
</div>
</div>
</div>
</div>
<div
class="usa-footer__secondary-section"
>
<div
class="grid-container-desktop-lg"
data-testid="gridContainer"
>
<div
class="usa-footer__logo grid-row mobile-lg:grid-col-6 mobile-lg:grid-gap-2 j40-footer-logo"
data-testid="footerLogo"
>
<div
class="mobile-lg:grid-col-auto"
>
<img
alt="Whitehouse logo"
class="usa-footer__logo-img"
src="test-file-stub"
/>
</div>
<div
class="mobile-lg:grid-col-auto"
>
<h5>
Council on Environmental Quality
</h5>
</div>
</div>
</div>
</div>
</footer>
</DocumentFragment>
`;

View file

@ -0,0 +1,801 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`rendering of the DatasetContainer checks if various text fields are visible 1`] = `
<DocumentFragment>
<section
class="usa-banner"
data-testid="govBanner"
>
<div
class="usa-accordion"
>
<header
class="usa-banner__header"
>
<div
class="usa-banner__inner"
>
<div
class="grid-col-auto"
>
<img
alt="U.S. flag"
class="usa-banner__header-flag"
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAMAAABBPP0LAAAAG1BMVEUdM7EeNLIeM7HgQCDaPh/bPh/bPx/////bPyBEby41AAAAUElEQVQI123MNw4CABDEwD3jC/9/MQ1BQrgeOSkIqYe2o2FZtthXgQLgbHVMZdlsfUQFQnHtjP1+8BUhBDKOqtmfot6ojqPzR7TjdU+f6vkED+IDPhTBcMAAAAAASUVORK5CYII="
/>
</div>
<div
class="grid-col-fill tablet:grid-col-auto"
>
<p
class="usa-banner__header-text"
>
An official website of the United States government
</p>
<p
aria-hidden="true"
class="usa-banner__header-action"
>
Heres how you know
</p>
</div>
<button
aria-controls="gov-banner"
aria-expanded="false"
class="usa-accordion__button usa-banner__button"
type="button"
>
<span
class="usa-banner__button-text"
>
Heres how you know
</span>
</button>
</div>
</header>
<div
class="usa-banner__content usa-accordion__content"
hidden=""
id="gov-banner"
>
<div
class="grid-row grid-gap-lg"
>
<div
class="usa-banner__guidance tablet:grid-col-6"
>
<img
alt=""
aria-hidden="true"
class="usa-banner__icon usa-media-block__img"
role="img"
src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjY0IiBoZWlnaHQ9IjY0IiB2aWV3Qm94PSIwIDAgNjQgNjQiPjx0aXRsZT5pY29uLWRvdC1nb3Y8L3RpdGxlPjxwYXRoIGZpbGw9IiMyMzc4QzMiIGZpbGwtcnVsZT0iZXZlbm9kZCIgZD0iTTMyIDBjMTcuNjczIDAgMzIgMTQuMzI3IDMyIDMyIDAgMTcuNjczLTE0LjMyNyAzMi0zMiAzMkMxNC4zMjcgNjQgMCA0OS42NzMgMCAzMiAwIDE0LjMyNyAxNC4zMjcgMCAzMiAwem0wIDEuMjA4QzE0Ljk5NCAxLjIwOCAxLjIwOCAxNC45OTQgMS4yMDggMzJTMTQuOTk0IDYyLjc5MiAzMiA2Mi43OTIgNjIuNzkyIDQ5LjAwNiA2Mi43OTIgMzIgNDkuMDA2IDEuMjA4IDMyIDEuMjA4em0xMC41OSAzOC44NThhLjg1Ny44NTcgMCAwIDEgLjg4Mi44MjJ2MS42NDJIMTguODg2di0xLjY0MmEuODU3Ljg1NyAwIDAgMSAuODgyLS44MjJINDIuNTl6TTI1LjQ0MyAyNy43NzR2OS44MjloMS42NDJ2LTkuODNoMy4yNzN2OS44M0gzMnYtOS44M2gzLjI3MnY5LjgzaDEuNjQzdi05LjgzaDMuMjcydjkuODNoLjc2YS44NTcuODU3IDAgMCAxIC44ODIuODIxdi44MjFoLTIxLjN2LS44MDlhLjg1Ny44NTcgMCAwIDEgLjg4LS44MmguNzYydi05Ljg0MmgzLjI3MnptNS43MzYtOC4xODhsMTIuMjkzIDQuOTE1djEuNjQyaC0xLjYzYS44NTcuODU3IDAgMCAxLS44ODIuODIySDIxLjQxYS44NTcuODU3IDAgMCAxLS44ODItLjgyMmgtMS42NDJ2LTEuNjQybDEyLjI5My00LjkxNXoiLz48L3N2Zz4="
/>
<div
class="usa-media-block__body"
>
<p>
<strong>
Official websites use .gov
</strong>
<br />
A
<strong>
.gov
</strong>
website belongs to an official government organization in the United States.
</p>
</div>
</div>
<div
class="usa-banner__guidance tablet:grid-col-6"
>
<img
alt=""
aria-hidden="true"
class="usa-banner__icon usa-media-block__img"
role="img"
src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjY0IiBoZWlnaHQ9IjY0IiB2aWV3Qm94PSIwIDAgNjQgNjQiPjx0aXRsZT5pY29uLWh0dHBzPC90aXRsZT48cGF0aCBmaWxsPSIjNzE5RjJBIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0zMiAwYzE3LjY3MyAwIDMyIDE0LjMyNyAzMiAzMiAwIDE3LjY3My0xNC4zMjcgMzItMzIgMzJDMTQuMzI3IDY0IDAgNDkuNjczIDAgMzIgMCAxNC4zMjcgMTQuMzI3IDAgMzIgMHptMCAxLjIwOEMxNC45OTQgMS4yMDggMS4yMDggMTQuOTk0IDEuMjA4IDMyUzE0Ljk5NCA2Mi43OTIgMzIgNjIuNzkyIDYyLjc5MiA0OS4wMDYgNjIuNzkyIDMyIDQ5LjAwNiAxLjIwOCAzMiAxLjIwOHptMCAxOC44ODZhNy4yNDUgNy4yNDUgMCAwIDEgNy4yNDUgNy4yNDV2My4xMDNoLjUyYy44NiAwIDEuNTU3LjY5OCAxLjU1NyAxLjU1OHY5LjMyMmMwIC44Ni0uNjk3IDEuNTU4LTEuNTU3IDEuNTU4aC0xNS41M2MtLjg2IDAtMS41NTctLjY5Ny0xLjU1Ny0xLjU1OFYzMmMwLS44Ni42OTctMS41NTggMS41NTctMS41NThoLjUyVjI3LjM0QTcuMjQ1IDcuMjQ1IDAgMCAxIDMyIDIwLjA5NHptMCAzLjEwM2E0LjE0MiA0LjE0MiAwIDAgMC00LjE0MiA0LjE0MnYzLjEwM2g4LjI4NFYyNy4zNEE0LjE0MiA0LjE0MiAwIDAgMCAzMiAyMy4xOTd6Ii8+PC9zdmc+"
/>
<div
class="usa-media-block__body"
>
<p>
<strong>
Secure .gov websites use HTTPS
</strong>
<br />
A
<strong>
lock (
<span
class="icon-lock"
>
<img
alt="lock"
class="usa-banner__lock-image"
role="img"
src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjUyIiBoZWlnaHQ9IjY0IiB2aWV3Qm94PSIwIDAgNTIgNjQiPjx0aXRsZT5sb2NrPC90aXRsZT48cGF0aCBmaWxsPSIjMUIxQjFCIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0yNiAwYzEwLjQ5MyAwIDE5IDguNTA3IDE5IDE5djloM2E0IDQgMCAwIDEgNCA0djI4YTQgNCAwIDAgMS00IDRINGE0IDQgMCAwIDEtNC00VjMyYTQgNCAwIDAgMSA0LTRoM3YtOUM3IDguNTA3IDE1LjUwNyAwIDI2IDB6bTAgOGMtNS45NzkgMC0xMC44NDMgNC43Ny0xMC45OTYgMTAuNzEyTDE1IDE5djloMjJ2LTljMC02LjA3NS00LjkyNS0xMS0xMS0xMXoiLz48L3N2Zz4="
title="Lock"
/>
</span>
)
</strong>
or
<strong>
https://
</strong>
means youve safely connected to the .gov website. Share sensitive information only on official, secure websites.
</p>
</div>
</div>
</div>
</div>
</div>
</section>
<header
class="usa-header usa-header--basic usa-header j40-header"
data-testid="header"
role="banner"
>
<div
class="usa-nav-container"
>
<div
class="usa-navbar"
>
<div
class="usa-logo"
>
<img
alt="Climate and Economic Justice Screening Tool"
class="j40-sitelogo"
src="test-file-stub"
/>
<span
class="usa-logo__text j40-title"
>
<span
class="j40-title-line1"
>
Climate and Economic Justice
</span>
<br />
<span
class="j40-title-line2"
>
Screening Tool
</span>
<span
class="usa-tag j40"
data-testid="tag"
>
Beta
</span>
</span>
</div>
<button
class="usa-menu-btn"
data-testid="navMenuButton"
type="button"
>
Menu
</button>
</div>
<nav
class="usa-nav j40-header"
>
<button
class="usa-nav__close"
data-testid="navCloseButton"
type="button"
>
<img
alt="close"
src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjY0IiBoZWlnaHQ9IjY0IiB2aWV3Qm94PSIwIDAgNjQgNjQiPjx0aXRsZT5jbG9zZTwvdGl0bGU+PHBhdGggZmlsbD0iIzU2NUM2NSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNNTcuMDQyIDEuMTVsNS44MDkgNS44MDhhNCA0IDAgMCAxIDAgNS42NTdMNDMuNDY1IDMybDE5LjM4NiAxOS4zODVhNCA0IDAgMCAxIDAgNS42NTdsLTUuODA5IDUuODA5YTQgNCAwIDAgMS01LjY1NyAwTDMyIDQzLjQ2NSAxMi42MTUgNjIuODUxYTQgNCAwIDAgMS01LjY1NyAwbC01LjgwOS01LjgwOWE0IDQgMCAwIDEgMC01LjY1N0wyMC41MzUgMzIgMS4xNDkgMTIuNjE1YTQgNCAwIDAgMSAwLTUuNjU3bDUuODA5LTUuODA5YTQgNCAwIDAgMSA1LjY1NyAwTDMyIDIwLjUzNSA1MS4zODUgMS4xNDlhNCA0IDAgMCAxIDUuNjU3IDB6Ii8+PC9zdmc+"
/>
</button>
<ul
class="usa-nav__primary usa-accordion"
>
<li
class="usa-nav__primary-item"
>
<a
class="j40-header"
data-cy="nav-link-about"
href="/en/"
>
About
</a>
</li>
<li
class="usa-nav__primary-item"
>
<a
class="j40-header"
data-cy="nav-link-explore"
href="/en/cejst"
>
Explore the tool
</a>
</li>
<li
class="usa-nav__primary-item"
>
<a
class="j40-header"
data-cy="nav-link-methodology"
href="/en/methodology"
>
Data & methodology
</a>
</li>
<li
class="usa-nav__primary-item"
>
<a
class="j40-header"
data-cy="nav-link-contact"
href="/en/contact"
>
Contact
</a>
</li>
</ul>
</nav>
</div>
</header>
<main
id="main-content"
>
<div
class="grid-container-desktop-lg"
data-testid="gridContainer"
>
<div>
<div
class="usa-alert usa-alert--info j40-sitealert"
data-testid="alert"
>
<div
class="usa-alert__body"
>
<p
class="usa-alert__text"
>
<span
class="j40-sitealert-title"
>
Public beta
</span>
<span
class="j40-sitealert-body"
>
— This website may be continuously updated
</span>
<br />
</p>
</div>
</div>
</div>
</div>
<div
class="grid-container-desktop-lg"
data-testid="gridContainer"
>
<div
class="grid-row grid-gap-lg j40-aboutcard-container "
data-testid="grid"
>
<div
class="grid-gap-lg tablet:grid-col"
data-testid="grid"
>
<div
class="grid-row j40-aboutcard-lg-card"
data-testid="grid"
>
<div
class="tablet:grid-col-3 j40-aboutpage-image-container"
data-testid="grid"
>
<img
alt="The screening tool"
class="j40-aboutcard-image"
src="test-file-stub"
/>
</div>
<div
class="tablet:grid-col-9"
data-testid="grid"
>
<div
class="grid-row"
data-testid="grid"
>
<h2
data-cy="about-screen-tool-heading"
>
The screening tool
</h2>
<p>
On January 27, 2021, President Biden directed the Council on Environmental Quality (CEQ) to create a climate and economic justice screening tool. The purpose of the tool is to help Federal agencies identify disadvantaged communities and provide socioeconomic, environmental, and climate information and data to inform decisions that may affect these communities. The tool identifies disadvantaged communities as communities of focus through publicly available, nationally consistent, high-quality data.
</p>
<p>
The current version of the tool is in a public beta form and will be updated based on feedback from the public.
</p>
</div>
</div>
</div>
</div>
</div>
<div
class="grid-row grid-gap-lg j40-aboutcard-container "
data-testid="grid"
>
<div
class="grid-gap-lg tablet:grid-col"
data-testid="grid"
>
<div
class="grid-row j40-aboutcard-lg-card"
data-testid="grid"
>
<div
class="tablet:grid-col-3 j40-aboutpage-image-container"
data-testid="grid"
>
<img
alt="The Justice40 Initiative"
class="j40-aboutcard-image"
src="test-file-stub"
/>
</div>
<div
class="tablet:grid-col-9"
data-testid="grid"
>
<div
class="grid-row"
data-testid="grid"
>
<h2
data-cy="about-screen-tool-heading"
>
The Justice40 Initiative
</h2>
<p>
The tool will provide important information for the Justice40 Initiative. The goal of the Justice40 Initiative is to provide 40-percent of the overall benefits of certain federal programs in seven key areas to disadvantaged communities. These seven key areas are: climate change, clean energy and energy efficiency, clean transit, affordable and sustainable housing, training and workforce development, the remediation and reduction of legacy pollution, and the development of critical clean water infrastructure.
</p>
<p>
Read more about the Justice40 Initiative in President Bidens
<a
href="https://www.whitehouse.gov/briefing-room/presidential-actions/2021/01/27/executive-order-on-tackling-the-climate-crisis-at-home-and-abroad/"
rel="noreferrer"
target="_blank"
>
Executive Order 14008 on Tackling the Climate Crisis at Home and Abroad
</a>
</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class="j40-main-grid-blue-bk "
>
<div
class="grid-container-desktop-lg"
data-testid="gridContainer"
>
<h2>
How to get started
</h2>
<div
class="grid-row grid-gap-lg j40-aboutcard-container "
data-testid="grid"
>
<div
class="grid-gap-lg tablet:grid-col"
data-testid="grid"
>
<div
class="grid-row j40-aboutcard-sm-card"
data-testid="grid"
>
<div
class="tablet:grid-col-2 j40-aboutpage-image-container"
data-testid="grid"
>
<img
alt="Federal program managers"
class="j40-aboutcard-image"
src="test-file-stub"
/>
</div>
<div
class="tablet:grid-col-9"
data-testid="grid"
>
<div
class="grid-row"
data-testid="grid"
>
<h3>
Federal program managers
</h3>
<p>
Download the screening tools draft list of communities of focus. Explore data that may be useful to your program, and provide feedback on the tool.
</p>
<div
class="j40-aboutcard-sm-link"
>
<a
href="/en/methodology"
>
Go to data & methodology
</a>
</div>
</div>
</div>
<div
class="grid-col-1"
data-testid="grid"
>
</div>
</div>
</div>
<div
class="grid-gap-lg tablet:grid-col"
data-testid="grid"
>
<div
class="grid-row j40-aboutcard-sm-card"
data-testid="grid"
>
<div
class="tablet:grid-col-2 j40-aboutpage-image-container"
data-testid="grid"
>
<img
alt="Community members"
class="j40-aboutcard-image"
src="test-file-stub"
/>
</div>
<div
class="tablet:grid-col-9"
data-testid="grid"
>
<div
class="grid-row"
data-testid="grid"
>
<h3>
Community members
</h3>
<p>
Explore data about communities of focus in your area, and help provide feedback on the tool.
</p>
<div
class="j40-aboutcard-sm-link"
>
<a
href="/en/cejst"
>
Explore the tool
</a>
</div>
</div>
</div>
<div
class="grid-col-1"
data-testid="grid"
>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class="grid-container-desktop-lg"
data-testid="gridContainer"
>
<h2>
How to get started
</h2>
<div
class="grid-row grid-gap-lg j40-aboutcard-container "
data-testid="grid"
>
<div
class="grid-gap-lg tablet:grid-col"
data-testid="grid"
>
<div
class="grid-row j40-aboutcard-sm-card"
data-testid="grid"
>
<div
class="tablet:grid-col-2 j40-aboutpage-image-container"
data-testid="grid"
>
<img
alt="Send feedback"
class="j40-aboutcard-image"
src="test-file-stub"
/>
</div>
<div
class="tablet:grid-col-9"
data-testid="grid"
>
<div
class="grid-row"
data-testid="grid"
>
<h3>
Send feedback
</h3>
<p>
Have ideas about how this tool can be improved to better reflect the on-the-ground experiences of your community?
</p>
<div
class="j40-aboutcard-sm-link"
>
<a
class="j40-aboutcard-link"
href="mailto:screeningtool.feedback@usds.gov"
>
Email: screeningtool.feedback@usds.gov
</a>
</div>
</div>
</div>
<div
class="grid-col-1"
data-testid="grid"
>
</div>
</div>
</div>
<div
class="grid-gap-lg tablet:grid-col"
data-testid="grid"
>
<div
class="grid-row j40-aboutcard-sm-card"
data-testid="grid"
>
<div
class="tablet:grid-col-2 j40-aboutpage-image-container"
data-testid="grid"
>
<img
alt="Send feedback"
class="j40-aboutcard-image"
src="test-file-stub"
/>
</div>
<div
class="tablet:grid-col-9"
data-testid="grid"
>
<div
class="grid-row"
data-testid="grid"
>
<h3>
Send feedback
</h3>
<p>
The screening tools code is open source, which means it is available for the public to view and contribute to. Anyone can view and contribute on GitHub.
</p>
<div
class="j40-aboutcard-sm-link"
>
<a
class="j40-aboutcard-link"
href="https://github.com/usds/justice40-tool"
rel="noreferrer"
target="_blank"
>
Check it out on GitHub
</a>
</div>
</div>
</div>
<div
class="grid-col-1"
data-testid="grid"
>
</div>
</div>
</div>
</div>
</div>
</main>
<footer
class="j40-footer"
>
<div
class="usa-footer__primary-section pb"
>
<div
class="grid-container-desktop-lg"
data-testid="gridContainer"
>
<div
class="grid-row grid-gap-4 padding-bottom-6 tablet-lg:grid-col4"
>
<div
class="mobile-lg:grid-col-12 desktop:grid-col-4"
>
<section
class="usa-footer__primary-content"
>
<h4
class="padding-top-1 padding-bottom-0"
>
Contact
</h4>
<ul
class="usa-list usa-list--unstyled padding-bottom-4"
>
<li
class="usa-footer__secondary-link"
>
<address
class="usa-footer__address j40-footer-address"
>
<div
class="usa-footer__contact-info grid-row grid-gap"
>
<div
class="grid-col-auto"
>
Council on Environmental Quality
</div>
<div
class="grid-col-auto"
>
730 Jackson Pl NW
</div>
<div
class="grid-col-auto"
>
Washington, D.C. 20506
</div>
<div
class="grid-col-auto"
>
(202) 395-5750
</div>
</div>
</address>
</li>
</ul>
</section>
</div>
<div
class="mobile-lg:grid-col-12 desktop:grid-col-4"
>
<section
class="usa-footer__primary-content"
>
<h4
class="padding-top-1 padding-bottom-0"
>
More information
</h4>
<ul
class="usa-list usa-list--unstyled padding-bottom-4"
>
<li
class="usa-footer__secondary-link"
>
<a
class="footer-link-first-child"
href="https://www.whitehouse.gov/"
rel="noreferrer"
target="_blank"
>
Whitehouse.gov
</a>
</li>
<li
class="usa-footer__secondary-link"
>
<a
href="https://www.whitehouse.gov/ceq/foia"
rel="noreferrer"
target="_blank"
>
Freedom of Information Act (FOIA)
</a>
</li>
<li
class="usa-footer__secondary-link"
>
<a
href="https://www.whitehouse.gov/privacy/"
rel="noreferrer"
target="_blank"
>
Privacy Policy
</a>
</li>
</ul>
</section>
</div>
<div
class="mobile-lg:grid-col-12 desktop:grid-col-4"
>
<section
class="usa-footer__primary-content"
>
<h4
class="padding-top-1 padding-bottom-0"
>
Have a question about government services?
</h4>
<ul
class="usa-list usa-list--unstyled padding-bottom-4"
>
<li
class="usa-footer__secondary-link"
>
<a
class="footer-link-first-child"
href="https://www.usa.gov/"
>
Find a contact at USA.gov
</a>
</li>
</ul>
</section>
</div>
</div>
</div>
</div>
<div
class="usa-footer__secondary-section"
>
<div
class="grid-container-desktop-lg"
data-testid="gridContainer"
>
<div
class="usa-footer__logo grid-row mobile-lg:grid-col-6 mobile-lg:grid-gap-2 j40-footer-logo"
data-testid="footerLogo"
>
<div
class="mobile-lg:grid-col-auto"
>
<img
alt="Whitehouse logo"
class="usa-footer__logo-img"
src="test-file-stub"
/>
</div>
<div
class="mobile-lg:grid-col-auto"
>
<h5>
Council on Environmental Quality
</h5>
</div>
</div>
</div>
</div>
</footer>
</DocumentFragment>
`;

File diff suppressed because it is too large Load diff

View file

@ -1,5 +1,4 @@
import React from 'react';
import {defineMessages} from 'react-intl';
import {Link} from 'gatsby-plugin-intl';
import {useIntl} from 'gatsby-plugin-intl';
import {Grid} from '@trussworks/react-uswds';
@ -11,6 +10,8 @@ import Layout from '../components/layout';
import MapWrapper from '../components/MapWrapper';
import MapLegend from '../components/MapLegend';
import * as EXPLORE_COPY from '../data/copy/explore';
interface IMapPageProps {
location: Location;
}
@ -18,28 +19,16 @@ interface IMapPageProps {
const CEJSTPage = ({location}: IMapPageProps) => {
// We temporarily removed MapControls, which would enable you to `setFeatures` also, for now
// We will bring back later when we have interactive controls.
const intl = useIntl();
const messages = defineMessages({
exploreToolTitleText: {
id: 'exploreTool.title.text',
defaultMessage: 'Explore the tool',
description: 'explore the tool title text',
},
exploreToolHeadingText: {
id: 'exploreTool.heading.text',
defaultMessage: 'Explore the tool',
description: 'explore the tool heading text',
},
});
return (<Layout location={location} title={intl.formatMessage(messages.exploreToolTitleText)}>
return (<Layout location={location} title={intl.formatMessage(EXPLORE_COPY.PAGE_INTRO.PAGE_TILE)}>
<J40MainGridContainer>
<AlertWrapper showBetaAlert={true} showLimitedDataAlert={false}/>
</J40MainGridContainer>
<J40MainGridContainer>
<h1>{intl.formatMessage(messages.exploreToolTitleText)}</h1>
<h1>{intl.formatMessage(EXPLORE_COPY.PAGE_INTRO.PAGE_HEADING)}</h1>
<Grid row className={'j40-mb-5'}>
<Grid col={12} tablet={{col: 6}}>
<section>

View file

@ -0,0 +1,16 @@
import * as React from 'react';
import {render} from '@testing-library/react';
import {LocalizedComponent} from '../test/testHelpers';
import Contact from './contact';
describe('rendering of the DatasetContainer', () => {
const {asFragment} = render(
<LocalizedComponent>
<Contact location={window.location}/>
</LocalizedComponent>,
);
it('checks if various text fields are visible', () => {
expect(asFragment()).toMatchSnapshot();
});
});

View file

@ -1,20 +1,22 @@
import * as React from 'react';
import {Grid} from '@trussworks/react-uswds';
import {FormattedMessage} from 'gatsby-plugin-intl';
import {useIntl, FormattedMessage} from 'gatsby-plugin-intl';
import AlertWrapper from '../components/AlertWrapper';
import J40MainGridContainer from '../components/J40MainGridContainer';
import Layout from '../components/layout';
interface ContactPageProps {
import * as CONTACT_COPY from '../data/copy/contact';
interface IContactPageProps {
location: Location;
}
const ContactPage = ({location}: ContactPageProps) => {
const generalEmail = 'screeningtool.feedback@usds.gov';
const ContactPage = ({location}: IContactPageProps) => {
const intl = useIntl();
return (
<Layout location={location} title={'Contact'}>
<Layout location={location} title={intl.formatMessage(CONTACT_COPY.PAGE_INTRO.PAGE_TILE)}>
<J40MainGridContainer>
<AlertWrapper showBetaAlert={true} showLimitedDataAlert={false}/>
@ -24,25 +26,19 @@ const ContactPage = ({location}: ContactPageProps) => {
<Grid row>
<Grid col>
<h1>
<FormattedMessage
id={'contact.pageheader'}
description={'H2 header for contact page'}
defaultMessage={'Contact'}/>
{intl.formatMessage(CONTACT_COPY.PAGE_INTRO.PAGE_HEADING)}
</h1>
<h2>
<FormattedMessage
id={'contact.sectionheader'}
description={'Heading for page to allow users to contact project maintainers'}
defaultMessage={'Email us'}/>
{intl.formatMessage(CONTACT_COPY.PAGE_INTRO.PAGE_SUB_HEADING)}
</h2>
<p>
<FormattedMessage
id={'contact.general'}
description={'Contact page body text'}
defaultMessage={`For general feedback, email {general_email_address}`}
id={CONTACT_COPY.CONTACT_VIA_EMAIL.ID}
description={CONTACT_COPY.CONTACT_VIA_EMAIL.DESCRIPTION}
defaultMessage={CONTACT_COPY.CONTACT_VIA_EMAIL.DEFAULT_MESSAGE}
values={{
general_email_address:
<a href={`mailto:${generalEmail}`}>{generalEmail}</a>,
<a href={`mailto:${CONTACT_COPY.FEEDBACK_EMAIL}`}>{CONTACT_COPY.FEEDBACK_EMAIL}</a>,
}}/>
</p>
</Grid>

View file

@ -1,35 +1,16 @@
import * as React from 'react';
import {render} from '@testing-library/react';
import Index from './index';
import {LocalizedComponent} from '../test/testHelpers';
import Index from './index';
// TODO: Move this to a location that will detect on all tests
// See ticket: #550
jest.spyOn(console, 'error').mockImplementation(() => {});
beforeAll(() => {
// Restore mock after all tests are done, so it won't affect other test suites
jest.resetAllMocks();
});
afterAll(() => {
// Restore mock after all tests are done, so it won't affect other test suites
jest.resetAllMocks();
});
describe('rendering of the component', () => {
describe('rendering of the DatasetContainer', () => {
const {asFragment} = render(
<LocalizedComponent>
<Index location={window.location}/>
</LocalizedComponent>,
);
it(`should not contain 'undefined" anywhere`, () => {
expect(asFragment()).not.toContain('undefined');
});
it('No console errors', () => {
expect(global.console.error).toBeCalledTimes(0);
it('checks if various text fields are visible', () => {
expect(asFragment()).toMatchSnapshot();
});
});

View file

@ -1,6 +1,5 @@
import * as React from 'react';
import {defineMessages} from 'react-intl';
import {FormattedMessage, useIntl} from 'gatsby-plugin-intl';
import {useIntl} from 'gatsby-plugin-intl';
import AboutCard from '../components/AboutCard/AboutCard';
import AboutCardsContainer from '../components/AboutCard/AboutCardsContainer';
@ -8,6 +7,9 @@ import AlertWrapper from '../components/AlertWrapper';
import J40MainGridContainer from '../components/J40MainGridContainer';
import Layout from '../components/layout';
import * as ABOUT_COPY from '../data/copy/about';
import * as CONTACT_COPY from '../data/copy/contact';
// @ts-ignore
import aboutUSMapImg from '../images/about-usmap-1.svg';
// @ts-ignore
@ -24,7 +26,6 @@ import commentIcon from // @ts-ignore
import githubIcon from // @ts-ignore
'/node_modules/uswds/dist/img/usa-icons/github.svg';
interface IndexPageProps {
location: Location;
}
@ -32,49 +33,9 @@ interface IndexPageProps {
// markup
const IndexPage = ({location}: IndexPageProps) => {
const intl = useIntl();
const messages = defineMessages({
presidentalLinkUri: {
id: 'index.presidentalLinkUri',
defaultMessage: 'https://www.whitehouse.gov/briefing-room/' +
'presidential-actions/2021/01/27/' +
'executive-order-on-tackling-the-climate-' +
'crisis-at-home-and-abroad/',
description: 'Link url to presidential actions executive order. Part of paragraph 3',
},
presidentalLinkLabel: {
id: 'index.presidentalLinkLabel',
defaultMessage: 'Executive Order 14008 on Tackling the Climate Crisis at Home and Abroad',
description: 'Link url to presidential actions executive order. Part of paragraph 3',
},
transparentLabel: {
id: 'index.section3.transparentLabel',
defaultMessage: 'Transparent:',
description: 'Italic label for 1st paragraph of section 3 on index page',
},
inclusiveLabel: {
id: 'index.section3.inclusiveLabel',
defaultMessage: 'Inclusive:',
description: 'Italic label for 2nd paragraph of section 3 on index page',
},
iterativeLabel: {
id: 'index.section3.iterativeLabel',
defaultMessage: 'Iterative:',
description: 'Italic label for 3rd paragraph of section 3 on index page',
},
aboutScreenToolHeading: {
id: 'index.heading.screentool',
defaultMessage: 'The screening tool',
description: 'heading for about screening tool',
},
aboutJustice40Heading: {
id: 'index.heading.justice40',
defaultMessage: 'The Justice40 Initiative',
description: 'heading for about justice 40',
},
});
return (
<Layout location={location} title={'About'}>
<Layout location={location} title={intl.formatMessage(ABOUT_COPY.PAGE.TILE)}>
<J40MainGridContainer>
<AlertWrapper showBetaAlert={true} showLimitedDataAlert={false}/>
</J40MainGridContainer>
@ -85,34 +46,15 @@ const IndexPage = ({location}: IndexPageProps) => {
<AboutCard
size={'large'}
imgSrc={aboutUSMapImg}
header={intl.formatMessage(messages.aboutScreenToolHeading)}>
header={intl.formatMessage(ABOUT_COPY.PAGE.HEADING_1)}>
<>
<p>
<FormattedMessage
id={'index.aboutContent.p1'}
description={'paragraph 1 of main content on index page'}
defaultMessage=
{`On January 27, 2021, President Biden directed the Council on
Environmental Quality (CEQ) to create a climate and economic
justice screening tool. The purpose of the tool is to help
Federal agencies identify disadvantaged communities and provide
socioeconomic, environmental, and climate information and data
to inform decisions that may affect these communities. The tool
identifies disadvantaged communities as communities of focus
through publicly available, nationally consistent, high-quality
data.
`}/>
{intl.formatMessage(ABOUT_COPY.PAGE.HEADING1_DESCRIPTION1)}
</p>
<p>
<FormattedMessage
id={'index.aboutContent.p1b'}
description={'paragraph 1b of main content on index page'}
defaultMessage={`
The current version of the tool is in a public beta form and
will be updated based on feedback from the public.
`}/>
{intl.formatMessage(ABOUT_COPY.PAGE.HEADING1_DESCRIPTION2)}
</p>
</>
</AboutCard>
</AboutCardsContainer>
@ -120,43 +62,19 @@ const IndexPage = ({location}: IndexPageProps) => {
<AboutCard
size={'large'}
imgSrc={aboutJ40Img}
header={intl.formatMessage(messages.aboutJustice40Heading)}>
header={intl.formatMessage(ABOUT_COPY.PAGE.HEADING_2)}>
<>
<p>
<FormattedMessage
id="index.aboutContent.p2"
description={'paragraph 2 of main content on index page'}
defaultMessage={`
The tool will provide important information for the Justice40
Initiative. The goal of the Justice40 Initiative is to provide
40-percent of the overall benefits of certain federal
programs in seven key areas to disadvantaged communities.
These seven key areas are: climate change, clean energy and
energy efficiency, clean transit, affordable and sustainable
housing, training and workforce development, the remediation
and reduction of legacy pollution, and the development of
critical clean water infrastructure.
`}/>
{intl.formatMessage(ABOUT_COPY.PAGE.HEADING2_DESCRIPTION1)}
</p>
<p>
<FormattedMessage
id={'index.aboutContent.p3'}
description={'paragraph 3 of main content on index page'}
defaultMessage={`
Read more about the Justice40 Initiative in President Bidens
{presidentLink}
`}
values={{
presidentLink:
<a
href={intl.formatMessage(messages.presidentalLinkUri)}
target="_blank"
rel="noreferrer">{intl.formatMessage(messages.presidentalLinkLabel)}
</a>,
}}/>
{intl.formatMessage(ABOUT_COPY.PAGE.HEADING2_DESCRIPTION2)}
{' '}
<a href={ABOUT_COPY.EXEC_ORDER_LINK} target={'_blank'} rel="noreferrer">
{intl.formatMessage(ABOUT_COPY.PAGE.PRESIDENT_LINK_LABEL)}
</a>
</p>
</>
</AboutCard>
</AboutCardsContainer>
</J40MainGridContainer>
@ -165,63 +83,63 @@ const IndexPage = ({location}: IndexPageProps) => {
fullWidth={true}
blueBackground={true}>
<J40MainGridContainer>
<h2>How to get started</h2>
<h2>
{intl.formatMessage(ABOUT_COPY.HOW_TO_GET_STARTED.TITLE)}
</h2>
<AboutCardsContainer>
<AboutCard
size={'small'}
imgSrc={accountBalanceIcon}
header={'Federal program managers'}
linkText={'Go to data & methodology'}
header={intl.formatMessage(ABOUT_COPY.HOW_TO_GET_STARTED.FEDERAL_PM_HEADING)}
linkText={intl.formatMessage(ABOUT_COPY.HOW_TO_GET_STARTED.FEDERAL_PM_LINK_TEXT)}
url={'/methodology'}
internal={true}
>
Download the screening tools draft list of communities of focus.
Explore data that may be useful to your program, and provide
feedback on the tool.
internal={true}>
<p>
{intl.formatMessage(ABOUT_COPY.HOW_TO_GET_STARTED.FEDERAL_PM_INFO)}
</p>
</AboutCard>
<AboutCard
size={'small'}
imgSrc={groupsIcon}
header={'Community members'}
linkText={'Explore the tool'}
header={intl.formatMessage(ABOUT_COPY.HOW_TO_GET_STARTED.COMMUNITY_MEMBERS_HEADING)}
linkText={intl.formatMessage(ABOUT_COPY.HOW_TO_GET_STARTED.COMMUNITY_MEMBERS_LINK_TEXT)}
url={'/cejst'}
internal={true}
>
Explore data about communities of focus in your area, and help
provide feedback on the tool.
internal={true}>
<p>
{intl.formatMessage(ABOUT_COPY.HOW_TO_GET_STARTED.COMMUNITY_MEMBERS_INFO)}
</p>
</AboutCard>
</AboutCardsContainer>
</J40MainGridContainer>
</J40MainGridContainer>
<J40MainGridContainer>
<h2>Get involved</h2>
<h2>{intl.formatMessage(ABOUT_COPY.GET_INVOLVED.TITLE)}</h2>
<AboutCardsContainer>
<AboutCard
size={'small'}
imgSrc={commentIcon}
header={'Send feedback'}
linkText={'Email: screeningtool.feedback@usds.gov'}
url={'mailto:screeningtool.feedback@usds.gov'}
internal={false}
>
Have ideas about how this tool can be improved to better
reflect the on-the-ground experiences of your community?
header={intl.formatMessage(ABOUT_COPY.GET_INVOLVED.SEND_FEEDBACK_HEADING)}
linkText={`Email: ${CONTACT_COPY.FEEDBACK_EMAIL}`}
url={`mailto:${CONTACT_COPY.FEEDBACK_EMAIL}`}
internal={false}>
<p>
{intl.formatMessage(ABOUT_COPY.GET_INVOLVED.SEND_FEEDBACK_INFO)}
</p>
</AboutCard>
<AboutCard
size={'small'}
imgSrc={githubIcon}
header={'Join the open source community'}
linkText={'Check it out on GitHub'}
url={'https://github.com/usds/justice40-tool'}
header={intl.formatMessage(ABOUT_COPY.GET_INVOLVED.SEND_FEEDBACK_HEADING)}
linkText={intl.formatMessage(ABOUT_COPY.GET_INVOLVED.JOIN_OSC_LINK_TEXT)}
url={ABOUT_COPY.GITHUB_LINK}
openUrlNewTab={true}
internal={false}
>
The screening tools code is open source, which means it is
available for the public to view and contribute to. Anyone
can view and contribute on GitHub.
internal={false}>
<p>
{intl.formatMessage(ABOUT_COPY.GET_INVOLVED.JOIN_OSC_INFO)}
</p>
</AboutCard>
</AboutCardsContainer>
</J40MainGridContainer>

View file

@ -0,0 +1,16 @@
import * as React from 'react';
import {render} from '@testing-library/react';
import {LocalizedComponent} from '../test/testHelpers';
import Meth from './methodology';
describe('rendering of the DatasetContainer', () => {
const {asFragment} = render(
<LocalizedComponent>
<Meth location={window.location}/>
</LocalizedComponent>,
);
it('checks if various text fields are visible', () => {
expect(asFragment()).toMatchSnapshot();
});
});

View file

@ -1,7 +1,6 @@
import * as React from 'react';
import {Grid} from '@trussworks/react-uswds';
import {useIntl} from 'gatsby-plugin-intl';
import {defineMessages} from 'react-intl';
import AlertWrapper from '../components/AlertWrapper';
import DatasetContainer from '../components/DatasetContainer';
@ -10,6 +9,8 @@ import J40MainGridContainer from '../components/J40MainGridContainer';
import Layout from '../components/layout';
import ScoreStepsList from '../components/scoreStepsList';
import * as METHODOLOGY_COPY from '../data/copy/methodology';
interface MethodPageProps {
location: Location;
}
@ -17,39 +18,21 @@ interface MethodPageProps {
// markup
const IndexPage = ({location}: MethodPageProps) => {
const intl = useIntl();
const messages = defineMessages({
methodologyPageTitle: {
id: 'methodology.page.title.text',
defaultMessage: 'Data and Methodology',
description: 'methodology page title text',
},
methodologyPageHeader: {
id: 'methodology.page.header.text',
defaultMessage: 'Methodology',
description: 'methodology page header text',
},
methodologyPagep1: {
id: 'methodology.page.paragraph.first',
defaultMessage: 'The methodology for identifying communities of focus is currently ' +
'in a draft, pre-decisional form that may change over time as more datasets become available.',
description: 'methodology page paragraph 1',
},
});
return (
<Layout location={location} title={intl.formatMessage(messages.methodologyPageTitle)}>
<Layout location={location} title={intl.formatMessage(METHODOLOGY_COPY.PAGE.TILE)}>
<J40MainGridContainer>
<AlertWrapper showBetaAlert={true} showLimitedDataAlert={false}/>
</J40MainGridContainer>
<J40MainGridContainer>
<h1>{intl.formatMessage(messages.methodologyPageHeader)}</h1>
<h1>{intl.formatMessage(METHODOLOGY_COPY.PAGE.HEADING)}</h1>
<Grid row gap className={'j40-mb-5'}>
<Grid col={12} tablet={{col: 6}}>
<section>
<p>
{intl.formatMessage(messages.methodologyPagep1)}
{intl.formatMessage(METHODOLOGY_COPY.PAGE.DESCRIPTION)}
</p>
</section>
</Grid>