From d682dfa672ba651fe4a7516c3d5de82a9186aa36 Mon Sep 17 00:00:00 2001 From: tangoyankee Date: Tue, 19 Sep 2023 09:21:57 -0400 Subject: [PATCH 1/5] remove moe from decennial pop pyramid --- app/templates/components/population-pyramid-decennial.hbs | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/templates/components/population-pyramid-decennial.hbs b/app/templates/components/population-pyramid-decennial.hbs index e53f5bd3..ac779a4a 100644 --- a/app/templates/components/population-pyramid-decennial.hbs +++ b/app/templates/components/population-pyramid-decennial.hbs @@ -8,10 +8,8 @@ - Selected Area percent - Comparison Area percent From 295509e9c294e73f62f51e8a01d33ce35be9ccd6 Mon Sep 17 00:00:00 2001 From: tangoyankee Date: Tue, 19 Sep 2023 12:12:33 -0400 Subject: [PATCH 2/5] fix pop pyramid for previous years --- app/components/population-pyramid-decennial.js | 2 +- app/components/population-pyramid.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/components/population-pyramid-decennial.js b/app/components/population-pyramid-decennial.js index ac4a822d..90f4366e 100644 --- a/app/components/population-pyramid-decennial.js +++ b/app/components/population-pyramid-decennial.js @@ -196,7 +196,7 @@ export default HorizontalBar.extend({ .data(data, d => get(d, 'group')); const handleBars = (selection, type) => { - const widthFunction = d => xScale(get(d, `${type}.percent`)); + const widthFunction = d => xScale(getByMode(d, type, 'percent')); selection.enter() .append('rect') diff --git a/app/components/population-pyramid.js b/app/components/population-pyramid.js index 7fe7674d..9f3e2d19 100644 --- a/app/components/population-pyramid.js +++ b/app/components/population-pyramid.js @@ -198,7 +198,7 @@ export default HorizontalBar.extend({ .data(data, d => get(d, 'group')); const handleBars = (selection, type) => { - const widthFunction = d => xScale(get(d, `${type}.percent`)); + const widthFunction = d => xScale(getByMode(d, type, 'percent')); selection.enter() .append('rect') From ebb7cf52f63de66611264da043e23811ed38a63e Mon Sep 17 00:00:00 2001 From: tangoyankee Date: Tue, 19 Sep 2023 15:17:11 -0400 Subject: [PATCH 3/5] Task 14578 Dialog text for Fall 2023 DHC updates --- app/templates/components/default-modal.hbs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/templates/components/default-modal.hbs b/app/templates/components/default-modal.hbs index 769a2376..3b862f01 100644 --- a/app/templates/components/default-modal.hbs +++ b/app/templates/components/default-modal.hbs @@ -1,6 +1,6 @@

- NYC Population FactFinder has been updated with 2017-2021 American Community Survey (ACS) data. + NYC Population FactFinder has been updated with data from the newly released 2020 Census Demographic & Housing Characteristics (DHC) file.

From 24a83068ce560372282b1847cd76f25bf250520c Mon Sep 17 00:00:00 2001 From: tangoyankee Date: Thu, 21 Sep 2023 10:35:52 -0400 Subject: [PATCH 4/5] prevent the rendering of 2010 census household type chart --- app/templates/explorer.hbs | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/app/templates/explorer.hbs b/app/templates/explorer.hbs index 7f762037..0708fb3d 100644 --- a/app/templates/explorer.hbs +++ b/app/templates/explorer.hbs @@ -115,18 +115,27 @@ subtopic.charts this.showCharts )}} -

{{#each subtopic.charts as |chart|}} - {{acs-bar - title=chart.chartLabel - config=chart.chartConfig - survey=this.source.type - mode=this.source.mode - data=this.surveyData - height=204 - }} + {{!-- HACK: literally prevent the rendering of 2010 census household type + because data are not available. If more charts are configured for years that + do not have data, then a generalized solution is needed --}} + {{#unless (and + (eq chart.chartLabel "Percent Distribution of Household Types") + (eq this.source.type "census") + (eq this.source.mode "previous") + )}} +
+ {{acs-bar + title=chart.chartLabel + config=chart.chartConfig + survey=this.source.type + mode=this.source.mode + data=this.surveyData + height=204 + }} +
+ {{/unless}} {{/each}} -
{{/if}} From 75f181c23f9041e2ea269501c4143ee2f79cbb36 Mon Sep 17 00:00:00 2001 From: tangoyankee Date: Thu, 21 Sep 2023 12:05:52 -0400 Subject: [PATCH 5/5] prevent any decennial comparisons from being marked insignificant --- app/templates/components/data-table-row-change.hbs | 4 ++-- app/templates/components/data-table-row-current.hbs | 8 ++++++-- app/templates/components/data-table-row-previous.hbs | 12 ++++++++---- app/templates/components/data-table.hbs | 2 ++ 4 files changed, 18 insertions(+), 8 deletions(-) diff --git a/app/templates/components/data-table-row-change.hbs b/app/templates/components/data-table-row-change.hbs index fa90ccd6..ed18a59f 100644 --- a/app/templates/components/data-table-row-change.hbs +++ b/app/templates/components/data-table-row-change.hbs @@ -30,7 +30,7 @@ {{!-- Estimate --}} {{#with (format-number (abs @data.changeSum) precision=@rowConfig.decimal) as |roundedChangeSum|}} {{#with (format-number (abs @data.changeMarginOfError) precision=@rowConfig.decimal) as |roundedChangeMarginOfError|}} - + {{#unless (or (eq @data.changeSum null) (eq @data.changeSum undefined) @@ -81,7 +81,7 @@ {{#with (format-number (mult (abs @data.changePercent) 100) precision=1) as |roundedChangePercentage|}} {{#with (format-number (mult (abs @data.changePercentMarginOfError) 100) precision=1) as |roundedChangePercentageMarginOfError|}} - + {{#unless (or @data.isSpecial (eq @data.changePercent null) diff --git a/app/templates/components/data-table-row-current.hbs b/app/templates/components/data-table-row-current.hbs index 5a957d29..fef354b1 100644 --- a/app/templates/components/data-table-row-current.hbs +++ b/app/templates/components/data-table-row-current.hbs @@ -38,9 +38,13 @@ {{unless (eq this.data.differenceSum null) (format-number @@ -83,7 +87,7 @@ {{/if}} + class="{{unless (or this.data.differencePercentIsReliable this.decennial) 'insignificant'}} difference-percent"> {{unless (or @data.isSpecial (eq this.data.differencePercent null)) (format-number this.data.differencePercent diff --git a/app/templates/components/data-table-row-previous.hbs b/app/templates/components/data-table-row-previous.hbs index 1131cddd..4beed059 100644 --- a/app/templates/components/data-table-row-previous.hbs +++ b/app/templates/components/data-table-row-previous.hbs @@ -38,9 +38,13 @@ {{unless (eq this.data.previous.differenceSum null) (format-number @@ -83,7 +87,7 @@ {{/if}} + class="{{unless (or this.data.previous.differencePercentIsReliable this.decennial) 'insignificant'}} difference-percent"> {{unless (or @data.isSpecial (eq this.data.previous.differencePercent null)) (format-number this.data.previous.differencePercent diff --git a/app/templates/components/data-table.hbs b/app/templates/components/data-table.hbs index 3bbc6d63..269e2ee0 100644 --- a/app/templates/components/data-table.hbs +++ b/app/templates/components/data-table.hbs @@ -39,6 +39,7 @@ {{else}} {{#if (eq this.mode 'current')}} {{data-table-row-current + decennial=this.decennial mode=this.mode reliability=this.reliability comparison=this.comparison @@ -47,6 +48,7 @@ }} {{else if (eq this.mode 'previous')}} {{data-table-row-previous + decennial=this.decennial mode=this.mode reliability=this.reliability comparison=this.comparison