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

@ -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>,
}}
/>,
};