mirror of
https://github.com/DOI-DO/j40-cejst-2.git
synced 2025-02-22 17:44:20 -08:00
Merge pull request #42 from agilesix/cfelix/merge-v2-20241220
CEQ-J40 merge v2 code - 20241220
This commit is contained in:
commit
f4e0f63363
14 changed files with 205 additions and 119 deletions
|
@ -1025,6 +1025,23 @@ const AreaDetail = ({properties}: IAreaDetailProps) => {
|
||||||
categories[0].indicators = [lowMedInc, unemploy, poverty];
|
categories[0].indicators = [lowMedInc, unemploy, poverty];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const isTerritory = constants.TILES_ISLAND_AREA_FIPS_CODES.some((code) => {
|
||||||
|
return properties[constants.GEOID_PROPERTY].startsWith(code);
|
||||||
|
});
|
||||||
|
|
||||||
|
const isGrandfathered = properties[constants.IS_GRANDFATHERED];
|
||||||
|
// Show Donut information !isGrandfathered
|
||||||
|
const showDonutCopy = !isGrandfathered &&
|
||||||
|
properties[constants.ADJACENCY_EXCEEDS_THRESH] &&
|
||||||
|
properties[constants.TOTAL_NUMBER_OF_DISADVANTAGE_INDICATORS] === 0;
|
||||||
|
const showIslandCopy = isTerritory && !showDonutCopy;
|
||||||
|
|
||||||
|
// For territories we use the poverty percentile from the census decennial data
|
||||||
|
const poveryPercentile = isTerritory ?
|
||||||
|
properties[constants.CENSUS_DECENNIAL_POVERTY_LESS_THAN_200_FPL_PERCENTILE] :
|
||||||
|
properties[constants.POVERTY_BELOW_200_PERCENTILE] > 0 ?
|
||||||
|
properties[constants.POVERTY_BELOW_200_PERCENTILE] :
|
||||||
|
null;
|
||||||
/**
|
/**
|
||||||
* Create the AccoridionItems by mapping over the categories array. In this array we define the
|
* Create the AccoridionItems by mapping over the categories array. In this array we define the
|
||||||
* various indicators for a specific category. This is an array which then maps over the
|
* various indicators for a specific category. This is an array which then maps over the
|
||||||
|
@ -1065,12 +1082,6 @@ const AreaDetail = ({properties}: IAreaDetailProps) => {
|
||||||
{EXPLORE_COPY.SIDE_PANEL_SPACERS.AND}
|
{EXPLORE_COPY.SIDE_PANEL_SPACERS.AND}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Exceeds both socioeconomic burdens */}
|
|
||||||
{/* <ExceedBurden
|
|
||||||
text={EXPLORE_COPY.SIDE_PANEL_SPACERS.EXCEED_BOTH_SOCIO}
|
|
||||||
isBurdened={category.isExceedBothSocioBurdens}
|
|
||||||
/> */}
|
|
||||||
|
|
||||||
{/* socioeconomic indicators */}
|
{/* socioeconomic indicators */}
|
||||||
{category.socioEcIndicators.map((indicator: any, index: number) => {
|
{category.socioEcIndicators.map((indicator: any, index: number) => {
|
||||||
return (
|
return (
|
||||||
|
@ -1192,27 +1203,14 @@ const AreaDetail = ({properties}: IAreaDetailProps) => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Show IslandCopy if the GeoID matches an island prefix */}
|
{showIslandCopy &&
|
||||||
{constants.TILES_ISLAND_AREA_FIPS_CODES.some((code) => {
|
<IslandCopy povertyPercentile={poveryPercentile} />}
|
||||||
return properties[constants.GEOID_PROPERTY].startsWith(code);
|
{showDonutCopy &&
|
||||||
}) && (
|
|
||||||
<IslandCopy povertyPercentile={ properties[constants.CENSUS_DECENNIAL_POVERTY_LESS_THAN_200_FPL_PERCENTILE]} />
|
|
||||||
)}
|
|
||||||
|
|
||||||
{/* Only show the DonutCopy if Adjacency index is true, the total number of disadv ind == 0,
|
|
||||||
and not grandfathered. */}
|
|
||||||
{properties[constants.ADJACENCY_EXCEEDS_THRESH] &&
|
|
||||||
properties[constants.TOTAL_NUMBER_OF_DISADVANTAGE_INDICATORS] === 0 &&
|
|
||||||
!properties[constants.IS_GRANDFATHERED] && (
|
|
||||||
<DonutCopy
|
<DonutCopy
|
||||||
isAdjacent={properties[constants.ADJACENCY_EXCEEDS_THRESH]}
|
isAdjacent={properties[constants.ADJACENCY_EXCEEDS_THRESH]}
|
||||||
povertyBelow200Percentile={
|
povertyBelow200Percentile={poveryPercentile}
|
||||||
properties[constants.POVERTY_BELOW_200_PERCENTILE] > 0 ?
|
|
||||||
properties[constants.POVERTY_BELOW_200_PERCENTILE] :
|
|
||||||
null
|
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
)}
|
}
|
||||||
|
|
||||||
{/* Send Feedback button */}
|
{/* Send Feedback button */}
|
||||||
<a
|
<a
|
||||||
|
|
|
@ -176,7 +176,7 @@ exports[`rendering of the J40Header checks if component renders 1`] = `
|
||||||
<p
|
<p
|
||||||
class="usa-alert__text"
|
class="usa-alert__text"
|
||||||
>
|
>
|
||||||
The Council on Environmental Quality (CEQ) made the 2.0 version of the tool available on Dec 19, 2024.
|
The Council on Environmental Quality (CEQ) made the 2.0 version of the tool available on Dec 20, 2024.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -27,7 +27,7 @@ exports[`rendering of ReleaseUpdate Component checks if component renders 1`] =
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<div>
|
||||||
Version 2.0 Release update - Dec 19, 2024
|
Version 2.0 Release update - Dec 20, 2024
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
New & Improved
|
New & Improved
|
||||||
|
|
|
@ -18,7 +18,7 @@ exports[`rendering of the UpdateBanner renders large version before cutoff date
|
||||||
<p
|
<p
|
||||||
class="usa-alert__text"
|
class="usa-alert__text"
|
||||||
>
|
>
|
||||||
The Council on Environmental Quality (CEQ) made the 2.0 version of the tool available on Dec 19, 2024.
|
The Council on Environmental Quality (CEQ) made the 2.0 version of the tool available on Dec 20, 2024.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -33,7 +33,7 @@ exports[`rendering of the UpdateBanner renders small version at cutoff date 1`]
|
||||||
<strong>
|
<strong>
|
||||||
This tool has been updated.
|
This tool has been updated.
|
||||||
</strong>
|
</strong>
|
||||||
The 2.0 version of the tool was released on Dec 19, 2024.
|
The 2.0 version of the tool was released on Dec 20, 2024.
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</DocumentFragment>
|
</DocumentFragment>
|
||||||
|
|
|
@ -30,7 +30,7 @@ export const FEEDBACK_EMAIL = 'Screeningtool-Support@omb.eop.gov';
|
||||||
|
|
||||||
export const METH_BETA_RELEASE_DATE = new Date(2022, 1, 18, 11, 59, 59); // Feb 18 2022
|
export const METH_BETA_RELEASE_DATE = new Date(2022, 1, 18, 11, 59, 59); // Feb 18 2022
|
||||||
export const METH_1_0_RELEASE_DATE = new Date(2022, 10, 22, 11, 59, 59); // Nov 22 2022
|
export const METH_1_0_RELEASE_DATE = new Date(2022, 10, 22, 11, 59, 59); // Nov 22 2022
|
||||||
export const METH_2_0_RELEASE_DATE = new Date(2024, 11, 19, 11, 59, 59); // Dec 19 2024
|
export const METH_2_0_RELEASE_DATE = new Date(2024, 11, 20, 11, 59, 59); // Dec 19 2024
|
||||||
|
|
||||||
|
|
||||||
// Update Banner
|
// Update Banner
|
||||||
|
|
|
@ -176,7 +176,7 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
|
||||||
<p
|
<p
|
||||||
class="usa-alert__text"
|
class="usa-alert__text"
|
||||||
>
|
>
|
||||||
The Council on Environmental Quality (CEQ) made the 2.0 version of the tool available on Dec 19, 2024.
|
The Council on Environmental Quality (CEQ) made the 2.0 version of the tool available on Dec 20, 2024.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -176,7 +176,7 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
|
||||||
<p
|
<p
|
||||||
class="usa-alert__text"
|
class="usa-alert__text"
|
||||||
>
|
>
|
||||||
The Council on Environmental Quality (CEQ) made the 2.0 version of the tool available on Dec 19, 2024.
|
The Council on Environmental Quality (CEQ) made the 2.0 version of the tool available on Dec 20, 2024.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -176,7 +176,7 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
|
||||||
<p
|
<p
|
||||||
class="usa-alert__text"
|
class="usa-alert__text"
|
||||||
>
|
>
|
||||||
The Council on Environmental Quality (CEQ) made the 2.0 version of the tool available on Dec 19, 2024.
|
The Council on Environmental Quality (CEQ) made the 2.0 version of the tool available on Dec 20, 2024.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -462,7 +462,7 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<div>
|
||||||
Version 2.0 Release update - Dec 19, 2024
|
Version 2.0 Release update - Dec 20, 2024
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
New & Improved
|
New & Improved
|
||||||
|
|
|
@ -176,7 +176,7 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
|
||||||
<p
|
<p
|
||||||
class="usa-alert__text"
|
class="usa-alert__text"
|
||||||
>
|
>
|
||||||
The Council on Environmental Quality (CEQ) made the 2.0 version of the tool available on Dec 19, 2024.
|
The Council on Environmental Quality (CEQ) made the 2.0 version of the tool available on Dec 20, 2024.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -176,7 +176,7 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
|
||||||
<p
|
<p
|
||||||
class="usa-alert__text"
|
class="usa-alert__text"
|
||||||
>
|
>
|
||||||
The Council on Environmental Quality (CEQ) made the 2.0 version of the tool available on Dec 19, 2024.
|
The Council on Environmental Quality (CEQ) made the 2.0 version of the tool available on Dec 20, 2024.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -176,7 +176,7 @@ exports[`rendering of the Privacy Policy page matches Privacy Policy page snapsh
|
||||||
<p
|
<p
|
||||||
class="usa-alert__text"
|
class="usa-alert__text"
|
||||||
>
|
>
|
||||||
The Council on Environmental Quality (CEQ) made the 2.0 version of the tool available on Dec 19, 2024.
|
The Council on Environmental Quality (CEQ) made the 2.0 version of the tool available on Dec 20, 2024.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -176,7 +176,7 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
|
||||||
<p
|
<p
|
||||||
class="usa-alert__text"
|
class="usa-alert__text"
|
||||||
>
|
>
|
||||||
The Council on Environmental Quality (CEQ) made the 2.0 version of the tool available on Dec 19, 2024.
|
The Council on Environmental Quality (CEQ) made the 2.0 version of the tool available on Dec 20, 2024.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -961,7 +961,13 @@ class ScoreNarwhal(Score):
|
||||||
self.df[
|
self.df[
|
||||||
field_names.POVERTY_LESS_THAN_200_FPL_IMPUTED_FIELD
|
field_names.POVERTY_LESS_THAN_200_FPL_IMPUTED_FIELD
|
||||||
+ field_names.PERCENTILE_FIELD_SUFFIX
|
+ field_names.PERCENTILE_FIELD_SUFFIX
|
||||||
|
].fillna(
|
||||||
|
# low income percentile field null in non-PR territories,
|
||||||
|
# need to fill in with the territory-specific percentiles
|
||||||
|
self.df[
|
||||||
|
field_names.CENSUS_DECENNIAL_POVERTY_LESS_THAN_200_FPL_PERCENTILE
|
||||||
]
|
]
|
||||||
|
)
|
||||||
>= self.LOW_INCOME_THRESHOLD_DONUT
|
>= self.LOW_INCOME_THRESHOLD_DONUT
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue