Merge pull request #45 from agilesix/cfelix/merge-v2-20241227

CEQ-J40 merge v2 code - 20241227
This commit is contained in:
Neil MartinsenBurrell 2025-01-06 10:33:20 -06:00 committed by GitHub
commit 8d9acdb8b5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
28 changed files with 253 additions and 153 deletions

4
.linkspector.yml Normal file
View file

@ -0,0 +1,4 @@
dirs:
- .
ignorePatterns:
- pattern: '^http://localhost.*$'

View file

@ -14,12 +14,15 @@ Install [`docker`](https://docs.docker.com/get-docker/). See [Install Docker](IN
> _Important_: To be able to run the entire application, you may need to increase the memory allocated for docker to at least 8096 MB. See [this post](https://stackoverflow.com/a/44533437) for more details.
Use `docker-compose` to run the application:
Use [`docker compose`](https://docs.docker.com/compose/) to run the full application:
```sh
$ docker-compose up
$ PIPELINE_CMD="data_pipeline.application full-run" docker compose up
```
The above command will build and spin up three containers: A data pipeline container, a data server, and a web server.
> Note: This may take a while possibly even an hour or two since it has to build the containers and then download and process all the data.
The data pipeline container can run the entire data pipeline, or any individual step. Because running the entire pipeline is a time-consuming process, the application command has been turned into a variable so individual parts of the pipeline can be run by docker compose. Once the full-run has been completed, you can change the PIPELINE_CMD environment variable to any other valid parameter for future runs. For example setting `PIPELINE_CMD="full-run --help"` would show the options for the full-run command. This would be helpful if you didn't want to run the data pipeline but merely wanted to see front end changes.
After it initializes, you should be able to open the application in your browser at [http://localhost:8000](http://localhost:8000).
The data server will make the files created by the data pipeline container available to the web server. The data pipeline container mounts the local repo directories to read and write files. The data server presents the local files to the webserver to render the map and downloadables.
The web server will run the application website. After it initializes, you should be able to open the web server in your browser at [`http://localhost:8000`](http://localhost:8000). If the data pipeline container is set to run the full data pipeline, the website will not pick up the changes until the pipeline completes.

View file

@ -1 +1,8 @@
.git
.gitignore
*Dockerfile*
*docker-compose*
.cache
public
node_modules
npm-debug.log

View file

@ -4,17 +4,14 @@ FROM node:14
# this working directory
WORKDIR /client
# Copy the package.json and package_lock.json files from local to the docker image / container
COPY package*.json ./
# install all packages as a layer in the docker image / container
RUN npm install
# copy all local files from the working directory to the docker image/container however we must use
# dockerignore to ignore node_modules so that the image can use what what was just installed from the above
# step.
COPY . .
# install all packages as a layer in the docker image / container
RUN npm ci
ENV PORT=6000
EXPOSE 6000

View file

@ -978,7 +978,7 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
rel="noreferrer"
target="_blank"
>
The Trust for Public Lands
The Trust for Public Land
</a>
and
<a
@ -1079,7 +1079,7 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
</div>
<div>
Share of homes built before 1960, which indicates potential lead paint exposure. Tracts with extremely high home values (i.e. median home values above the 90th percentile) that are less likely to face health risks from lead paint exposure are not included.
Share of homes built before 1960, which indicates potential lead paint exposure. Tracts with extremely high home values (i.e., median home values above the 90th percentile) that are less likely to face health risks from lead paint exposure are not included.
</div>
<ul>
@ -2059,6 +2059,10 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
</strong>
The LAR dataset depicts the exterior extent of a Federal Indian land area. Not all Federally Recognized Tribes have a designated land area; therefore, they may not have an associated land area represented in the land area dataset.
<br />
<br />
The Department of the Interior makes no warrant for legal application of this data such as a legal boundary.
</p>
</div>
<ul>

View file

@ -130,6 +130,19 @@ const MapTractLayers = ({
minzoom={constants.GLOBAL_MIN_ZOOM_HIGH}
/>
{/* High zoom layer (static) - grandfathered features only */}
<Layer
id={constants.GRANDFATHERED_HIGH_ZOOM_LAYER_ID}
source-layer={constants.SCORE_SOURCE_LAYER}
filter={['==', constants.IS_GRANDFATHERED, true]}
type='fill'
paint={{
'fill-color': constants.GRANDFATHERED_FEATURE_FILL_COLOR,
'fill-opacity': constants.HIGH_ZOOM_PRIORITIZED_FEATURE_FILL_OPACITY,
}}
minzoom={constants.GLOBAL_MIN_ZOOM_HIGH}
/>
{/* High zoom layer (static) - controls the border between features */}
<Layer
id={constants.FEATURE_BORDER_LAYER_ID}

View file

@ -258,6 +258,7 @@ export const TRIBAL_SOURCE_LAYER = "blocks";
export const BASE_MAP_LAYER_ID = "base-map-layer-id";
export const HIGH_ZOOM_LAYER_ID = "high-zoom-layer-id";
export const PRIORITIZED_HIGH_ZOOM_LAYER_ID = "prioritized-high-zoom-layer-id";
export const GRANDFATHERED_HIGH_ZOOM_LAYER_ID = "grandfathered-high-zoom-layer-id";
export const LOW_ZOOM_LAYER_ID = "low-zoom-layer-id";
export const FEATURE_BORDER_LAYER_ID = "feature-border-layer-id";
export const SELECTED_FEATURE_BORDER_LAYER_ID =
@ -298,7 +299,8 @@ export const TRIBAL_FEATURE_FILL_OPACITY = 0.3;
// Colors
export const FEATURE_BORDER_COLOR = "#4EA5CF";
export const SELECTED_FEATURE_BORDER_COLOR = "#1A4480";
export const PRIORITIZED_FEATURE_FILL_COLOR = "#768FB3";
export const PRIORITIZED_FEATURE_FILL_COLOR = "#0050D8";
export const GRANDFATHERED_FEATURE_FILL_COLOR = "#8168B3";
export const TRIBAL_BORDER_COLOR = "#4EA5CF";
export const SELECTED_TRIBAL_BORDER_COLOR = "#1A4480";

View file

@ -649,7 +649,7 @@ export const PRIORITIZATION_COPY = {
/>,
PRIO_ISLAND_LI: <FormattedMessage
id={'explore.map.page.side.panel.prio.copy.prio.island.li'}
defaultMessage={'This tract is considered disadvantaged because it meets the low income threshold <bold>AND</bold> is located in a U.S. Territory.'}
defaultMessage={'This tract is considered disadvantaged because it meets the low income threshold <bold>AND</bold> is in a U.S. Territory that is not included in each of the nationally-consistent datasets on environmental and climate burdens currently used in the tool.'}
description={`Navigate to the explore the map page. Click on tract, The side panel will show This tract is considered disadvantaged. It is an island territory that meets an adjusted low income threshold.`}
values={{
bold: boldFn,
@ -1411,7 +1411,7 @@ export const LOW_INCOME_TOOLTIP = defineMessages({
},
IMP_YES_POP_NOT_NULL: {
id: 'explore.map.page.side.panel.indicator.low.income.tooltip.IMP_YES_POP_NOT_NULL',
defaultMessage: `Tracts with missing income data<br />are given estimated incomes<br />based on an average of the<br />incomes of the surrounding tracts.`,
defaultMessage: `Tracts with known populations<br />that are missing income data<br />are given estimated incomes based<br />on an average of the incomes<br />in the surrounding tracts.`,
description: 'Hover over the low income icon and it will show Tracts with missing income data are given estimated incomes based on an average of the incomes of the surrounding tracts.',
},
});

View file

@ -241,7 +241,7 @@ export const FAQ_ANSWERS = {
/>,
Q6_P1: <FormattedMessage
id={ 'faqs.page.answers.Q6_P1'}
defaultMessage={ `Some census tracts that contain land within the boundaries of Federally Recognized Tribes are also considered disadvantaged because they meet the burden thresholds for at least one of the categories on the tool. When this happens, the areas appear darker on the tools map.`}
defaultMessage={ `Different areas of the map will have different colors because they are identified as disadvantaged in different ways. Some census tracts that contain land within the boundaries of Federally Recognized Tribes are also considered disadvantaged because they meet the burden thresholds for at least one of the categories on the tool. When this happens, the areas appear darker on the tools map.`}
description={ 'Navigate to the FAQs page, this will be an answer, Q6_P1'}
/>,
Q6_P2: <FormattedMessage
@ -257,6 +257,12 @@ export const FAQ_ANSWERS = {
/>,
Q6_P4: <FormattedMessage
id={ 'faqs.page.answers.Q6_P4'}
defaultMessage={ ` : Disadvantaged census tracts (grandfathered)
`}
description={ 'Navigate to the FAQs page, this will be an answer, Q6_P4'}
/>,
Q6_P5: <FormattedMessage
id={ 'faqs.page.answers.Q6_P5'}
defaultMessage={ `Any area that is highlighted is considered disadvantaged, regardless of whether it is a light shade or dark shade. The tool will show if a whole census tract is considered disadvantaged or just the parts that contain land within the boundaries of Federally Recognized Tribes.`}
description={ 'Navigate to the FAQs page, this will be an answer, Q6_P4'}
/>,
@ -370,7 +376,7 @@ export const FAQ_ANSWERS = {
/>,
Q19: <FormattedMessage
id={ 'faqs.page.answers.Q19'}
defaultMessage={ `The Climate and Economic Justice Screening Tool (CEJST) has <link1>downloads</link1> for the current version available. Spreadsheets (.xlxs) and (.csv) contain the tools definitions and data. These data can be used for analysis. Shapefiles and GeoJSON files can be uploaded into other mapping programs such as Esri. The downloads include information on how to use the files. Information from previous versions of the tool is available on the <link2>previous versions</link2> page.`}
defaultMessage={ `The Climate and Economic Justice Screening Tool (CEJST) has <link1>downloads</link1> for the current version available. Spreadsheets (.xlxs) and (.csv) contain the tools definitions and data. These data can be used for analysis. Shapefiles and GeoJSON files can be uploaded into other mapping programs such as Esri. The downloads include information on how to use the files (columns.csv). Information from previous versions of the tool is available on the <link2>previous versions</link2> page.`}
description={ 'Navigate to the FAQs page, this will be an answer, Q19'}
values={{
link1: linkFn(PAGES_ENDPOINTS.DOWNLOADS, true, false),
@ -401,7 +407,7 @@ export const FAQ_ANSWERS = {
/>,
Q22: <FormattedMessage
id={ 'faqs.page.answers.Q22'}
defaultMessage={ 'Because some nationally-consistent datasets on indicators of environmental or climate burden used in the tool do not currently include data from certain U.S. Territories, tracts in these Territories are considered disadvantaged if they meet the low income threshold only.'}
defaultMessage={ 'Because some nationally-consistent datasets on indicators of environmental or climate burden used in the tool do not currently include data for certain U.S. Territories, tracts in these Territories are considered disadvantaged if they meet the low income threshold only.'}
description={ 'Navigate to the FAQs page, this will be an answer, Q22'}
/>,
};

View file

@ -37,21 +37,21 @@ export const PAGE = defineMessages({
PARA1_BULLET2: {
id: 'methodology.page.paragraph.1.bullet.2',
defaultMessage: `
If they are on land within the boundaries of Federally Recognized Tribes.
If they are on land within the boundaries of Federally Recognized Tribes
`,
description: 'Navigate to the methodology page. This is the methodology paragraph 1, bullet 2',
},
PARA1_BULLET3: {
id: 'methodology.page.paragraph.1.bullet.3',
defaultMessage: `
For census tracts that were identified as disadvantaged in version 1.0 of the tool, but do not meet the methodology for the 2.0 version: If the census tract ID was identified as disadvantaged in version 1.0, then the census tract is considered disadvantaged.
For census tracts that were identified as disadvantaged in version 1.0 of the tool, but do not meet the methodology for the 2.0 version: If the census tract ID was identified as disadvantaged in version 1.0, then the census tract is considered disadvantaged
`,
description: 'Navigate to the methodology page. This is the methodology paragraph 1, bullet 3',
},
PARA1_BULLET4: {
id: 'methodology.page.paragraph.1.bullet.4',
defaultMessage: `
Additionally, census tracts in certain U.S. Territories are considered disadvantaged if they meet the low income threshold only. This is because these Territories are not included in each of the nationally-consistent datasets on environmental and climate burdens currently used in the tool.
Additionally, census tracts in certain U.S. Territories are considered disadvantaged if they meet the low income threshold only. This is because these Territories are not included in each of the nationally-consistent datasets on environmental and climate burdens used in the tool
`,
description: 'Navigate to the methodology page. This is the methodology paragraph 1, bullet 5',
},
@ -581,7 +581,7 @@ export const RESPONSIBLE_PARTIES = {
GREEN_SPACE: <FormattedMessage
id={'methodology.page.cat.res.part.GREEN_SPACE'}
defaultMessage={`
Data from <link1>Multi-Resolution Land Characteristics</link1> (MRLC) consortium; data analysis provided by <link2>The Trust for Public Lands</link2> and <link3>American Forests</link3>
Data from <link1>Multi-Resolution Land Characteristics</link1> (MRLC) consortium; data analysis provided by <link2>The Trust for Public Land</link2> and <link3>American Forests</link3>
`}
description={'responsible party text'}
values={{
@ -1338,7 +1338,7 @@ export const INDICATORS: IIndicators[] = [
description: <FormattedMessage
id={'methodology.page.category.lead.paint.description.text'}
defaultMessage={`
Share of homes built before 1960, which indicates potential lead paint exposure. Tracts with extremely high home values (i.e. median home values above the 90th percentile) that are less likely to face health risks from lead paint exposure are not included.
Share of homes built before 1960, which indicates potential lead paint exposure. Tracts with extremely high home values (i.e., median home values above the 90th percentile) that are less likely to face health risks from lead paint exposure are not included.
`}
description={'Navigate to the Methodology page. This is the description text for lead paint'}
/>,
@ -1776,10 +1776,12 @@ export const INDICATORS: IIndicators[] = [
id={'methodology.page.category.tribal.lands.note.text'}
defaultMessage={`
<boldtag>Note: </boldtag>The LAR dataset depicts the exterior extent of a Federal Indian land area. Not all Federally Recognized Tribes have a designated land area; therefore, they may not have an associated land area represented in the land area dataset.
{linebreak}{linebreak}The Department of the Interior makes no warrant for legal application of this data such as a legal boundary.
`}
description={'Navigate to the Methodology page. This is the note text for low median expectancy'}
values={{
boldtag: boldFn,
linebreak: <br />,
}}
/>,
usedIn: CATEGORIES.TRIBAL_LANDS.METHODOLOGY,
@ -1791,53 +1793,6 @@ export const INDICATORS: IIndicators[] = [
},
],
},
// Unused burdens:
// {
// domID: 'high-ed-enroll-rate',
// indicator: <FormattedMessage
// id={'methodology.page.dataset.indicator.high.ed.enroll.title.text'}
// defaultMessage={`Higher education non-enrollment`}
// description={'Navigate to the Methodology page. This is the title text for the high ed enrollment dataset'}
// />,
// description: <FormattedMessage
// id={'methodology.page.category.high.ed.enroll.rate.description.text'}
// defaultMessage={`
// Percent of people 15 or older who are not currently enrolled in college, university, or graduate school.
// `}
// description={'Navigate to the Methodology page. This is the description text for high ed enrollment'}
// />,
// usedIn: CATEGORIES.ALL,
// responsibleParty: RESPONSIBLE_PARTIES.CENSUS,
// sources: [
// {
// source: SOURCE_LINKS.CENSUS_ACS_15_19,
// availableFor: AVAILABLE_FOR.ALL_US_DC_PR,
// },
// ],
// },
// {
// domID: 'median-home',
// indicator: <FormattedMessage
// id={'methodology.page.dataset.indicator.median.home.title.text'}
// defaultMessage={`Median home value`}
// description={'Navigate to the Methodology page. This is the title text for the median home dataset'}
// />,
// description: <FormattedMessage
// id={'methodology.page.category.median.home.value.description.text'}
// defaultMessage={`
// Median home value of owner-occupied housing units in the census tract.
// `}
// description={'Navigate to the Methodology page. This is the description text for lead paint'}
// />,
// usedIn: CATEGORIES.AFFORDABLE_HOUSING.METHODOLOGY,
// responsibleParty: RESPONSIBLE_PARTIES.CENSUS,
// sources: [
// {
// source: SOURCE_LINKS.CENSUS_ACS_15_19,
// availableFor: AVAILABLE_FOR.ALL_US_DC,
// },
// ],
// },
];
export const RETURN_TO_TOP = {

View file

@ -4,7 +4,7 @@
<title>Oval</title>
<desc>Created with Sketch.</desc>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" fill-opacity="0.3">
<g id="Group-7" transform="translate(-147.000000, -702.000000)" fill="#18437F" stroke="#18437F" stroke-width="2">
<g id="Group-7" transform="translate(-147.000000, -702.000000)" fill="#0050D8" stroke="#0050D8" stroke-width="2">
<g id="Group-Copy-9">
<circle id="Oval" cx="155" cy="710" r="7"></circle>
</g>

Before

Width:  |  Height:  |  Size: 680 B

After

Width:  |  Height:  |  Size: 680 B

View file

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 58 (84663) - https://sketch.com -->
<title>Oval</title>
<desc>Created with Sketch.</desc>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" fill-opacity="0.3">
<g id="Group-7" transform="translate(-147.000000, -702.000000)" fill="#8168B3" stroke="#8168B3" stroke-width="2">
<g id="Group-Copy-9">
<circle id="Oval" cx="155" cy="710" r="7"></circle>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 680 B

View file

@ -816,7 +816,7 @@
"description": "Navigate to the explore the map page. When the map is in view, click on the map. The side panel will show low income"
},
"explore.map.page.side.panel.indicator.low.income.tooltip.IMP_YES_POP_NOT_NULL": {
"defaultMessage": "Tracts with missing income data<br />are given estimated incomes<br />based on an average of the<br />incomes of the surrounding tracts.",
"defaultMessage": "Tracts with known populations<br />that are missing income data<br />are given estimated incomes based<br />on an average of the incomes<br />in the surrounding tracts.",
"description": "Hover over the low income icon and it will show Tracts with missing income data are given estimated incomes based on an average of the incomes of the surrounding tracts."
},
"explore.map.page.side.panel.indicator.low.income.tooltip.IMP_YES_POP_NULL": {
@ -1132,7 +1132,7 @@
"description": "Navigate to the explore the map page. Click on tract, The side panel will show This tract is considered disadvantaged. This tract is considered disadvantaged because it was identified as disadvantaged in version 1.0 of the tool."
},
"explore.map.page.side.panel.prio.copy.prio.island.li": {
"defaultMessage": "This tract is considered disadvantaged because it meets the low income threshold <bold>AND</bold> is located in a U.S. Territory.",
"defaultMessage": "This tract is considered disadvantaged because it meets the low income threshold <bold>AND</bold> is in a U.S. Territory that is not included in each of the nationally-consistent datasets on environmental and climate burdens currently used in the tool.",
"description": "Navigate to the explore the map page. Click on tract, The side panel will show This tract is considered disadvantaged. It is an island territory that meets an adjusted low income threshold."
},
"explore.map.page.side.panel.prio.copy.prio.n.burden": {
@ -1320,7 +1320,7 @@
"description": "Navigate to the FAQs page, this will be an answer, Q16_P2"
},
"faqs.page.answers.Q19": {
"defaultMessage": "The Climate and Economic Justice Screening Tool (CEJST) has <link1>downloads</link1> for the current version available. Spreadsheets (.xlxs) and (.csv) contain the tools definitions and data. These data can be used for analysis. Shapefiles and GeoJSON files can be uploaded into other mapping programs such as Esri. The downloads include information on how to use the files. Information from previous versions of the tool is available on the <link2>previous versions</link2> page.",
"defaultMessage": "The Climate and Economic Justice Screening Tool (CEJST) has <link1>downloads</link1> for the current version available. Spreadsheets (.xlxs) and (.csv) contain the tools definitions and data. These data can be used for analysis. Shapefiles and GeoJSON files can be uploaded into other mapping programs such as Esri. The downloads include information on how to use the files (columns.csv). Information from previous versions of the tool is available on the <link2>previous versions</link2> page.",
"description": "Navigate to the FAQs page, this will be an answer, Q19"
},
"faqs.page.answers.Q1_P1": {
@ -1344,7 +1344,7 @@
"description": "Navigate to the FAQs page, this will be an answer, Q21"
},
"faqs.page.answers.Q22": {
"defaultMessage": "Because some nationally-consistent datasets on indicators of environmental or climate burden used in the tool do not currently include data from certain U.S. Territories, tracts in these Territories are considered disadvantaged if they meet the low income threshold only.",
"defaultMessage": "Because some nationally-consistent datasets on indicators of environmental or climate burden used in the tool do not currently include data for certain U.S. Territories, tracts in these Territories are considered disadvantaged if they meet the low income threshold only.",
"description": "Navigate to the FAQs page, this will be an answer, Q22"
},
"faqs.page.answers.Q2_P1": {
@ -1412,7 +1412,7 @@
"description": "Navigate to the FAQs page, this will be an answer, Q5_P2_1"
},
"faqs.page.answers.Q6_P1": {
"defaultMessage": "Some census tracts that contain land within the boundaries of Federally Recognized Tribes are also considered disadvantaged because they meet the burden thresholds for at least one of the categories on the tool. When this happens, the areas appear darker on the tools map.",
"defaultMessage": "Different areas of the map will have different colors because they are identified as disadvantaged in different ways. Some census tracts that contain land within the boundaries of Federally Recognized Tribes are also considered disadvantaged because they meet the burden thresholds for at least one of the categories on the tool. When this happens, the areas appear darker on the tools map.",
"description": "Navigate to the FAQs page, this will be an answer, Q6_P1"
},
"faqs.page.answers.Q6_P2": {
@ -1424,6 +1424,10 @@
"description": "Navigate to the FAQs page, this will be an answer, Q6_P3"
},
"faqs.page.answers.Q6_P4": {
"defaultMessage": ": Disadvantaged census tracts (grandfathered)",
"description": "Navigate to the FAQs page, this will be an answer, Q6_P4"
},
"faqs.page.answers.Q6_P5": {
"defaultMessage": "Any area that is highlighted is considered disadvantaged, regardless of whether it is a light shade or dark shade. The tool will show if a whole census tract is considered disadvantaged or just the parts that contain land within the boundaries of Federally Recognized Tribes.",
"description": "Navigate to the FAQs page, this will be an answer, Q6_P4"
},
@ -1516,7 +1520,7 @@
"description": "responsible party text"
},
"methodology.page.cat.res.part.GREEN_SPACE": {
"defaultMessage": "Data from <link1>Multi-Resolution Land Characteristics</link1> (MRLC) consortium; data analysis provided by <link2>The Trust for Public Lands</link2> and <link3>American Forests</link3>",
"defaultMessage": "Data from <link1>Multi-Resolution Land Characteristics</link1> (MRLC) consortium; data analysis provided by <link2>The Trust for Public Land</link2> and <link3>American Forests</link3>",
"description": "responsible party text"
},
"methodology.page.cat.res.part.HUD": {
@ -1612,7 +1616,7 @@
"description": "Navigate to the Methodology page. This is the description text for housing burden"
},
"methodology.page.category.lead.paint.description.text": {
"defaultMessage": "Share of homes built before 1960, which indicates potential lead paint exposure. Tracts with extremely high home values (i.e. median home values above the 90th percentile) that are less likely to face health risks from lead paint exposure are not included.",
"defaultMessage": "Share of homes built before 1960, which indicates potential lead paint exposure. Tracts with extremely high home values (i.e., median home values above the 90th percentile) that are less likely to face health risks from lead paint exposure are not included.",
"description": "Navigate to the Methodology page. This is the description text for lead paint"
},
"methodology.page.category.leaky.uwt.description.text": {
@ -1784,7 +1788,7 @@
"description": "Navigate to the Methodology page. This is the description text for Tribal lands"
},
"methodology.page.category.tribal.lands.note.text": {
"defaultMessage": "<boldtag>Note: </boldtag>The LAR dataset depicts the exterior extent of a Federal Indian land area. Not all Federally Recognized Tribes have a designated land area; therefore, they may not have an associated land area represented in the land area dataset.",
"defaultMessage": "<boldtag>Note: </boldtag>The LAR dataset depicts the exterior extent of a Federal Indian land area. Not all Federally Recognized Tribes have a designated land area; therefore, they may not have an associated land area represented in the land area dataset. {linebreak}{linebreak}The Department of the Interior makes no warrant for legal application of this data such as a legal boundary.",
"description": "Navigate to the Methodology page. This is the note text for low median expectancy"
},
"methodology.page.category.unemploy.description.text": {
@ -2132,15 +2136,15 @@
"description": "Navigate to the methodology page. This is the methodology paragraph 1, bullet 1"
},
"methodology.page.paragraph.1.bullet.2": {
"defaultMessage": "If they are on land within the boundaries of Federally Recognized Tribes.",
"defaultMessage": "If they are on land within the boundaries of Federally Recognized Tribes",
"description": "Navigate to the methodology page. This is the methodology paragraph 1, bullet 2"
},
"methodology.page.paragraph.1.bullet.3": {
"defaultMessage": "For census tracts that were identified as disadvantaged in version 1.0 of the tool, but do not meet the methodology for the 2.0 version: If the census tract ID was identified as disadvantaged in version 1.0, then the census tract is considered disadvantaged.",
"defaultMessage": "For census tracts that were identified as disadvantaged in version 1.0 of the tool, but do not meet the methodology for the 2.0 version: If the census tract ID was identified as disadvantaged in version 1.0, then the census tract is considered disadvantaged",
"description": "Navigate to the methodology page. This is the methodology paragraph 1, bullet 3"
},
"methodology.page.paragraph.1.bullet.4": {
"defaultMessage": "Additionally, census tracts in certain U.S. Territories are considered disadvantaged if they meet the low income threshold only. This is because these Territories are not included in each of the nationally-consistent datasets on environmental and climate burdens currently used in the tool.",
"defaultMessage": "Additionally, census tracts in certain U.S. Territories are considered disadvantaged if they meet the low income threshold only. This is because these Territories are not included in each of the nationally-consistent datasets on environmental and climate burdens used in the tool",
"description": "Navigate to the methodology page. This is the methodology paragraph 1, bullet 5"
},
"methodology.page.paragraph.2": {

View file

@ -204,7 +204,7 @@
"explore.map.page.side.panel.indicator.lifeExpect": "Baja esperanza de vida",
"explore.map.page.side.panel.indicator.ling.iso": "Aislamiento lingüístico",
"explore.map.page.side.panel.indicator.low.income": "Bajos ingresos",
"explore.map.page.side.panel.indicator.low.income.tooltip.IMP_YES_POP_NOT_NULL": "Los distritos censales en los que faltan datos sobre ingresos<br />tienen ingresos estimados<br />basados en un promedio de los ingresos de los distritos censales circundantes.",
"explore.map.page.side.panel.indicator.low.income.tooltip.IMP_YES_POP_NOT_NULL": "Los distritos censales con conocidas poblaciones<br />que le faltan datos sobre ingresos tienen ingresos<br />estimados basados en un promedio de los ingresos<br />de los distritos censales circundantes.",
"explore.map.page.side.panel.indicator.low.income.tooltip.IMP_YES_POP_NULL": "Los ingresos no se estiman para<br />los distritos censales con poblaciones desconocidas.",
"explore.map.page.side.panel.indicator.low.med.income": "Mediana de bajos ingresos",
"explore.map.page.side.panel.indicator.med.home.val": "Mediana del valor de la vivienda",
@ -262,9 +262,10 @@
"explore.map.page.side.panel.info.para.3": " . O un simple sí o no.",
"explore.map.page.side.panel.info.para.3.part.1": "Las comunidades desfavorecidas viven en distritos censales que experimentan cargas. Se resaltan estos distritos censales ",
"explore.map.page.side.panel.info.para.3.part.2": " en el mapa.",
"explore.map.page.side.panel.info.para.4": ".",
"explore.map.page.side.panel.info.para.4.part.1": "La herramienta clasifica la mayoría de las cargas mediante el uso de percentiles ",
"explore.map.page.side.panel.info.para.4.part.2": ". Los percentiles muestran la carga que experimenta cada distrito censal en comparación con otros distritos censales.",
"explore.map.page.side.panel.info.para.4.part.1": "Los distritos censales identificados como desfavorecidos en la versión 1.0 de la herramienta se consideran desfavorecidas en esta versión de la herramienta. Se resaltan estos distritos censales ",
"explore.map.page.side.panel.info.para.4.part.2": " en el mapa.",
"explore.map.page.side.panel.info.para.5.part.1": "La herramienta clasifica la mayoría de las cargas mediante el uso de percentiles ",
"explore.map.page.side.panel.info.para.5.part.2": ". Los percentiles muestran la carga que experimenta cada distrito censal en comparación con otros distritos censales.",
"explore.map.page.side.panel.info.para.6.part1": "Se destacan las tierras dentro de los límites de las tribus reconocidas a nivel federal y las ubicaciones puntuales de los pueblos nativos de Alaska ",
"explore.map.page.side.panel.info.para.6.part2": " en el mapa. Estas comunidades también se consideran desfavorecidas.",
"explore.map.page.side.panel.is.community.of.focus": "¿Está identificada como desfavorecida?",
@ -272,7 +273,7 @@
"explore.map.page.side.panel.num.categories.exceeded": "en {numberOfDisCategories, plural, one {# categoría} otras {# categorías}}",
"explore.map.page.side.panel.partial.community.of.focus": "PARCIALMENTE",
"explore.map.page.side.panel.prio.copy.not.prio": "Este distrito censal no se considera desfavorecido. No cumple con ninguno de los umbrales <bold>O</bold> con al menos un umbral socioeconómico relacionado.",
"explore.map.page.side.panel.prio.copy.prio.island.li": "Este distrito censal se considera desfavorecido porque cumple con el umbral de bajos ingresos <bold>Y</bold> está ubicado en un territorio de los EE. UU.",
"explore.map.page.side.panel.prio.copy.prio.island.li": "Este distrito censal se considera desfavorecido porque cumple con el umbral de bajos ingresos <bold>Y</bold> se encuentra en un territorio de EE. UU. que no está incluido en cada uno de los conjuntos de datos consistentes a nivel nacional sobre cargas ambientales y climáticas que se utilizan actualmente en la herramienta.",
"explore.map.page.side.panel.prio.copy.not.prio.n.burden": "Este distrito censal no se considera desfavorecido. Cumple con más de 1 umbral de carga <bold>PERO</bold> con ningún umbral socioeconómico asociado.",
"explore.map.page.side.panel.prio.copy.not.prio.one.burden": "Este distrito censal no se considera desfavorecido. Cumple con 1 umbral de carga <bold>PERO</bold> con ningún umbral socioeconómico asociado.",
"explore.map.page.side.panel.prio.copy.not.prio.surr.li": "Este distrito censal no se considera desfavorecido. Está rodeado de distritos censales desfavorecidos <bold>PERO</bold> no cumple con el umbral ajustado de bajos ingresos. El ajuste no corresponde a ninguna de las categorías.",
@ -330,7 +331,7 @@
"faqs.page.answers.Q15_P1_4": "El público también puede enviar un correo electrónico a {general_email_address}",
"faqs.page.answers.Q16_P1": "CEQ lanzó una versión beta (o borrador) del CEJST en febrero de 2022 con el apoyo del Servicio Digital de EE. UU. (USDS) y en colaboración con otras agencias y departamentos federales. El CEJST se lanzó en una versión beta para buscar <link1>comentarios</link1> de agencias federales, naciones tribales, gobiernos estatales y locales, miembros del Congreso, partes interesadas en la justicia ambiental y el público. El período de comentarios públicos de 90 días fue <link2>cerrado</link2> el 25 de mayo de 2022. CEQ y el USDS organizaron varios <link3>entrenamientos públicos</link3> sobre la versión beta del CEJST. Todos estos comentarios sobre la versión beta del CEJST ayudaron a informar el lanzamiento de la versión 1.0 del CEJST.",
"faqs.page.answers.Q16_P2": "La versión 1.0 se lanzó en <link1>{version1Release}</link1>. La versión actual, la versión {currentVersion}, se publicó en {currentVersionRelease}.",
"faqs.page.answers.Q19": "La Herramienta de evaluación de la justicia climática y económica (CEJST) dispone de <link1>descargas</link1>. Las planillas de cálculo (.xlxs) y (.csv) contienen definiciones y datos de la herramienta. Estos datos pueden utilizarse para el análisis. Los archivos de forma y GeoJSON pueden cargarse en otros programas cartográficos como Esri. Las descargas incluyen información sobre cómo utilizar los archivos. La información de versiones anteriores de la herramienta está disponible en la página <link2>versiones anteriores</link2>.",
"faqs.page.answers.Q19": "La Herramienta de evaluación de la justicia climática y económica (CEJST) dispone de <link1>descargas</link1>. Las planillas de cálculo (.xlxs) y (.csv) contienen definiciones y datos de la herramienta. Estos datos pueden utilizarse para el análisis. Los archivos de forma y GeoJSON pueden cargarse en otros programas cartográficos como Esri. Las descargas incluyen información sobre cómo utilizar los archivos (columns.csv). La información de versiones anteriores de la herramienta está disponible en la página <link2>versiones anteriores</link2>.",
"faqs.page.answers.Q1_P1": "El CEJST es una herramienta de mapeo geoespacial que identifica comunidades desfavorecidas que enfrentan cargas. La herramienta tiene un mapa interactivo y utiliza conjuntos de datos que son indicadores de cargas.",
"faqs.page.answers.Q1_P2": "El público puede encontrar comunidades de interés y proporcionar comentarios al respecto. Estos comentarios se usarán para mejorar la herramienta.",
"faqs.page.answers.Q20_P1": "Los archivos de forma pueden cargarse en otros programas cartográficos como Esri.",
@ -353,7 +354,7 @@
"faqs.page.answers.Q5_P1": "Para respetar la soberanía tribal y el autogobierno y cumplir con las responsabilidades del fideicomiso federal y del tratado con las naciones tribales, las tierras dentro de los límites de las tribus reconocidas a nivel federal se resaltan como desfavorecidas en el mapa. Los pueblos nativos de Alaska se incluyen como ubicaciones puntuales que son más pequeñas que los distritos censales Los límites de los distritos censales y las tierras de las tribus reconocidas a nivel federal son diferentes.",
"faqs.page.answers.Q5_P2": "Las tribus reconocidas a nivel federal son las reconocidas por la Oficina de Asuntos Indígenas de los Estados Unidos en el <link1>aviso anual</link1> que publica en el Registro Federal:",
"faqs.page.answers.Q5_P2_1": "Esta decisión se tomó tras una consulta significativa y sólida con las naciones tribales. Este enfoque coincide con el <link1>Plan de acción para la consulta y coordinación con las naciones tribales del CEQ</link1>, <link3>el Memorando sobre la Consulta de las naciones tribales y fortalecimiento de las consultas entre naciones</link3>, y la <link2>Orden ejecutiva 13175 sobre Consulta y coordinación con los gobiernos de las tribus indias</link2>.",
"faqs.page.answers.Q6_P1": "Algunos distritos censales que contienen tierras dentro de los límites de tribus reconocidas a nivel federal también se consideran desfavorecidas porque cumplen los umbrales de carga para al menos una de las categorías de la herramienta. Cuando esto ocurre, las zonas aparecen más oscuras en el mapa de la herramienta.",
"faqs.page.answers.Q6_P1": "Las diferentes áreas del mapa tendrán diferentes colores porque se identifican como desfavorecidas de diferentes maneras. Algunos distritos censales que contienen tierras dentro de los límites de tribus reconocidas a nivel federal también se consideran desfavorecidas porque cumplen los umbrales de carga para al menos una de las categorías de la herramienta. Cuando esto ocurre, las zonas aparecen más oscuras en el mapa de la herramienta.",
"faqs.page.answers.Q6_P2": ": Distritos censales desfavorecidos (cumple la metodología del umbral O contiene tierras de las tribus)",
"faqs.page.answers.Q6_P3": ": Distritos censales desfavorecidos y tierras dentro de los límites de tribus reconocidas a nivel federal (cumple la metodología de umbral Y contiene tierras de las tribus)",
"faqs.page.answers.Q6_P4": "Cualquier zona que aparezca resaltada se considera desfavorecida, independientemente de que sea un tono claro u oscuro. La herramienta mostrará si todo un distrito censal se considera desfavorecido o sólo las partes que se encuentran dentro de los límites de las tribus reconocidas a nivel federal.",
@ -446,7 +447,7 @@
"methodology.page.category.trans.barrier.description.text": "Costo promedio relativo y tiempo dedicado al transporte en relación con el resto de distritos censales.",
"methodology.page.category.trans.barrier.note.text": "<boldtag>Nota: </boldtag>esta carga sólo se aplica a los distritos censales con una población superior a 20 personas.",
"methodology.page.category.tribal.lands.description.text": "El conjunto de datos de la Representación de área de tierra (LAR) representa las áreas de tierra de los indígenas americanos para las tribus reconocidas a nivel federal.",
"methodology.page.category.tribal.lands.note.text": "<boldtag>Nota: </boldtag>El conjunto de datos LAR representa la extensión exterior de un área de tierra indígena federal. No todas las tribus reconocidas a nivel federal tienen un área de tierra designada; por lo tanto, es posible que no tengan un área de tierra asociada representada en el conjunto de datos de área de tierra.",
"methodology.page.category.tribal.lands.note.text": "<boldtag>Nota: </boldtag>El conjunto de datos LAR representa la extensión exterior de un área de tierra indígena federal. No todas las tribus reconocidas a nivel federal tienen un área de tierra designada; por lo tanto, es posible que no tengan un área de tierra asociada representada en el conjunto de datos de área de tierra.{linebreak}{linebreak}El Departamento del Interior no ofrece ninguna garantía legal por la aplicación de estos datos como un límite legal",
"methodology.page.category.unemploy.description.text": "Número de personas desempleadas como porcentaje de la fuerza laboral",
"methodology.page.category.waste.water.description.text": "El Modelo de los indicadores ambientales para detección del riesgo (RSEI) representa concentraciones tóxicas en segmentos de flujos de agua a menos de 500 metros de distancia, divididos por distancia en kilómetros.",
"methodology.page.category.wildfire.risk.rate.description.text": "Un modelo de 30 metros de resolución que proyecta la exposición a incendios forestales para cualquier ubicación específica en los EE. UU. contiguos, en la actualidad y con el cambio climático futuro. El riesgo de incendio forestal se calcula a partir de entradas asociadas a los combustibles del fuego, el clima, la influencia humana y el movimiento del fuego. El riesgo no tiene en cuenta el valor de la propiedad.",
@ -534,9 +535,9 @@
"methodology.page.paragraph.1": "La herramienta destaca los distritos censales desfavorecidos de los 50 estados, el Distrito de Columbia y los territorios estadounidenses. Las comunidades se consideran desfavorecidas:",
"methodology.page.paragraph.2": "La herramienta utiliza conjuntos de datos como indicadores de cargas. Las cargas están organizadas en categorías. Una comunidad se destaca como desfavorecida en el mapa CEJST si se encuentra en un distrito censal que está (1) en o por encima del umbral para una o más cargas ambientales, climáticas u otras, y (2) en o por encima del umbral de carga socioeconómica asociada.",
"methodology.page.paragraph.1.bullet.1": "Si se encuentran en un distrito censal que cumple con los umbrales de al menos una de las categorías de carga de la herramienta, o",
"methodology.page.paragraph.1.bullet.2": "Si están en tierras dentro de los límites de las tribus reconocidas a nivel federal.",
"methodology.page.paragraph.1.bullet.3": "Para los distritos censales que se identificaron como desfavorecidos en la versión 1.0 de la herramienta, pero que no cumplen con la metodología para la versión 2.0: si el distrito censal se identificó como desfavorecido en la versión 1.0, entonces el distrito censal se considera desfavorecido.",
"methodology.page.paragraph.1.bullet.4": "Además, los ditritos censales en ciertos territorios de EE. UU. se consideran desfavorecidas si solo alcanzan el umbral de bajos ingresos. Esto se debe a que estos Territorios no están incluidos en cada uno de los conjuntos de datos consistentes a nivel nacional sobre cargas ambientales y climáticas que se utilizan actualmente en la herramienta.",
"methodology.page.paragraph.1.bullet.2": "Si están en tierras dentro de los límites de las tribus reconocidas a nivel federal",
"methodology.page.paragraph.1.bullet.3": "Para los distritos censales que se identificaron como desfavorecidos en la versión 1.0 de la herramienta, pero que no cumplen con la metodología para la versión 2.0: si el distrito censal se identificó como desfavorecido en la versión 1.0, entonces el distrito censal se considera desfavorecido",
"methodology.page.paragraph.1.bullet.4": "Además, los ditritos censales en ciertos territorios de EE. UU. se consideran desfavorecidas si solo alcanzan el umbral de bajos ingresos. Esto se debe a que estos Territorios no están incluidos en cada uno de los conjuntos de datos consistentes a nivel nacional sobre cargas ambientales y climáticas que se utilizan en la herramienta",
"methodology.page.paragraph.3": "La herramienta utiliza conjuntos de datos que son indicadores de cargas. Las cargas se organizan en categorías. Una comunidad se destaca como desfavorecida en el mapa de la CEJST si se encuentra en un distrito censal que está (1) en o por encima del umbral para una o más cargas ambientales, climáticas o de otro tipo, y (2) en o por encima del umbral para una carga socioeconómica asociada.",
"methodology.page.paragraph.4": "Además, también se considera desfavorecido un distrito censal que esté completamente rodeado de comunidades desfavorecidas y se sitúe en el percentil 50 o por encima de él en cuanto a ingresos bajos.",
"methodology.page.paragraph.5": "Las tribus reconocidas a nivel federal, incluidos los pueblos nativos de Alaska, también se consideran comunidades desfavorecidas.",

View file

@ -17,6 +17,8 @@ import * as FAQS_COPY from '../data/copy/faqs';
import censusDotIcon from '../images/sidePanelIcons/census-tract.svg';
// @ts-ignore
import tribalDotIcon from '../images/sidePanelIcons/tribal-tract.svg';
// @ts-ignore
import grandfatheredDotIcon from '../images/sidePanelIcons/grandfathered-tract.svg';
interface IFAQPageProps {
location: Location;
@ -101,7 +103,13 @@ const FAQPage = ({location}: IFAQPageProps) => {
/>
<div style={dotStyles.p}>{FAQS_COPY.FAQ_ANSWERS.Q6_P3}</div>
</div>
<p>{FAQS_COPY.FAQ_ANSWERS.Q6_P4}</p>
<div style={dotStyles}>
<img style={dotStylesTribal} src={grandfatheredDotIcon}
alt={intl.formatMessage(SIDE_PANEL_INIT_STATE_ICON_ALT_TEXT.DAC_CIRCLE)}
/>
<div style={dotStyles.p}>{FAQS_COPY.FAQ_ANSWERS.Q6_P4}</div>
</div>
<p>{FAQS_COPY.FAQ_ANSWERS.Q6_P5}</p>
</>
),
(
@ -140,8 +148,8 @@ const FAQPage = ({location}: IFAQPageProps) => {
),
(
<>
<p key={16}>{FAQS_COPY.FAQ_ANSWERS.Q16_P1}</p>
<p key={16}>{FAQS_COPY.FAQ_ANSWERS.Q16_P2}</p>
<p key={16-1}>{FAQS_COPY.FAQ_ANSWERS.Q16_P1}</p>
<p key={16-2}>{FAQS_COPY.FAQ_ANSWERS.Q16_P2}</p>
</>
),
(

View file

@ -672,7 +672,7 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
id="faq-id-5"
>
<p>
Some census tracts that contain land within the boundaries of Federally Recognized Tribes are also considered disadvantaged because they meet the burden thresholds for at least one of the categories on the tool. When this happens, the areas appear darker on the tools map.
Different areas of the map will have different colors because they are identified as disadvantaged in different ways. Some census tracts that contain land within the boundaries of Federally Recognized Tribes are also considered disadvantaged because they meet the burden thresholds for at least one of the categories on the tool. When this happens, the areas appear darker on the tools map.
</p>
<div
style="display: flex;"
@ -707,6 +707,23 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
</div>
</div>
<div
style="display: flex;"
>
<img
alt="
a blue circle icon informing the user of what a disadvantaged community is depicted as
"
src="test-file-stub"
style="align-self: baseline; padding-top: 5px;"
/>
<div
style="padding-left: 2px;"
>
: Disadvantaged census tracts (grandfathered)
</div>
</div>
<p>
Any area that is highlighted is considered disadvantaged, regardless of whether it is a light shade or dark shade. The tool will show if a whole census tract is considered disadvantaged or just the parts that contain land within the boundaries of Federally Recognized Tribes.
</p>
@ -990,7 +1007,7 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
>
downloads
</a>
for the current version available. Spreadsheets (.xlxs) and (.csv) contain the tools definitions and data. These data can be used for analysis. Shapefiles and GeoJSON files can be uploaded into other mapping programs such as Esri. The downloads include information on how to use the files. Information from previous versions of the tool is available on the
for the current version available. Spreadsheets (.xlxs) and (.csv) contain the tools definitions and data. These data can be used for analysis. Shapefiles and GeoJSON files can be uploaded into other mapping programs such as Esri. The downloads include information on how to use the files (columns.csv). Information from previous versions of the tool is available on the
<a
class="usa-link"
href="/en/previous-versions"
@ -1099,7 +1116,7 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
id="faq-id-15"
>
<p>
Because some nationally-consistent datasets on indicators of environmental or climate burden used in the tool do not currently include data from certain U.S. Territories, tracts in these Territories are considered disadvantaged if they meet the low income threshold only.
Because some nationally-consistent datasets on indicators of environmental or climate burden used in the tool do not currently include data for certain U.S. Territories, tracts in these Territories are considered disadvantaged if they meet the low income threshold only.
</p>
</div>
</div>

View file

@ -449,21 +449,21 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
<li>
<p>
If they are on land within the boundaries of Federally Recognized Tribes.
If they are on land within the boundaries of Federally Recognized Tribes
</p>
</li>
<li>
<p>
For census tracts that were identified as disadvantaged in version 1.0 of the tool, but do not meet the methodology for the 2.0 version: If the census tract ID was identified as disadvantaged in version 1.0, then the census tract is considered disadvantaged.
For census tracts that were identified as disadvantaged in version 1.0 of the tool, but do not meet the methodology for the 2.0 version: If the census tract ID was identified as disadvantaged in version 1.0, then the census tract is considered disadvantaged
</p>
</li>
<li>
<p>
Additionally, census tracts in certain U.S. Territories are considered disadvantaged if they meet the low income threshold only. This is because these Territories are not included in each of the nationally-consistent datasets on environmental and climate burdens currently used in the tool.
Additionally, census tracts in certain U.S. Territories are considered disadvantaged if they meet the low income threshold only. This is because these Territories are not included in each of the nationally-consistent datasets on environmental and climate burdens used in the tool
</p>
</li>
@ -2017,7 +2017,7 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
rel="noreferrer"
target="_blank"
>
The Trust for Public Lands
The Trust for Public Land
</a>
and
<a
@ -2118,7 +2118,7 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
</div>
<div>
Share of homes built before 1960, which indicates potential lead paint exposure. Tracts with extremely high home values (i.e. median home values above the 90th percentile) that are less likely to face health risks from lead paint exposure are not included.
Share of homes built before 1960, which indicates potential lead paint exposure. Tracts with extremely high home values (i.e., median home values above the 90th percentile) that are less likely to face health risks from lead paint exposure are not included.
</div>
<ul>
@ -3098,6 +3098,10 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
</strong>
The LAR dataset depicts the exterior extent of a Federal Indian land area. Not all Federally Recognized Tribes have a designated land area; therefore, they may not have an associated land area represented in the land area dataset.
<br />
<br />
The Department of the Interior makes no warrant for legal application of this data such as a legal boundary.
</p>
</div>
<ul>

View file

@ -0,0 +1,17 @@
./data_pipeline/data/census/csv/*
./data_pipeline/data/census/geojson/*
./data_pipeline/data/census/shp/*
./data_pipeline/data/dataset/*
./data_pipeline/data/score/csv/*
./data_pipeline/data/score/downloadable/*
./data_pipeline/data/score/geojson/*
./data_pipeline/data/score/search/*
./data_pipeline/data/score/shapefile/*
./data_pipeline/data/score/tiles/*
./data_pipeline/data/sources/*
./data_pipeline/data/tmp/*
./data_pipeline/data/tribal/csv/*
./data_pipeline/data/tribal/geographic_data/*
./data_pipeline/data/tribal/geojson/*
./data_pipeline/data/tribal/tiles/*

View file

@ -1,4 +1,4 @@
FROM ubuntu:20.04
FROM ubuntu:22.04
ENV TZ=America/Los_Angeles
@ -10,13 +10,13 @@ RUN apt-get update && TZ=America/Los_Angeles DEBIAN_FRONTEND=noninteractive apt-
git \
unzip \
wget \
python3-dev \
python3-pip \
gdal-bin
software-properties-common \
libsqlite3-dev \
zlib1g-dev
# tippeanoe
# tippecanoe
RUN apt-get update
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt-get install -y software-properties-common libsqlite3-dev zlib1g-dev
RUN apt-add-repository -y ppa:git-core/ppa
RUN mkdir -p /tmp/tippecanoe-src && git clone https://github.com/mapbox/tippecanoe.git /tmp/tippecanoe-src
WORKDIR /tmp/tippecanoe-src
@ -24,7 +24,18 @@ RUN /bin/sh -c make && make install
## gdal
RUN add-apt-repository ppa:ubuntugis/ppa
RUN apt-get -y install gdal-bin
RUN apt-get -y install gdal-bin libgdal-dev
# Install python3.10
RUN add-apt-repository ppa:deadsnakes/ppa
RUN apt install -y python3.10-dev
RUN apt install -y python3-pip
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 1
RUN update-alternatives --config python3
# Copy all project files into the container
COPY . /data-pipeline
WORKDIR /data-pipeline
# Python package installation using poetry. See:
# https://stackoverflow.com/questions/53835198/integrating-python-poetry-with-docker
@ -34,16 +45,14 @@ ENV PYTHONFAULTHANDLER=1 \
PIP_NO_CACHE_DIR=off \
PIP_DISABLE_PIP_VERSION_CHECK=on \
PIP_DEFAULT_TIMEOUT=100 \
POETRY_VERSION=1.1.12
WORKDIR /data-pipeline
COPY . /data-pipeline
POETRY_VERSION=1.8.4
RUN pip install "poetry==$POETRY_VERSION"
RUN poetry config virtualenvs.create false \
&& poetry config virtualenvs.in-project false \
&& poetry install --no-dev --no-interaction --no-ansi
&& poetry install --only main --no-interaction --no-ansi
RUN pip install openpyxl
# Copy all project files into the container
CMD python3 -m data_pipeline.application data-full-run --check -s aws
# Default behavior is to output the options for the base application. This prevents the entire pipeline from running unintentionally.
ENV PIPELINE_CMD="data_pipeline.application --help"
CMD ["sh", "-c", "poetry run python3 -m $PIPELINE_CMD"]

View file

@ -88,10 +88,11 @@ def data_cleanup():
log_info("Cleaning up all data folders")
census_reset(data_path)
data_folder_cleanup()
tribal_reset(data_path)
downloadable_cleanup()
score_folder_cleanup()
temp_folder_cleanup()
geo_score_folder_cleanup()
tribal_reset(data_path)
log_goodbye()
@ -304,39 +305,61 @@ def data_full_run(check: bool, data_source: str, use_cache: bool):
log_title("Full Run", "Census DL, ETL, Score, Combine, Generate Tiles")
data_path = settings.APP_ROOT / "data"
first_run = False
if check:
if not check_first_run():
# check if the data full run has been run before
first_run = True
if first_run:
log_info("The data full run was already executed")
sys.exit()
else:
# census directories
# Directory cleanup
log_info("Cleaning up data folders")
census_reset(data_path)
data_folder_cleanup()
downloadable_cleanup()
score_folder_cleanup()
geo_score_folder_cleanup()
temp_folder_cleanup()
tribal_reset(data_path)
if data_source == "local":
log_info("Downloading census data")
etl_runner("census", use_cache)
log_info("Running all ETLs")
etl_runner(use_cache=use_cache)
etl_runner(use_cache=True)
log_info("Running tribal ETL")
etl_runner("tribal", use_cache)
else:
log_info("Downloading census data")
etl_runner("census", use_cache=False)
log_info("Running all ETLs")
etl_runner(use_cache=False)
log_info("Running tribal ETL")
etl_runner("tribal", use_cache=False)
log_info("Generating score")
score_generate()
log_info("Running post score")
downloadable_cleanup()
score_post(data_source)
log_info("Combining score with census GeoJSON")
score_geo(data_source)
log_info("Generating map tiles")
generate_tiles(data_path, False)
log_info("Generating tribal map tiles")
generate_tiles(data_path, True)
log_info("Completing pipeline")
@ -427,6 +450,7 @@ def full_post_etl(ctx):
ctx.invoke(generate_score_post, data_source=None)
ctx.invoke(geo_score, data_source=None)
ctx.invoke(generate_map_tiles, generate_tribal_layer=False)
ctx.invoke(generate_map_tiles, generate_tribal_layer=True)
@cli.command(
@ -440,6 +464,7 @@ def full_run(ctx, use_cache):
ctx.invoke(data_cleanup)
ctx.invoke(census_data_download, zip_compress=False, use_cache=use_cache)
ctx.invoke(etl_run, dataset=None, use_cache=use_cache)
ctx.invoke(etl_run, dataset="tribal", use_cache=use_cache)
ctx.invoke(full_post_etl)

View file

@ -257,6 +257,7 @@ def _generate_delta(prod_df: pd.DataFrame, local_df: pd.DataFrame):
f" There are {len(comparison_results_df.index):,} tracts with at least one difference.\n"
)
WORKING_PATH.mkdir(parents=True, exist_ok=True)
comparison_path = WORKING_PATH / "deltas.csv"
comparison_results_df.to_csv(path_or_buf=comparison_path)

View file

@ -7,6 +7,7 @@ import shutil
from pathlib import Path
from data_pipeline.config import settings
from data_pipeline.utils import get_module_logger
from tenacity import retry, stop_after_attempt, wait_exponential
logger = get_module_logger(__name__)
@ -15,6 +16,10 @@ class Downloader:
"""A simple class to encapsulate the download capabilities of the application"""
@classmethod
@retry(
stop=stop_after_attempt(3),
wait=wait_exponential(multiplier=1, min=4, max=10),
)
def download_file_from_url(
cls,
file_url: str,
@ -58,6 +63,10 @@ class Downloader:
return download_file_name
@classmethod
@retry(
stop=stop_after_attempt(3),
wait=wait_exponential(multiplier=1, min=4, max=10),
)
def download_zip_file_from_url(
cls,
file_url: str,

View file

@ -21,5 +21,9 @@ def reset_data_directories(
)
# geojson
geojson_path = tribal_data_path / "geojson"
geojson_path = tribal_data_path / "geographic_data"
remove_all_from_dir(geojson_path)
# tiles
tiles_path = tribal_data_path / "tiles"
remove_all_from_dir(tiles_path)

View file

@ -218,6 +218,7 @@ def score_folder_cleanup() -> None:
remove_all_from_dir(data_path / "score" / "geojson")
remove_all_from_dir(data_path / "score" / "tiles")
remove_all_from_dir(data_path / "score" / "shapefile")
remove_all_from_dir(data_path / "score" / "search")
downloadable_cleanup()

View file

@ -5053,4 +5053,4 @@ test = ["mypy", "pre-commit", "pytest", "pytest-asyncio", "websockets (>=10.0)"]
[metadata]
lock-version = "2.0"
python-versions = "^3.10"
content-hash = "04639d2eaf33218ba4fef190f76620b00fb2285d86d58458511d85dafd304658"
content-hash = "3b59246d964a1dd70669a6b612fbd4d8581a22959e3b6f8e3b542d102e125903"

View file

@ -41,6 +41,7 @@ xlsxwriter = "^2.0.0"
pydantic = "^1.9.0"
Rtree = "^1.0.0"
fiona = "~1.8.21"
tenacity = ">=5.0.2"
[tool.poetry.group.dev.dependencies]
black = "^21"

View file

@ -1,4 +1,3 @@
version: "3.4"
services:
# The j40_data_pipeline service runs the ETL pipeline to create the score
score:
@ -15,6 +14,7 @@ services:
ENV_FOR_DYNACONF: development
PYTHONUNBUFFERED: 1
TZ: America/Los_Angeles
PIPELINE_CMD: $PIPELINE_CMD
# The score_server serves the data-pipeline volume as a URL
j40_score_server:
@ -23,26 +23,21 @@ services:
build: data/data-serve/.
volumes:
- ./data/data-pipeline/data_pipeline/data/score:/data/data-pipeline/data_pipeline/data/score
- ./data/data-pipeline/data_pipeline/data/tribal:/data/data-pipeline/data_pipeline/data/tribal
ports:
- 5000:8080
environment:
TZ: America/Los_Angeles
#The j40_website service runs the web app / map / site
j40_website:
image: j40_website
container_name: j40_website_1
build: ./client
build: client
environment:
# See the client readme for more info on environment variables:
# https://github.com/usds/justice40-tool/blob/main/client/README.md
DATA_SOURCE: local
# If you want the map to render a MapBox base map (as opposed to the
# open source one from CartoDB), please create your own API TOKEN from
# your MapBox account and add the token here:
MAPBOX_STYLES_READ_TOKEN: ""
TZ: America/Los_Angeles
volumes:
- ./client/src:/client/src