From e169735d76e750cf9187cf3c0f30d798efd6430e Mon Sep 17 00:00:00 2001 From: Rashmi Date: Fri, 10 May 2019 10:29:06 -0700 Subject: [PATCH 01/26] formats legend range scale and adds stat-value-qualifier font-xs classNames to Distress Score stats --- app/pages/Profile/sections/about/Introduction.jsx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/app/pages/Profile/sections/about/Introduction.jsx b/app/pages/Profile/sections/about/Introduction.jsx index c4ad6e6..83ff574 100644 --- a/app/pages/Profile/sections/about/Introduction.jsx +++ b/app/pages/Profile/sections/about/Introduction.jsx @@ -189,7 +189,7 @@ class Introduction extends SectionColumns {
Zip Codes in {meta.name}

} /> { + const arr = d.id.split(" "); + const startRange = formatAbbreviate(parseFloat(arr[0])); + const endRange = formatAbbreviate(parseFloat(arr[2])); + return `${startRange} - ${endRange}`; + } + } }, legend: false, label: d => formatGeomapZipLabel(d, meta, zipToPlace), From c48405a283fe5061b7df63db3f16c829ef647f47 Mon Sep 17 00:00:00 2001 From: Rashmi Date: Fri, 10 May 2019 17:46:15 -0700 Subject: [PATCH 02/26] modifies text as suggested in feedback --- .../accessToCare/HealthCenterDemographics.jsx | 4 +-- .../ConditionsAndChronicDiseases.jsx | 35 ++++++++++++++----- 2 files changed, 29 insertions(+), 10 deletions(-) diff --git a/app/pages/Profile/sections/accessToCare/HealthCenterDemographics.jsx b/app/pages/Profile/sections/accessToCare/HealthCenterDemographics.jsx index a460e26..c6462fd 100644 --- a/app/pages/Profile/sections/accessToCare/HealthCenterDemographics.jsx +++ b/app/pages/Profile/sections/accessToCare/HealthCenterDemographics.jsx @@ -96,9 +96,9 @@ class HealthCenterDemographics extends SectionColumns { /> {isZipLevelDataAvailable ?

In {topZipLevelData.Year}, {lowerCaseRaceName(formatRaceNames(topZipLevelData.RaceType))} residents of {`zip ${topZipLevelData.Geography}`} visited health centers more than any other race/ethnicity group that utilizes services offered by health centers ({formatPercentage(topZipLevelData[topZipLevelData.RaceType])} of the health center population), as compared to the {lowerCaseRaceName(formatRaceNames(topMostRaceData.RaceType))} residents in Wayne County ({formatPercentage(topMostRaceData[topMostRaceData.RaceType])} of the health center population).

- :

In {topMostRaceData.Year}, {lowerCaseRaceName(formatRaceNames(topMostRaceData.RaceType))} residents of Wayne County visited health centers more than any other race/ethnicity group that utilizes services offered by health centers ({formatPercentage(topMostRaceData[topMostRaceData.RaceType])} of the health center population). This is followed by {lowerCaseRaceName(formatRaceNames(topSecondRaceData.RaceType))} residents ({formatPercentage(topSecondRaceData[topSecondRaceData.RaceType])}) and then {lowerCaseRaceName(formatRaceNames(topThirdRaceData.RaceType))} residents ({formatPercentage(topThirdRaceData[topThirdRaceData.RaceType])}).

} + :

In {topMostRaceData.Year}, {lowerCaseRaceName(formatRaceNames(topMostRaceData.RaceType))} residents of Wayne County visited health centers more than any other reported race/ethnicity group that utilizes services offered by health centers ({formatPercentage(topMostRaceData[topMostRaceData.RaceType])} of the health center population). This is followed by {lowerCaseRaceName(formatRaceNames(topSecondRaceData.RaceType))} residents ({formatPercentage(topSecondRaceData[topSecondRaceData.RaceType])}) and then {lowerCaseRaceName(formatRaceNames(topThirdRaceData.RaceType))} residents ({formatPercentage(topThirdRaceData[topThirdRaceData.RaceType])}).

} -

The following chart shows the health center visitors breakdown across all race/ethnicity groups in {isZipLevelDataAvailable ? topZipLevelData.Geography : "Wayne County"}.

+

The following chart shows the health center visitors breakdown across all reported race/ethnicity groups in {isZipLevelDataAvailable ? topZipLevelData.Geography : "Wayne County"}.

diff --git a/app/pages/Profile/sections/healthConditions/ConditionsAndChronicDiseases.jsx b/app/pages/Profile/sections/healthConditions/ConditionsAndChronicDiseases.jsx index adac3af..36f5f5d 100644 --- a/app/pages/Profile/sections/healthConditions/ConditionsAndChronicDiseases.jsx +++ b/app/pages/Profile/sections/healthConditions/ConditionsAndChronicDiseases.jsx @@ -18,7 +18,16 @@ import Options from "components/Options"; const formatPercentage = (d, mutiplyBy100 = false) => mutiplyBy100 ? `${formatAbbreviate(d * 100)}%` : `${formatAbbreviate(d)}%`; -const formatDropdownChoiceName = d => d === "Physical Health" ? "Poor General Health Days" : d; +const formatDropdownChoiceName = d => { + if (d === "Ever Heart Attack") return "Heart Attack"; + if (d === "Ever Depressive") return "Depression"; + if (d === "Mental Health") return "Mental Health (Census Tract)"; + if (d === "Poor Mental Health 14 Or More Days") return "Mental Health (Zip Region)"; + if (d === "Gen Health Fair Or Poor") return "General Health (Zip Region)"; + if (d === "Physical Health") return "General Health (Census Tract)"; + if (d === "Current Asthma") return "Adults With Asthma"; + return d; +}; const getArticle = dropdownValue => { const firstLetter = dropdownValue[0]; @@ -26,6 +35,15 @@ const getArticle = dropdownValue => { return "a"; }; +const formatDropdownParagraphText = d => { + if (d === "COPD") return d; + if (d === "Physical Health" || d === "Gen Health Fair Or Poor") return "fair or poor general health"; + if (d === "Poor Mental Health 14 Or More Days") return "poor mental health"; + if (d === "Ever Heart Attack") return "heart attack"; + if (d === "Ever Depressive") return "depression"; + return d.toLowerCase(); +}; + class ConditionsAndChronicDiseases extends SectionColumns { constructor(props) { @@ -78,8 +96,8 @@ class ConditionsAndChronicDiseases extends SectionColumns { // Include all the measures in the dropdown list. const {dropdownValue, healthConditionData, healthConditionWeightedData, countyLevelData} = this.state; const dropdownList = ["Arthritis", "COPD", "Chronic Kidney Disease", "Coronary Heart Disease", "Current Asthma", "High Blood Pressure", "High Cholesterol", - "Mental Health", "Stroke", "Teeth Loss", "Cardiovascular Disease", "Ever Depressive", - "Ever Heart Attack", "Heart Disease", "Poor Mental Health 14 Or More Days", "Physical Health", "Gen Health Fair Or Poor"]; + "Stroke", "Teeth Loss", "Cardiovascular Disease", "Ever Depressive", "Ever Heart Attack", "Heart Disease", + "Mental Health", "Poor Mental Health 14 Or More Days", "Physical Health", "Gen Health Fair Or Poor"]; // Check if the selected dropdown values are from the healthConditionWeightedData. const isHealthConditionWeightedValueSelected = dropdownValue === "Cardiovascular Disease" || @@ -129,13 +147,14 @@ class ConditionsAndChronicDiseases extends SectionColumns { {/* Write short paragraphs explaining Geomap and top stats for the dropdown value selected. */} { isHealthConditionWeightedValueSelected - ?

In {topDropdownWeightedData["End Year"]}, {formatPercentage(topDropdownWeightedData[dropdownValue], true)} of the population of the {topDropdownWeightedData["Zip Region"]} had {getArticle(dropdownValue)} {dropdownValue.toLowerCase()} diagnosis, the highest prevelence of all zip regions in Wayne County, as compared to {formatPercentage(countyLevelData[0][dropdownValue], true)} overall in Wayne County.

- :

In {topDropdownValueTract.Year}, {formatPercentage(topDropdownValueTract[dropdownValue])} of the population of {topTractPlace !== undefined ? `, ${topTractPlace}` : ""} had {getArticle(dropdownValue)} {dropdownValue === "COPD" ? "COPD" : formatDropdownChoiceName(dropdownValue).toLowerCase()} diagnosis, the highest prevalence out of all tracts in Detroit, Livonia, Dearborn and Westland.

+ ?

In {topDropdownWeightedData["End Year"]}, {formatPercentage(topDropdownWeightedData[dropdownValue], true)} of the population of the {topDropdownWeightedData["Zip Region"]} had {getArticle(formatDropdownParagraphText(dropdownValue))} {formatDropdownParagraphText(dropdownValue)} diagnosis, the highest prevelence of all zip regions in Wayne County, as compared to {formatPercentage(countyLevelData[0][dropdownValue], true)} overall in Wayne County.

+ :

In {topDropdownValueTract.Year}, {formatPercentage(topDropdownValueTract[dropdownValue])} of the population of {topTractPlace !== undefined ? `, ${topTractPlace}` : ""} had {getArticle(formatDropdownParagraphText(dropdownValue))} {formatDropdownParagraphText(dropdownValue)} diagnosis, the highest prevalence out of all tracts in Detroit, Livonia, Dearborn and Westland.

} - {dropdownValue === "Physical Health" ?

Poor general health days is the proportion of adults who reported that their health, in general, was either fair or poor.

: ""} + {dropdownValue === "Poor Mental Health 14 Or More Days" &&

Poor mental health is defined as reporting mental health as not good concerning stress, depression, or problems with emotions for 14 or more out of the past 30 days.

} + {dropdownValue === "Physical Health" &&

Fair or poor general health is the proportion of adults who reported that their health, in general, was either fair or poor.

} { isHealthConditionWeightedValueSelected - ?

The map here shows the percentage of adults who have ever been diagnosed with {dropdownValue.toLowerCase()} within each zip region in Wayne County.

- :

The map here shows the percentage of adults who have ever been diagnosed with {dropdownValue === "COPD" ? "COPD" : formatDropdownChoiceName(dropdownValue).toLowerCase()} within each census tract in Detroit, Livonia, Dearborn and Westland.

+ ?

The map here shows the percentage of adults who have ever been diagnosed with {formatDropdownParagraphText(dropdownValue)} within each zip region in Wayne County.

+ :

The map here shows the percentage of adults who have {dropdownValue === "Poor Mental Health 14 Or More Days" ? "reported" : dropdownValue === "Current Asthma" ? "reported they currently have asthma" : "ever been diagnosed with" } {dropdownValue !== "Current Asthma" ? formatDropdownParagraphText(dropdownValue) : ""} within each census tract in Detroit, Livonia, Dearborn and Westland.

} From 40c146b85bf29910a66b80cc5c8b0b7d00f11538 Mon Sep 17 00:00:00 2001 From: Rashmi Date: Tue, 14 May 2019 10:39:26 -0700 Subject: [PATCH 03/26] corrects Insurance coverage share calculation --- .../sections/accessToCare/HealthInsuranceCoverage.jsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/pages/Profile/sections/accessToCare/HealthInsuranceCoverage.jsx b/app/pages/Profile/sections/accessToCare/HealthInsuranceCoverage.jsx index 3d52ca1..aa71f5c 100644 --- a/app/pages/Profile/sections/accessToCare/HealthInsuranceCoverage.jsx +++ b/app/pages/Profile/sections/accessToCare/HealthInsuranceCoverage.jsx @@ -72,12 +72,18 @@ const formatGeomapCoverageData = (data, meta, childrenTractIds) => { if (childrenTractIds.includes(d["ID Geography"])) filteredChildrenGeography.push(d); }); } + nest() .key(d => d.Year) .entries(filteredChildrenGeography) .forEach(group => { - const total = sum(group.values, d => d["Population by Insurance Coverage"]); - group.values.forEach(d => total !== 0 ? d.share = d["Population by Insurance Coverage"] / total * 100 : d.share = 0); + nest() + .key(d => meta.level === "county" ? d["ID Place"] : d["ID Geography"]) + .entries(group.values) + .forEach(geography => { + const total = sum(geography.values, d => d["Population by Insurance Coverage"]); + geography.values.forEach(d => total !== 0 ? d.share = d["Population by Insurance Coverage"] / total * 100 : d.share = 0); + }); }); const filteredWithCoverageData = filteredChildrenGeography.filter(d => d["ID Health Insurance Coverage Status"] === 0); const topRecentYearData = filteredChildrenGeography.sort((a, b) => b.share - a.share)[0]; From bd68285a61881351bc8efdc63da4a15d2f7f204d Mon Sep 17 00:00:00 2001 From: Rashmi Date: Tue, 14 May 2019 12:07:49 -0700 Subject: [PATCH 04/26] formats Geomap legend share range --- app/pages/Profile/sections/about/Introduction.jsx | 11 ++--------- app/pages/Profile/sections/economy/DistressScore.jsx | 11 ++--------- .../Profile/sections/economy/EmploymentGrowth.jsx | 2 +- 3 files changed, 5 insertions(+), 19 deletions(-) diff --git a/app/pages/Profile/sections/about/Introduction.jsx b/app/pages/Profile/sections/about/Introduction.jsx index 83ff574..a52bbaa 100644 --- a/app/pages/Profile/sections/about/Introduction.jsx +++ b/app/pages/Profile/sections/about/Introduction.jsx @@ -204,15 +204,8 @@ class Introduction extends SectionColumns { styles.danger, styles["danger-dark"] ], - legendConfig: { - // format range scale using formatAbbreviate function - label: d => { - const arr = d.id.split(" "); - const startRange = formatAbbreviate(parseFloat(arr[0])); - const endRange = formatAbbreviate(parseFloat(arr[2])); - return `${startRange} - ${endRange}`; - } - } + // format geomap legend range + axisConfig: {tickFormat: d => `${formatAbbreviate(d)}%`} }, legend: false, label: d => formatGeomapZipLabel(d, meta, zipToPlace), diff --git a/app/pages/Profile/sections/economy/DistressScore.jsx b/app/pages/Profile/sections/economy/DistressScore.jsx index f47ccd2..e0afcb4 100644 --- a/app/pages/Profile/sections/economy/DistressScore.jsx +++ b/app/pages/Profile/sections/economy/DistressScore.jsx @@ -88,15 +88,8 @@ class DistressScore extends SectionColumns { styles.danger, styles["danger-dark"] ], - legendConfig: { - // format range scale using formatAbbreviate function - label: d => { - const arr = d.id.split(" "); - const startRange = formatAbbreviate(parseFloat(arr[0])); - const endRange = formatAbbreviate(parseFloat(arr[2])); - return `${startRange} - ${endRange}`; - } - } + // format geomap legend range + axisConfig: {tickFormat: d => `${formatAbbreviate(d)}%`} }, height: 400, time: "Year", diff --git a/app/pages/Profile/sections/economy/EmploymentGrowth.jsx b/app/pages/Profile/sections/economy/EmploymentGrowth.jsx index d4d9192..8843b90 100644 --- a/app/pages/Profile/sections/economy/EmploymentGrowth.jsx +++ b/app/pages/Profile/sections/economy/EmploymentGrowth.jsx @@ -67,7 +67,7 @@ class EmploymentGrowth extends SectionColumns { label: d => formatGeomapZipLabel(d, meta, zipToPlace), colorScale: "Percent Change in Employment", colorScaleConfig: { - axisConfig: {tickFormat: d => `${d}%`}, + axisConfig: {tickFormat: d => `${formatAbbreviate(d)}%`}, color: [styles["danger-dark"], styles["light-3"], styles["success-dark"]] }, height: 400, From 16cb9ac2ac1068d45e0bcab6fbfea1f235b1bf1e Mon Sep 17 00:00:00 2001 From: Rashmi Date: Tue, 14 May 2019 13:33:32 -0700 Subject: [PATCH 05/26] replaces "acs_yg_household_income_5" cube with "acs_ygr_median_household_income_race_5" to get the median househol income --- cache/medianIncome.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cache/medianIncome.js b/cache/medianIncome.js index 098a824..da751ac 100644 --- a/cache/medianIncome.js +++ b/cache/medianIncome.js @@ -6,16 +6,16 @@ module.exports = async function() { const levels = ["County", "Place", "Zip", "Tract"]; const medianIncomeQueries = levels - .map(level => client.cube("acs_yg_household_income_5") + .map(level => client.cube("acs_ygr_median_household_income_race_5") .then(c => { const query = c.query .drilldown("Geography", level, level) - .measure("Household Income") + .measure("Household Income by Race") .cut("[Year].[Year].[Year].&[2017]"); return client.query(query, "jsonrecords"); }) .then(resp => resp.data.data.reduce((acc, d) => { - acc[d[`ID ${level}`]] = d["Household Income"]; + acc[d[`ID ${level}`]] = d["Household Income by Race"]; return acc; }, {})) .catch(err => { From c34347237b5e54a96de88c9abe9deb2b1143a942 Mon Sep 17 00:00:00 2001 From: James Ferrell Date: Wed, 15 May 2019 18:32:13 -0400 Subject: [PATCH 06/26] darkens lightest shades, renames old -light shades as -white, adds medium colors for majorelle and terra cotta (#63, #64) --- app/style.yml | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/app/style.yml b/app/style.yml index 3b93955..185f0ae 100644 --- a/app/style.yml +++ b/app/style.yml @@ -45,12 +45,14 @@ black: "#24292F" # main color brand: "#70BADA" -brand-light: "#B1E2F7" +brand-white: "#B1E2F7" +brand-light: "#95C8DE" brand-dark: "#2F93BE" # extended palette curry: "#E3C05D" -curry-light: "#FFE7A6" +curry-white: "#FFE7A6" +curry-light: "#E6CD8A" curry-dark: "#C99C20" amber-dark: "#B5A604" @@ -58,19 +60,23 @@ amber-dark: "#B5A604" olive-dark: "#8B9909" shamrock: "#84BD85" -shamrock-light: "#CFE6CF" +shamrock-white: "#CFE6CF" +shamrock-light: "#ADCCAD" shamrock-dark: "#53A355" sea-green-dark: "#2AA8A8" pacific: "#70BADA" -pacific-light: "#B1E2F7" +pacific-white: "#B1E2F7" +pacific-light: "#95C8DE" pacific-dark: "#2F93BE" silver-lake-dark: "#5673CC" majorelle: "#AD9FED" -majorelle-light: "#DAD1FF" +majorelle-white: "#DAD1FF" +majorelle-light: "#BBB1E6" +majorelle-medium: "#8E7CE0" majorelle-dark: "#6F59D4" levender-dark: "#8842A6" @@ -78,7 +84,9 @@ levender-dark: "#8842A6" maroon-dark: "#A64281" terra-cotta: "#DF6F6F" -terra-cotta-light: "#FFD3D1" +terra-white-white: "#FFD3D1" +terra-cotta-light: "#E6AFAD" +terra-cotta-medium: "#EFA1A0" terra-cotta-dark: "#D45D59" carrot-dark: "#CF7A1F" @@ -86,7 +94,7 @@ carrot-dark: "#CF7A1F" # UI colors # NOTE: danger == terra-cotta, caution == curry, success == shamrock danger: "#DF6F6F" -danger-light: "#FFD3D1" +danger-light: "#E6AFAD" danger-dark: "#D45D59" caution: "#E3C05D" @@ -94,7 +102,7 @@ caution-light: "#FFE7A6" caution-dark: "#C99C20" success: "#84BD85" -success-light: "#CFE6CF" +success-light: "#ADCCAD" success-dark: "#53A355" # Assigned color schemes for visualizations From 0e35f36a756c2ebd5aee0dea1b03136d25aeba5e Mon Sep 17 00:00:00 2001 From: James Ferrell Date: Fri, 17 May 2019 11:48:18 -0400 Subject: [PATCH 07/26] improves differentiation between geomap colors; closes #63; closes #64 --- app/d3plus.js | 4 +-- .../Profile/sections/about/Introduction.jsx | 31 +++++++++++++++---- .../sections/economy/DistressScore.jsx | 6 ++-- .../sections/economy/EmploymentGrowth.jsx | 8 ++++- .../sections/education/DropoutRate.jsx | 3 +- .../healthBehaviors/PhysicalInactivity.jsx | 4 +-- .../healthBehaviors/RiskyBehaviors.jsx | 8 ++--- .../ConditionsAndChronicDiseases.jsx | 6 ++-- .../healthConditions/ObesityAndDiabetes.jsx | 11 ++++--- .../sections/specialPopulation/Immigrants.jsx | 8 ++--- .../VisionAndAuditoryDisabilities.jsx | 6 ++-- app/style.yml | 8 ++--- 12 files changed, 69 insertions(+), 34 deletions(-) diff --git a/app/d3plus.js b/app/d3plus.js index 8c1d948..b2af160 100644 --- a/app/d3plus.js +++ b/app/d3plus.js @@ -138,9 +138,9 @@ export default { colorScaleConfig: { // default to green color: [ - styles.white, + styles["majorelle-white"], styles["majorelle-light"], - styles.majorelle, + styles["majorelle-medium"], styles["majorelle-dark"] ], // the key itself diff --git a/app/pages/Profile/sections/about/Introduction.jsx b/app/pages/Profile/sections/about/Introduction.jsx index a52bbaa..9be2bfb 100644 --- a/app/pages/Profile/sections/about/Introduction.jsx +++ b/app/pages/Profile/sections/about/Introduction.jsx @@ -199,14 +199,18 @@ class Introduction extends SectionColumns { colorScaleConfig: { // having a high distress score is bad color: [ - styles.success, + styles["success-light"], styles["danger-light"], - styles.danger, styles["danger-dark"] ], // format geomap legend range axisConfig: {tickFormat: d => `${formatAbbreviate(d)}%`} }, + shapeConfig: { + Path: { + fillOpacity: 0.9 + } + }, legend: false, label: d => formatGeomapZipLabel(d, meta, zipToPlace), ocean: "transparent", @@ -238,11 +242,16 @@ class Introduction extends SectionColumns { axisConfig: {tickFormat: d => formatPercentage(d, true)}, // having high disease prevalency is bad color: [ - styles["danger-light"], - styles.danger, + styles["terra-cotta-white"], + styles["terra-cotta-medium"], styles["danger-dark"] ] }, + shapeConfig: { + Path: { + fillOpacity: 0.9 + } + }, label: d => d["Zip Region"], ocean: "transparent", tiles: false, @@ -275,6 +284,11 @@ class Introduction extends SectionColumns { colorScale: "Life Expectancy", legend: false, label: d => formatGeomapTractLabel(d, meta, tractToPlace), + shapeConfig: { + Path: { + fillOpacity: 0.9 + } + }, ocean: "transparent", tiles: false, time: "End Year", @@ -312,11 +326,16 @@ class Introduction extends SectionColumns { axisConfig: {tickFormat: d => formatPercentage(d, true)}, // having high disease prevalency is bad color: [ - styles["danger-light"], - styles.danger, + styles["terra-cotta-white"], + styles["terra-cotta-medium"], styles["danger-dark"] ] }, + shapeConfig: { + Path: { + fillOpacity: 0.9 + } + }, label: d => d["Zip Region"], ocean: "transparent", tiles: false, diff --git a/app/pages/Profile/sections/economy/DistressScore.jsx b/app/pages/Profile/sections/economy/DistressScore.jsx index e0afcb4..7b8e11a 100644 --- a/app/pages/Profile/sections/economy/DistressScore.jsx +++ b/app/pages/Profile/sections/economy/DistressScore.jsx @@ -81,11 +81,13 @@ class DistressScore extends SectionColumns { label: d => formatGeomapZipLabel(d, meta, zipToPlace), colorScale: "Distress Score", colorScaleConfig: { - // having a high distress score is bad + // having a high distress score is bad color: [ styles.success, + styles["shamrock-white"], + styles["terra-cotta-white"], styles["danger-light"], - styles.danger, + styles["terra-cotta-medium"], styles["danger-dark"] ], // format geomap legend range diff --git a/app/pages/Profile/sections/economy/EmploymentGrowth.jsx b/app/pages/Profile/sections/economy/EmploymentGrowth.jsx index 8843b90..5f6286d 100644 --- a/app/pages/Profile/sections/economy/EmploymentGrowth.jsx +++ b/app/pages/Profile/sections/economy/EmploymentGrowth.jsx @@ -68,7 +68,13 @@ class EmploymentGrowth extends SectionColumns { colorScale: "Percent Change in Employment", colorScaleConfig: { axisConfig: {tickFormat: d => `${formatAbbreviate(d)}%`}, - color: [styles["danger-dark"], styles["light-3"], styles["success-dark"]] + color: [ + styles["danger-dark"], + styles["terra-cotta-light"], + styles["light-2"], + styles["success-light"], + styles["success-dark"] + ] }, height: 400, time: "Year", diff --git a/app/pages/Profile/sections/education/DropoutRate.jsx b/app/pages/Profile/sections/education/DropoutRate.jsx index 3f25fd1..8076df7 100644 --- a/app/pages/Profile/sections/education/DropoutRate.jsx +++ b/app/pages/Profile/sections/education/DropoutRate.jsx @@ -74,8 +74,9 @@ class DropoutRate extends SectionColumns { axisConfig: {tickFormat: d => formatPercentage(d)}, // dropping out is bad color: [ + styles["terra-cotta-white"], styles["danger-light"], - styles.danger, + styles["terra-cotta-medium"], styles["danger-dark"] ] }, diff --git a/app/pages/Profile/sections/healthBehaviors/PhysicalInactivity.jsx b/app/pages/Profile/sections/healthBehaviors/PhysicalInactivity.jsx index 8c3d742..3f9157c 100644 --- a/app/pages/Profile/sections/healthBehaviors/PhysicalInactivity.jsx +++ b/app/pages/Profile/sections/healthBehaviors/PhysicalInactivity.jsx @@ -150,9 +150,9 @@ class PhysicalInactivity extends SectionColumns { axisConfig: {tickFormat: d => formatPercentage(d)}, // not exercising is bad color: [ - styles.white, + styles["terra-cotta-white"], styles["danger-light"], - styles.danger, + styles["terra-cotta-medium"], styles["danger-dark"] ] }, diff --git a/app/pages/Profile/sections/healthBehaviors/RiskyBehaviors.jsx b/app/pages/Profile/sections/healthBehaviors/RiskyBehaviors.jsx index f019a26..3ac9753 100644 --- a/app/pages/Profile/sections/healthBehaviors/RiskyBehaviors.jsx +++ b/app/pages/Profile/sections/healthBehaviors/RiskyBehaviors.jsx @@ -172,9 +172,9 @@ class RiskyBehaviors extends SectionColumns { axisConfig: {tickFormat: d => formatPercentage(d, true)}, // smoking is bad color: [ - styles.white, + styles["terra-cotta-white"], styles["danger-light"], - styles.danger, + styles["terra-cotta-medium"], styles["danger-dark"] ] }, @@ -199,9 +199,9 @@ class RiskyBehaviors extends SectionColumns { axisConfig: {tickFormat: d => formatPercentage(d)}, // smoking is bad color: [ - styles.white, + styles["terra-cotta-white"], styles["danger-light"], - styles.danger, + styles["terra-cotta-medium"], styles["danger-dark"] ] }, diff --git a/app/pages/Profile/sections/healthConditions/ConditionsAndChronicDiseases.jsx b/app/pages/Profile/sections/healthConditions/ConditionsAndChronicDiseases.jsx index 36f5f5d..f6aee3b 100644 --- a/app/pages/Profile/sections/healthConditions/ConditionsAndChronicDiseases.jsx +++ b/app/pages/Profile/sections/healthConditions/ConditionsAndChronicDiseases.jsx @@ -179,8 +179,9 @@ class ConditionsAndChronicDiseases extends SectionColumns { axisConfig: {tickFormat: d => formatPercentage(d, true)}, // having high disease prevalency is bad color: [ + styles["terra-cotta-white"], styles["danger-light"], - styles.danger, + styles["terra-cotta-medium"], styles["danger-dark"] ] }, @@ -205,8 +206,9 @@ class ConditionsAndChronicDiseases extends SectionColumns { axisConfig: {tickFormat: d => formatPercentage(d)}, // having high disease prevalency is bad color: [ + styles["terra-cotta-white"], styles["danger-light"], - styles.danger, + styles["terra-cotta-medium"], styles["danger-dark"] ] }, diff --git a/app/pages/Profile/sections/healthConditions/ObesityAndDiabetes.jsx b/app/pages/Profile/sections/healthConditions/ObesityAndDiabetes.jsx index a263f61..122dfaf 100644 --- a/app/pages/Profile/sections/healthConditions/ObesityAndDiabetes.jsx +++ b/app/pages/Profile/sections/healthConditions/ObesityAndDiabetes.jsx @@ -267,16 +267,18 @@ class ObesityAndDiabetes extends SectionColumns { axisConfig: {tickFormat: d => formatPercentage(d, true)}, // having high disease prevalency is bad color: [ + styles["terra-cotta-white"], styles["danger-light"], - styles.danger, + styles["terra-cotta-medium"], styles["danger-dark"] ] }, label: d => d["Zip Region"], time: "End Year", title: `${dropdownValue} by Zip Regions in Wayne County`, - tooltipConfig: isHealthyWeightSelected ? {tbody: [["Year", d => d.Year], - ["Condition", `${dropdownValue}`], ["Share", d => `${formatPercentage(d[dropdownValue], true)}`]]} : {tbody: [["Year", d => d.Year], ["Condition", `${dropdownValue}`], ["Prevalence", d => `${formatPercentage(d[dropdownValue], true)}`]]}, + tooltipConfig: isHealthyWeightSelected + ? {tbody: [["Year", d => d.Year], ["Condition", `${dropdownValue}`], ["Share", d => `${formatPercentage(d[dropdownValue], true)}`]]} + : {tbody: [["Year", d => d.Year], ["Condition", `${dropdownValue}`], ["Prevalence", d => `${formatPercentage(d[dropdownValue], true)}`]]}, topojson: "/topojson/zipregions.json", topojsonId: d => d.properties.REGION, topojsonFilter: () => true @@ -294,8 +296,9 @@ class ObesityAndDiabetes extends SectionColumns { axisConfig: {tickFormat: d => formatPercentage(d)}, // having high disease prevalency is bad color: [ + styles["terra-cotta-white"], styles["danger-light"], - styles.danger, + styles["terra-cotta-medium"], styles["danger-dark"] ] }, diff --git a/app/pages/Profile/sections/specialPopulation/Immigrants.jsx b/app/pages/Profile/sections/specialPopulation/Immigrants.jsx index 311cc6a..edc4a1a 100644 --- a/app/pages/Profile/sections/specialPopulation/Immigrants.jsx +++ b/app/pages/Profile/sections/specialPopulation/Immigrants.jsx @@ -270,15 +270,15 @@ class Immigrants extends SectionColumns { axisConfig: {tickFormat: d => formatPercentage(d)}, color: dropdownValue === "Immigrants in Poverty" ? [ - styles.white, + styles["terra-cotta-white"], styles["danger-light"], - styles.danger, + styles["terra-cotta-medium"], styles["danger-dark"] ] : [ - styles.white, + styles["majorelle-white"], styles["majorelle-light"], - styles.majorelle, + styles["majorelle-medium"], styles["majorelle-dark"] ] }, diff --git a/app/pages/Profile/sections/specialPopulation/VisionAndAuditoryDisabilities.jsx b/app/pages/Profile/sections/specialPopulation/VisionAndAuditoryDisabilities.jsx index 2cfd911..d401fcf 100644 --- a/app/pages/Profile/sections/specialPopulation/VisionAndAuditoryDisabilities.jsx +++ b/app/pages/Profile/sections/specialPopulation/VisionAndAuditoryDisabilities.jsx @@ -327,8 +327,10 @@ class VisionAndAuditoryDisabilities extends SectionColumns { colorScaleConfig: { axisConfig: {tickFormat: d => formatPercentage(d)}, color: [ - styles.white, - styles["danger-light"] + styles["terra-cotta-white"], + styles["danger-light"], + styles["terra-cotta-medium"], + styles["danger-dark"] ] }, title: `${dropdownValue} Population by ${meta.level === "county" ? "Places" : "Census Tracts"} in ${meta.level === "county" || meta.level === "tract" ? "Wayne County" : meta.name}`, diff --git a/app/style.yml b/app/style.yml index 185f0ae..494ed6f 100644 --- a/app/style.yml +++ b/app/style.yml @@ -60,7 +60,7 @@ amber-dark: "#B5A604" olive-dark: "#8B9909" shamrock: "#84BD85" -shamrock-white: "#CFE6CF" +shamrock-white: "#D5E9D5" shamrock-light: "#ADCCAD" shamrock-dark: "#53A355" @@ -74,7 +74,7 @@ pacific-dark: "#2F93BE" silver-lake-dark: "#5673CC" majorelle: "#AD9FED" -majorelle-white: "#DAD1FF" +majorelle-white: "#ECE8FF" majorelle-light: "#BBB1E6" majorelle-medium: "#8E7CE0" majorelle-dark: "#6F59D4" @@ -84,9 +84,9 @@ levender-dark: "#8842A6" maroon-dark: "#A64281" terra-cotta: "#DF6F6F" -terra-white-white: "#FFD3D1" +terra-cotta-white: "#FFE3E2" terra-cotta-light: "#E6AFAD" -terra-cotta-medium: "#EFA1A0" +terra-cotta-medium: "#E78887" terra-cotta-dark: "#D45D59" carrot-dark: "#CF7A1F" From ca7b333102bed1abb8200c4f6ce42e2151acf20a Mon Sep 17 00:00:00 2001 From: Rashmi Date: Wed, 29 May 2019 16:11:39 -0700 Subject: [PATCH 08/26] modifies text for some components as suggested in second pass feedback --- .../accessToCare/HealthCenterDemographics.jsx | 8 +++--- .../ConditionsAndChronicDiseases.jsx | 2 +- .../healthConditions/ObesityAndDiabetes.jsx | 27 +++++++++++-------- .../naturalEnvironment/AirQuality.jsx | 1 - .../VisionAndAuditoryDisabilities.jsx | 2 +- 5 files changed, 22 insertions(+), 18 deletions(-) diff --git a/app/pages/Profile/sections/accessToCare/HealthCenterDemographics.jsx b/app/pages/Profile/sections/accessToCare/HealthCenterDemographics.jsx index c6462fd..0abc9c8 100644 --- a/app/pages/Profile/sections/accessToCare/HealthCenterDemographics.jsx +++ b/app/pages/Profile/sections/accessToCare/HealthCenterDemographics.jsx @@ -14,7 +14,7 @@ import {updateSource} from "utils/helper"; import SourceGroup from "components/SourceGroup"; import Options from "components/Options"; -const formatRaceNames = d => d.replace("Health Center Patients", ""); +const formatRaceNames = d => d.replace("Health Center Patients", "").trim(); const lowerCaseRaceName = d => d.trim() === "Black" || d.trim() === "White" ? d.toLowerCase() : d; const formatPercentage = d => `${formatAbbreviate(d * 100)}%`; @@ -95,10 +95,10 @@ class HealthCenterDemographics extends SectionColumns { qualifier={`${formatPercentage(topMostRaceData[topMostRaceData.RaceType])} of the population in Wayne County`} /> - {isZipLevelDataAvailable ?

In {topZipLevelData.Year}, {lowerCaseRaceName(formatRaceNames(topZipLevelData.RaceType))} residents of {`zip ${topZipLevelData.Geography}`} visited health centers more than any other race/ethnicity group that utilizes services offered by health centers ({formatPercentage(topZipLevelData[topZipLevelData.RaceType])} of the health center population), as compared to the {lowerCaseRaceName(formatRaceNames(topMostRaceData.RaceType))} residents in Wayne County ({formatPercentage(topMostRaceData[topMostRaceData.RaceType])} of the health center population).

- :

In {topMostRaceData.Year}, {lowerCaseRaceName(formatRaceNames(topMostRaceData.RaceType))} residents of Wayne County visited health centers more than any other reported race/ethnicity group that utilizes services offered by health centers ({formatPercentage(topMostRaceData[topMostRaceData.RaceType])} of the health center population). This is followed by {lowerCaseRaceName(formatRaceNames(topSecondRaceData.RaceType))} residents ({formatPercentage(topSecondRaceData[topSecondRaceData.RaceType])}) and then {lowerCaseRaceName(formatRaceNames(topThirdRaceData.RaceType))} residents ({formatPercentage(topThirdRaceData[topThirdRaceData.RaceType])}).

} + {isZipLevelDataAvailable ?

In {topZipLevelData.Year}, {formatPercentage(topZipLevelData[topZipLevelData.RaceType])} of the health center visiting population in {`zip ${topZipLevelData.Geography}`} were {lowerCaseRaceName(formatRaceNames(topZipLevelData.RaceType))}, compared to {lowerCaseRaceName(formatRaceNames(topMostRaceData.RaceType))} residents in Wayne County ({formatPercentage(topMostRaceData[topMostRaceData.RaceType])}).

+ :

In {topMostRaceData.Year}, {formatPercentage(topMostRaceData[topMostRaceData.RaceType])} of the health center visiting population in Wayne County were {lowerCaseRaceName(formatRaceNames(topMostRaceData.RaceType))}, followed by {lowerCaseRaceName(formatRaceNames(topSecondRaceData.RaceType))} ({formatPercentage(topSecondRaceData[topSecondRaceData.RaceType])}) and then {lowerCaseRaceName(formatRaceNames(topThirdRaceData.RaceType))} ({formatPercentage(topThirdRaceData[topThirdRaceData.RaceType])}).

} -

The following chart shows the health center visitors breakdown across all reported race/ethnicity groups in {isZipLevelDataAvailable ? topZipLevelData.Geography : "Wayne County"}.

+

The following chart shows the health center visitors breakdown across all reported racial groups in {isZipLevelDataAvailable ? topZipLevelData.Geography : "Wayne County"}.

diff --git a/app/pages/Profile/sections/healthConditions/ConditionsAndChronicDiseases.jsx b/app/pages/Profile/sections/healthConditions/ConditionsAndChronicDiseases.jsx index f6aee3b..19af7af 100644 --- a/app/pages/Profile/sections/healthConditions/ConditionsAndChronicDiseases.jsx +++ b/app/pages/Profile/sections/healthConditions/ConditionsAndChronicDiseases.jsx @@ -115,7 +115,7 @@ class ConditionsAndChronicDiseases extends SectionColumns { return ( - Conditions & Chronic Diseases + Conditions and Chronic Diseases
{/* Create a dropdown for different types of health conditions. */}
- +
Special Populations @@ -245,7 +246,12 @@ Profile.need = [ fetchData("childrenTractIds", "/api/geo/children//?level=Tract"), fetchData("childrenZipIds", "/api/geo/children//?level=Zip"), fetchData("population", "https://acs.datausa.io/api/data?measures=Population&Geography=&year=all"), - fetchData("currentLevelOverallCoverage", "/api/data?measures=Population by Insurance Coverage&drilldowns=Health Insurance Coverage Status&Geography=&Year=latest", d => d.data) + fetchData("currentLevelOverallCoverage", "/api/data?measures=Population by Insurance Coverage&drilldowns=Health Insurance Coverage Status&Geography=&Year=latest", d => d.data), + fetchData("sortedCancerTypes", "/api/data?measures=Cancer Diagnosis&drilldowns=Cancer Site&Year=all&order=Cancer Site&sort=asc", d => { + const cancerList = []; + nest().key(d => d["Cancer Site"]).entries(d.data).forEach(group => cancerList.push(group.key)); + return cancerList; + }) ]; const mapStateToProps = state => ({ diff --git a/app/pages/Profile/sections/economy/DistressScore.jsx b/app/pages/Profile/sections/economy/DistressScore.jsx index 7b8e11a..7118727 100644 --- a/app/pages/Profile/sections/economy/DistressScore.jsx +++ b/app/pages/Profile/sections/economy/DistressScore.jsx @@ -57,8 +57,8 @@ class DistressScore extends SectionColumns { value={topDistressScoreData.Zip} qualifier={`(${formatAbbreviate(topDistressScoreData["Distress Score"])} percentile)`} /> -

In {topDistressScoreData.Year}, the highest distress score was observed in the zip code {topDistressScoreData.Zip} ({formatAbbreviate(topDistressScoreData["Distress Score"])} percentile), 0 percentile would be the least distressed (desired outcome), and 100 percentile would be the most distressed (unfavorable outcome).

-

The following map shows the distress score percentile for each zip code in Wayne County.

+

In {topDistressScoreData.Year}, the highest distress score was observed in the zip code {topDistressScoreData.Zip} ({formatAbbreviate(topDistressScoreData["Distress Score"])}), 0 would be the least distressed (desired outcome), and 100 would be the most distressed (unfavorable outcome).

+

The following map shows the distress score for each zip code in Wayne County.

@@ -95,7 +95,7 @@ class DistressScore extends SectionColumns { }, height: 400, time: "Year", - tooltipConfig: {tbody: [["Year", d => d.Year], ["Distress Score", d => `${formatAbbreviate(d["Distress Score"])} percentile`]]}, + tooltipConfig: {tbody: [["Year", d => d.Year], ["Distress Score", d => `${formatAbbreviate(d["Distress Score"])}`]]}, topojson: "/topojson/zipcodes.json", topojsonFilter: d => zipcodes.includes(d.properties.ZCTA5CE10), topojsonId: d => d.properties.ZCTA5CE10 diff --git a/app/pages/Profile/sections/economy/Unemployment.jsx b/app/pages/Profile/sections/economy/Unemployment.jsx index ccbd26e..267c69d 100644 --- a/app/pages/Profile/sections/economy/Unemployment.jsx +++ b/app/pages/Profile/sections/economy/Unemployment.jsx @@ -102,11 +102,11 @@ class Unemployment extends SectionColumns { } ]} /> -

- {workExperienceAvailable ? In {getMaleFullTimeData[0].Year}, the gender breakdown of the working population in {getMaleFullTimeData[0].Geography} that worked full-time was {formatPercentage(getMaleFullTimeData[0].share)} for men and {formatPercentage(getFemaleFullTimeData[0].share)} for women. : ""} - {employmentStatusAvailable ? The most common unemployed age group for men was {getTopMaleUnemploymemtData.Age.toLowerCase()} ({formatPercentage(getTopMaleUnemploymemtData.share)}), and the most common female unemployed age group for women was {getTopFemaleUnemploymemtData.Age.toLowerCase()} ({formatPercentage(getTopFemaleUnemploymemtData.share)}). : ""} - {} In {recentYearUnemploymentRate.Year}, the overall unemployment rate in {recentYearUnemploymentRate.Geography} was {formatPercentage(recentYearUnemploymentRate["Unemployment Rate"])}. -

+ + {workExperienceAvailable ?

In {getMaleFullTimeData[0].Year}, the gender breakdown of the working population in {getMaleFullTimeData[0].Geography} that worked full-time was {formatPercentage(getMaleFullTimeData[0].share)} for men and {formatPercentage(getFemaleFullTimeData[0].share)} for women.

: ""} + + {employmentStatusAvailable ?

The most common unemployed age group for men was {getTopMaleUnemploymemtData.Age.toLowerCase()} ({formatPercentage(getTopMaleUnemploymemtData.share)}), and for women was {getTopFemaleUnemploymemtData.Age.toLowerCase()} ({formatPercentage(getTopFemaleUnemploymemtData.share)}).

: ""} +

In {recentYearUnemploymentRate.Year}, the overall unemployment rate in {recentYearUnemploymentRate.Geography} was {formatPercentage(recentYearUnemploymentRate["Unemployment Rate"])}.

diff --git a/app/pages/Profile/sections/economy/WageDistribution.jsx b/app/pages/Profile/sections/economy/WageDistribution.jsx index 6d86ebf..f8ef22e 100644 --- a/app/pages/Profile/sections/economy/WageDistribution.jsx +++ b/app/pages/Profile/sections/economy/WageDistribution.jsx @@ -83,8 +83,7 @@ class WageDistribution extends SectionColumns { time: "Year", xSort: (a, b) => a["ID Household Income Bucket"] - b["ID Household Income Bucket"], xConfig: { - tickFormat: d => rangeFormatter(d), - title: "Household Income Bucket" + tickFormat: d => rangeFormatter(d) }, yConfig: { tickFormat: d => formatPopulation(d), @@ -93,6 +92,7 @@ class WageDistribution extends SectionColumns { shapeConfig: { label: false }, + title: "Household Income Distribution", tooltipConfig: {tbody: [["Year", d => d.Year], ["Share", d => formatPopulation(d.share)], [titleCase(meta.level), d => d.Geography]]} }} dataFormat={resp => { diff --git a/app/pages/Profile/sections/education/StudentPoverty.jsx b/app/pages/Profile/sections/education/StudentPoverty.jsx index 8cf479a..d15ccdd 100644 --- a/app/pages/Profile/sections/education/StudentPoverty.jsx +++ b/app/pages/Profile/sections/education/StudentPoverty.jsx @@ -78,13 +78,13 @@ class StudentPoverty extends SectionColumns {
{/* Top stats about Level Of School. */} race.replace("Black or ", ""); + class CancerPrevalenceByDemographics extends SectionColumns { constructor(props) { @@ -109,9 +111,9 @@ class CancerPrevalenceByDemographics extends SectionColumns { {/* Added empty

element for some space between the dropdown choice and text*/}

-

In {occuranceByGender[0].Year}, the overall prevalence of cancer in the {occuranceByGender[0].MSA} for men and women was {formatAbbreviate(occuranceByGender[1]["Age-Adjusted Cancer Rate"])} and {formatAbbreviate(occuranceByGender[0]["Age-Adjusted Cancer Rate"])} per 100,000 people, respectively.

-

In {topOccuranceByRaceAndEthnicity.Year}, the race/ethnicity group in the {topOccuranceByRaceAndEthnicity.MSA} with the highest overall cancer rate was {topOccuranceByRaceAndEthnicity.Race} {topOccuranceByRaceAndEthnicity.Ethnicity} ({formatAbbreviate(topOccuranceByRaceAndEthnicity["Age-Adjusted Cancer Rate"])} per 100,000 people).

-

The following charts shows the occurrence rate per 100,000 people in {topOccuranceByRaceAndEthnicity.MSA} by gender and race/ethnicity for {isItemsListEmpty ? topOccuranceByRaceAndEthnicity["Cancer Site"].toLowerCase() : "the selected cancer site(s)"}.

+

In {occuranceByGender[0].Year}, the overall prevalence of cancer in the Detroit-Warren-Dearborn Metro Area was {formatAbbreviate(occuranceByGender[1]["Age-Adjusted Cancer Rate"])} for men and {formatAbbreviate(occuranceByGender[0]["Age-Adjusted Cancer Rate"])} for women, per 100,000 people.

+

In {topOccuranceByRaceAndEthnicity.Year}, the race/ethnicity group in the Detroit-Warren-Dearborn Metro Area with the highest overall cancer rate was {topOccuranceByRaceAndEthnicity.Ethnicity} {formatRace(topOccuranceByRaceAndEthnicity.Race)} ({formatAbbreviate(topOccuranceByRaceAndEthnicity["Age-Adjusted Cancer Rate"])} per 100,000 people).

+

The following charts shows the occurrence rate per 100,000 people in Detroit-Warren-Dearborn Metro Area by gender and race/ethnicity for {isItemsListEmpty ? topOccuranceByRaceAndEthnicity["Cancer Site"].toLowerCase() : "the selected cancer site(s)"}.

@@ -182,7 +184,7 @@ class CancerPrevalenceByDemographics extends SectionColumns { legend: false, groupBy: ["Cancer Site", d => `${d.Ethnicity} ${d.Race}`], stacked: true, - label: d => `${d.Ethnicity} ${d.Race}`, + label: d => `${d.Ethnicity} ${formatRace(d.Race)}`, x: "share", y: "Cancer Site", title: "Race/Ethnicity Breakdown", @@ -227,11 +229,6 @@ CancerPrevalenceByDemographics.defaultProps = { }; CancerPrevalenceByDemographics.need = [ - fetchData("sortedCancerTypes", "/api/data?measures=Cancer Diagnosis&drilldowns=Cancer Site&Year=all&order=Cancer Diagnosis&sort=desc", d => { - const cancerList = []; - nest().key(d => d["Cancer Site"]).entries(d.data).forEach(group => cancerList.push(group.key)); - return cancerList; - }), fetchData("occuranceByGender", "/api/data?measures=Age-Adjusted Cancer Rate&drilldowns=Sex,MSA&Cancer Site=All Invasive Cancer Sites Combined&Year=latest", d => d.data), fetchData("occuranceByRaceAndEthnicity", "/api/data?measures=Age-Adjusted Cancer Rate&drilldowns=Race,Ethnicity,MSA&Cancer Site=All Invasive Cancer Sites Combined&Year=latest", d => d.data) ]; diff --git a/app/pages/Profile/sections/healthConditions/OccurrenceByCancerSite.jsx b/app/pages/Profile/sections/healthConditions/OccurrenceByCancerSite.jsx index 6373613..dc24378 100644 --- a/app/pages/Profile/sections/healthConditions/OccurrenceByCancerSite.jsx +++ b/app/pages/Profile/sections/healthConditions/OccurrenceByCancerSite.jsx @@ -1,6 +1,5 @@ import React from "react"; import {connect} from "react-redux"; -import {nest} from "d3-collection"; import {LinePlot} from "d3plus-react"; import {formatAbbreviate} from "d3plus-format"; @@ -164,11 +163,6 @@ OccurrenceByCancerSite.defaultProps = { }; OccurrenceByCancerSite.need = [ - fetchData("sortedCancerTypes", "/api/data?measures=Cancer Diagnosis&drilldowns=Cancer Site&Year=all&order=Cancer Diagnosis&sort=desc", d => { - const cancerList = []; - nest().key(d => d["Cancer Site"]).entries(d.data).forEach(group => cancerList.push(group.key)); - return cancerList; - }), fetchData("occuranceRate", "/api/data?measures=Age-Adjusted Cancer Rate&drilldowns=MSA&Cancer Site=All Invasive Cancer Sites Combined&Year=all", d => d.data) // getting all year data to find growthRate. ]; diff --git a/app/pages/Profile/sections/naturalEnvironment/AirQuality.jsx b/app/pages/Profile/sections/naturalEnvironment/AirQuality.jsx index 36ca20b..7632735 100644 --- a/app/pages/Profile/sections/naturalEnvironment/AirQuality.jsx +++ b/app/pages/Profile/sections/naturalEnvironment/AirQuality.jsx @@ -34,6 +34,15 @@ const pollutantDefinitions = [ {term: "Sulphur Dioxide (S02)", definition: "Potential health effects from exposure to sulphur dioxide are - narrowing of the airways leading to wheezing, chest tightness and shortness of breath, more frequent asthma attacks in people with asthma and exacerbation of cardiovascular diseases."} ]; +const getAQILevel = value => { + if (value >= 0 && value <= 50) return "Good"; + else if (value >= 51 && value <= 100) return "Moderate"; + else if (value >= 101 && value <= 150) return "Unhealthy for Sensitive Groups"; + else if (value >= 151 && value <= 200) return "Unhealthy"; + else if (value >= 201 && value <= 300) return "Very Unhealthy"; + else return "Hazardous"; +}; + const formatAirQualityDaysName = d => d.replace(" days", ""); class AirQuality extends SectionColumns { @@ -146,6 +155,7 @@ class AirQuality extends SectionColumns { title={"Median Air Quality Index"} year={airQualityMedianAQIs[0].Year} value={airQualityMedianAQIs[0]["Median AQI"]} + qualifier={getAQILevel(airQualityMedianAQIs[0]["Median AQI"])} />

In {airQualityMedianAQIs[0].Year}, the median air quality index was {airQualityMedianAQIs[0]["Median AQI"]} in {airQualityMedianAQIs[0].Geography}.

The glossary below explains air quality index (AQI) and different types of air quality with respect to AQI.

diff --git a/app/utils/consts.js b/app/utils/consts.js index d6f4b95..d943d4a 100644 --- a/app/utils/consts.js +++ b/app/utils/consts.js @@ -41,8 +41,8 @@ module.exports = { icon: "tree" }, { - title: "Special Population", - link: "special-population", + title: "Special Populations", + link: "special-populations", icon: "people" } ] From 66d43f89c4a82bff8e239aa913a0521afbd0bc15 Mon Sep 17 00:00:00 2001 From: Rashmi Date: Mon, 3 Jun 2019 15:03:30 -0700 Subject: [PATCH 10/26] adds Census tract hover definition in all the stats --- app/components/Stat.jsx | 6 ++++-- .../sections/accessToCare/HealthInsuranceCoverage.jsx | 3 ++- .../Profile/sections/healthBehaviors/PhysicalInactivity.jsx | 2 +- .../Profile/sections/healthBehaviors/PreventiveCare.jsx | 2 +- .../Profile/sections/healthBehaviors/RiskyBehaviors.jsx | 2 +- .../healthConditions/ConditionsAndChronicDiseases.jsx | 4 ++-- .../sections/healthConditions/ObesityAndDiabetes.jsx | 4 ++-- app/pages/Profile/sections/specialPopulation/Immigrants.jsx | 5 +++-- .../specialPopulation/VisionAndAuditoryDisabilities.jsx | 5 +++-- 9 files changed, 19 insertions(+), 14 deletions(-) diff --git a/app/components/Stat.jsx b/app/components/Stat.jsx index 67413dc..8906271 100644 --- a/app/components/Stat.jsx +++ b/app/components/Stat.jsx @@ -29,8 +29,10 @@ export default class Stat extends Component { {year} } -
30 ? "font-sm" : "font-md" } ${ themeClass }`}> - { value ? `${value} ` : null } +
30 ? "font-sm" : "font-md"} ${ themeClass }`}> + { value && + {value} + } { qualifier && 20 ? "font-xs" : "font-sm" diff --git a/app/pages/Profile/sections/accessToCare/HealthInsuranceCoverage.jsx b/app/pages/Profile/sections/accessToCare/HealthInsuranceCoverage.jsx index aa71f5c..48bf00d 100644 --- a/app/pages/Profile/sections/accessToCare/HealthInsuranceCoverage.jsx +++ b/app/pages/Profile/sections/accessToCare/HealthInsuranceCoverage.jsx @@ -13,6 +13,7 @@ import rangeFormatter from "utils/rangeFormatter"; import places from "utils/places"; import Stat from "components/Stat"; import StatGroup from "components/StatGroup"; +import CensusTractDefinition from "components/CensusTractDefinition"; import {updateSource} from "utils/helper"; import SourceGroup from "components/SourceGroup"; import Options from "components/Options"; @@ -184,7 +185,7 @@ class HealthInsuranceCoverage extends SectionColumns { : formatGeomapLabel(topRecentYearChildrenGeographyData, meta, tractToPlace)} qualifier={getGeomapQualifier(topRecentYearChildrenGeographyData, meta)} /> diff --git a/app/pages/Profile/sections/healthBehaviors/PhysicalInactivity.jsx b/app/pages/Profile/sections/healthBehaviors/PhysicalInactivity.jsx index 3f9157c..fa7a288 100644 --- a/app/pages/Profile/sections/healthBehaviors/PhysicalInactivity.jsx +++ b/app/pages/Profile/sections/healthBehaviors/PhysicalInactivity.jsx @@ -66,7 +66,7 @@ class PhysicalInactivity extends SectionColumns { { topTractPlace ? `, ${topTractPlace}` : "" }

} qualifier={`${formatPercentage(topRecentYearData["Physical Inactivity"])} of the population of this census tract`} /> diff --git a/app/pages/Profile/sections/healthBehaviors/PreventiveCare.jsx b/app/pages/Profile/sections/healthBehaviors/PreventiveCare.jsx index c6dc409..5364cb7 100644 --- a/app/pages/Profile/sections/healthBehaviors/PreventiveCare.jsx +++ b/app/pages/Profile/sections/healthBehaviors/PreventiveCare.jsx @@ -132,7 +132,7 @@ class PreventiveCare extends SectionColumns { :

{ topTractPlace ? `, ${topTractPlace}` : "" }

} qualifier={isPreventativeCareWeightedValueSelected ? `${formatPercentage(topDropdownData[dropdownValue], true)} of the population of this zip region` : `${formatPercentage(topDropdownData[dropdownValue])} of the population of this census tract`} /> diff --git a/app/pages/Profile/sections/healthBehaviors/RiskyBehaviors.jsx b/app/pages/Profile/sections/healthBehaviors/RiskyBehaviors.jsx index 3ac9753..79bbe7c 100644 --- a/app/pages/Profile/sections/healthBehaviors/RiskyBehaviors.jsx +++ b/app/pages/Profile/sections/healthBehaviors/RiskyBehaviors.jsx @@ -93,7 +93,7 @@ class RiskyBehaviors extends SectionColumns { } :

{ topTractPlace ? `, ${topTractPlace}` : "" }

} year={isSecondHandSmokeOrMonthlyAlcoholSelected ? topSecondHandSmokeAndMonthlyAlcoholData["End Year"] : topTractSmokingDrinkingData.Year} qualifier={isSecondHandSmokeOrMonthlyAlcoholSelected ? `${formatPercentage(topSecondHandSmokeAndMonthlyAlcoholData[dropdownValue], true)} of the population of this zip region` : `${formatPercentage(topTractSmokingDrinkingData[dropdownValue])} of the population of this census tract`} /> diff --git a/app/pages/Profile/sections/healthConditions/ConditionsAndChronicDiseases.jsx b/app/pages/Profile/sections/healthConditions/ConditionsAndChronicDiseases.jsx index 19af7af..1c320bb 100644 --- a/app/pages/Profile/sections/healthConditions/ConditionsAndChronicDiseases.jsx +++ b/app/pages/Profile/sections/healthConditions/ConditionsAndChronicDiseases.jsx @@ -134,13 +134,13 @@ class ConditionsAndChronicDiseases extends SectionColumns { ? } qualifier={`${formatPercentage(topDropdownWeightedData[dropdownValue], true)} of the population in this zip region`} /> : { topTractPlace ? `, ${topTractPlace}` : "" }

} qualifier={`${formatPercentage(topDropdownValueTract[dropdownValue])} of the population in this tract`} /> } diff --git a/app/pages/Profile/sections/healthConditions/ObesityAndDiabetes.jsx b/app/pages/Profile/sections/healthConditions/ObesityAndDiabetes.jsx index 37e1fa8..92c26bb 100644 --- a/app/pages/Profile/sections/healthConditions/ObesityAndDiabetes.jsx +++ b/app/pages/Profile/sections/healthConditions/ObesityAndDiabetes.jsx @@ -153,13 +153,13 @@ class ObesityAndDiabetes extends SectionColumns { ? } qualifier={`${formatPercentage(topDropdownWeightedData[dropdownValue], true)} of the population of this zip region`} /> : { topTractPlace ? `, ${topTractPlace}` : "" }

} qualifier={`${formatPercentage(topDropdownValueTract[dropdownValue])} of the population of this census tract`} /> } diff --git a/app/pages/Profile/sections/specialPopulation/Immigrants.jsx b/app/pages/Profile/sections/specialPopulation/Immigrants.jsx index edc4a1a..996f8f5 100644 --- a/app/pages/Profile/sections/specialPopulation/Immigrants.jsx +++ b/app/pages/Profile/sections/specialPopulation/Immigrants.jsx @@ -14,6 +14,7 @@ import Stat from "components/Stat"; import places from "utils/places"; import {updateSource} from "utils/helper"; import SourceGroup from "components/SourceGroup"; +import CensusTractDefinition from "components/CensusTractDefinition"; import Options from "components/Options"; const formatPercentage = d => `${formatAbbreviate(d)}%`; @@ -209,7 +210,7 @@ class Immigrants extends SectionColumns { : formatGeomapLabel(topStats, meta, tractToPlace)} qualifier={getGeomapQualifier(topStats, meta)} /> @@ -233,7 +234,7 @@ class Immigrants extends SectionColumns { : formatGeomapLabel(topStats, meta, tractToPlace)} qualifier={getGeomapQualifier(topStats, meta)} /> diff --git a/app/pages/Profile/sections/specialPopulation/VisionAndAuditoryDisabilities.jsx b/app/pages/Profile/sections/specialPopulation/VisionAndAuditoryDisabilities.jsx index d222613..b54d7af 100644 --- a/app/pages/Profile/sections/specialPopulation/VisionAndAuditoryDisabilities.jsx +++ b/app/pages/Profile/sections/specialPopulation/VisionAndAuditoryDisabilities.jsx @@ -17,6 +17,7 @@ import StatGroup from "components/StatGroup"; import places from "utils/places"; import {updateSource} from "utils/helper"; import SourceGroup from "components/SourceGroup"; +import CensusTractDefinition from "components/CensusTractDefinition"; import Options from "components/Options"; const formatPercentage = d => `${formatAbbreviate(d)}%`; @@ -186,7 +187,7 @@ class VisionAndAuditoryDisabilities extends SectionColumns { : formatGeomapLabel(topChildrenGeographyStats, meta, tractToPlace)} qualifier={getGeomapQualifier(topChildrenGeographyStats, meta)} />
@@ -213,7 +214,7 @@ class VisionAndAuditoryDisabilities extends SectionColumns { : formatGeomapLabel(topChildrenGeographyStats, meta, tractToPlace)} qualifier={getGeomapQualifier(topChildrenGeographyStats, meta)} /> From b59f27581fe25b6cfae55af31e4a2006bf9dcb2c Mon Sep 17 00:00:00 2001 From: Rashmi Date: Thu, 6 Jun 2019 16:27:36 -0700 Subject: [PATCH 11/26] modifies all chart label colors to white --- app/d3plus.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/app/d3plus.js b/app/d3plus.js index b2af160..10ac69a 100644 --- a/app/d3plus.js +++ b/app/d3plus.js @@ -120,6 +120,24 @@ export default { fontMax: fontSizeLg } }, + // sets all BarChart labels to "styles.white" + Bar: { + labelConfig: { + fontColor: styles.white + } + }, + // sets all Pie chart labels to "styles.white" + Circle: { + labelConfig: { + fontColor: styles.white + } + }, + // set all Treemap labels to "styles.white" + Rect: { + labelConfig: { + fontColor: styles.white + } + }, // line charts Line: { stroke: colorLogic, From 98a97a53ca250405048149658e3b3c482c567653 Mon Sep 17 00:00:00 2001 From: Rashmi Date: Thu, 6 Jun 2019 17:53:19 -0700 Subject: [PATCH 12/26] modifies ConditionsAndChronicDiseases text --- .../healthConditions/ConditionsAndChronicDiseases.jsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/pages/Profile/sections/healthConditions/ConditionsAndChronicDiseases.jsx b/app/pages/Profile/sections/healthConditions/ConditionsAndChronicDiseases.jsx index 1c320bb..a280f3a 100644 --- a/app/pages/Profile/sections/healthConditions/ConditionsAndChronicDiseases.jsx +++ b/app/pages/Profile/sections/healthConditions/ConditionsAndChronicDiseases.jsx @@ -20,6 +20,7 @@ const formatPercentage = (d, mutiplyBy100 = false) => mutiplyBy100 ? `${formatAb const formatDropdownChoiceName = d => { if (d === "Ever Heart Attack") return "Heart Attack"; + if (d === "Teeth Loss") return "Loss of Teeth"; if (d === "Ever Depressive") return "Depression"; if (d === "Mental Health") return "Mental Health (Census Tract)"; if (d === "Poor Mental Health 14 Or More Days") return "Mental Health (Zip Region)"; @@ -41,6 +42,7 @@ const formatDropdownParagraphText = d => { if (d === "Poor Mental Health 14 Or More Days") return "poor mental health"; if (d === "Ever Heart Attack") return "heart attack"; if (d === "Ever Depressive") return "depression"; + if (d === "Teeth Loss") return "loss of teeth"; return d.toLowerCase(); }; @@ -147,8 +149,8 @@ class ConditionsAndChronicDiseases extends SectionColumns { {/* Write short paragraphs explaining Geomap and top stats for the dropdown value selected. */} { isHealthConditionWeightedValueSelected - ?

In {topDropdownWeightedData["End Year"]}, {formatPercentage(topDropdownWeightedData[dropdownValue], true)} of the population of the {topDropdownWeightedData["Zip Region"]} had {getArticle(formatDropdownParagraphText(dropdownValue))} {formatDropdownParagraphText(dropdownValue)} diagnosis, the highest prevelence of all zip regions in Wayne County, as compared to {formatPercentage(countyLevelData[0][dropdownValue], true)} overall in Wayne County.

- :

In {topDropdownValueTract.Year}, {formatPercentage(topDropdownValueTract[dropdownValue])} of the population of {topTractPlace !== undefined ? `, ${topTractPlace}` : ""} had {getArticle(formatDropdownParagraphText(dropdownValue))} {formatDropdownParagraphText(dropdownValue)} diagnosis, the highest prevalence out of all tracts in Detroit, Livonia, Dearborn and Westland.

+ ?

In {topDropdownWeightedData["End Year"]}, {formatPercentage(topDropdownWeightedData[dropdownValue], true)} of the population of the {topDropdownWeightedData["Zip Region"]} reported {getArticle(formatDropdownParagraphText(dropdownValue))} diagnosis of {formatDropdownParagraphText(dropdownValue)}, the highest prevelence of all zip regions in Wayne County, as compared to {formatPercentage(countyLevelData[0][dropdownValue], true)} overall in Wayne County.

+ :

In {topDropdownValueTract.Year}, {formatPercentage(topDropdownValueTract[dropdownValue])} of the population of {topTractPlace !== undefined ? `, ${topTractPlace}` : ""} reported {getArticle(formatDropdownParagraphText(dropdownValue))} diagnosis of {formatDropdownParagraphText(dropdownValue)}, the highest prevalence out of all tracts in Detroit, Livonia, Dearborn and Westland.

} {dropdownValue === "Poor Mental Health 14 Or More Days" &&

Poor mental health is defined as reporting mental health as not good concerning stress, depression, or problems with emotions for 14 or more out of the past 30 days.

} {dropdownValue === "Physical Health" &&

Fair or poor general health is the proportion of adults who reported that their health, in general, was either fair or poor.

} From d87ffe25af4a65072f1b0746fa2bd06ef60ecb51 Mon Sep 17 00:00:00 2001 From: Rashmi Date: Thu, 6 Jun 2019 19:32:49 -0700 Subject: [PATCH 13/26] adds link to a glossary text in Poverty --- app/pages/Profile/sections/economy/Poverty.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/pages/Profile/sections/economy/Poverty.jsx b/app/pages/Profile/sections/economy/Poverty.jsx index 16d9314..11c98a3 100644 --- a/app/pages/Profile/sections/economy/Poverty.jsx +++ b/app/pages/Profile/sections/economy/Poverty.jsx @@ -18,7 +18,7 @@ import SourceGroup from "components/SourceGroup"; import Options from "components/Options"; const definitions = [ - {term: "Poverty", definition: "The Census Bureau uses a set of money income thresholds that vary by family size and composition to determine who is in poverty. If a family's total income is less than the family's threshold, then that family and every individual in it is considered in poverty. The official poverty thresholds do not vary geographically, but they are updated for inflation using Consumer Price Index (CPI-U). The official poverty definition uses money income before taxes and does not include capital gains or noncash benefits (such as public housing, Medicaid, and food stamps)."} + {term: "Poverty", definition:

The Census Bureau uses a set of money income thresholds that vary by family size and composition to determine who is in poverty. If a family's total income is less than the family's threshold, then that family and every individual in it is considered in poverty. The official poverty thresholds do not vary geographically, but they are updated for inflation using Consumer Price Index (CPI-U). The official poverty definition uses money income before taxes and does not include capital gains or noncash benefits (such as public housing, Medicaid, and food stamps).

} ]; const formatPopulation = d => `${formatAbbreviate(d)}%`; From d63d1d0a2ae545b51366ecba450eed14c699e6e4 Mon Sep 17 00:00:00 2001 From: Rashmi Date: Thu, 6 Jun 2019 20:19:18 -0700 Subject: [PATCH 14/26] fixes stat value font size for data with type object --- app/components/Stat.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/components/Stat.jsx b/app/components/Stat.jsx index 8906271..5267dd7 100644 --- a/app/components/Stat.jsx +++ b/app/components/Stat.jsx @@ -29,9 +29,9 @@ export default class Stat extends Component { {year} } -
30 ? "font-sm" : "font-md"} ${ themeClass }`}> +
{ value && - {value} + {value} } { qualifier && Date: Fri, 7 Jun 2019 15:39:42 -0700 Subject: [PATCH 15/26] adds LCI and UCI range to the OccurrenceByCancerSite --- .../sections/healthConditions/OccurrenceByCancerSite.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/pages/Profile/sections/healthConditions/OccurrenceByCancerSite.jsx b/app/pages/Profile/sections/healthConditions/OccurrenceByCancerSite.jsx index dc24378..07dd379 100644 --- a/app/pages/Profile/sections/healthConditions/OccurrenceByCancerSite.jsx +++ b/app/pages/Profile/sections/healthConditions/OccurrenceByCancerSite.jsx @@ -110,7 +110,7 @@ class OccurrenceByCancerSite extends SectionColumns {

In {mostRecentYearOccuranceRate.Year}, the cancer rate in the {mostRecentYearOccuranceRate.MSA} was {formatAbbreviate(mostRecentYearOccuranceRate["Age-Adjusted Cancer Rate"])} per 100,000 people. This represents a {growthRate < 0 ? formatPercentage(growthRate * -1) : formatPercentage(growthRate)} {growthRate < 0 ? "decline" : "growth"} from the previous year ({formatAbbreviate(secondMostRecentYearOccuranceRate["Age-Adjusted Cancer Rate"])} per 100,000 people).

-

The following chart shows the occurrence rate per 100,000 people in {mostRecentYearOccuranceRate.MSA} for {isItemsListEmpty ? mostRecentYearOccuranceRate["Cancer Site"].toLowerCase() : "the selected cancer site(s)"}.

+

The following chart shows the occurrence rate per 100,000 people (and the associated upper and lower 95% confidence intervals) in {mostRecentYearOccuranceRate.MSA} for {isItemsListEmpty ? mostRecentYearOccuranceRate["Cancer Site"].toLowerCase() : "the selected cancer site(s)"}.

@@ -145,7 +145,7 @@ class OccurrenceByCancerSite extends SectionColumns { confidenceConfig: { fillOpacity: 0.2 }, - tooltipConfig: {tbody: [["Year", d => d.Year], ["Occurrence per 100,000 people", d => formatAbbreviate(d["Age-Adjusted Cancer Rate"])], ["Metro Area", d => d.MSA]]} + tooltipConfig: {tbody: [["Year", d => d.Year], ["Occurrence per 100,000 people", d => formatAbbreviate(d["Age-Adjusted Cancer Rate"])], ["LCI", d => formatAbbreviate(d["Age-Adjusted Cancer Rate Lower 95 Percent Confidence Interval"])], ["UCI", d => formatAbbreviate(d["Age-Adjusted Cancer Rate Upper 95 Percent Confidence Interval"])], ["Metro Area", d => d.MSA]]} }} dataFormat={resp => { this.setState({sources: updateSource(resp.source, this.state.sources)}); From 69d30032f1e13f3d1fc5b321f5f89e912de6a64a Mon Sep 17 00:00:00 2001 From: Rashmi Date: Fri, 7 Jun 2019 15:40:07 -0700 Subject: [PATCH 16/26] adds national GINI data to WageDistribution --- .../Profile/sections/economy/Poverty.jsx | 3 +-- .../sections/economy/WageDistribution.jsx | 22 +++++++++++++++---- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/app/pages/Profile/sections/economy/Poverty.jsx b/app/pages/Profile/sections/economy/Poverty.jsx index 11c98a3..a627332 100644 --- a/app/pages/Profile/sections/economy/Poverty.jsx +++ b/app/pages/Profile/sections/economy/Poverty.jsx @@ -157,8 +157,7 @@ class Poverty extends SectionColumns { time: "Year", title: d => `Population in Poverty by Race/Ethnicity in ${d[0].Geography}`, xConfig: { - tickFormat: d => formatPopulation(d), - title: "Share" + tickFormat: d => formatPopulation(d) }, tooltipConfig: {tbody: [["Year", d => d.Year], ["Share", d => formatPopulation(d.share)], [titleCase(meta.level), d => d.Geography]]} }} diff --git a/app/pages/Profile/sections/economy/WageDistribution.jsx b/app/pages/Profile/sections/economy/WageDistribution.jsx index f8ef22e..59926fd 100644 --- a/app/pages/Profile/sections/economy/WageDistribution.jsx +++ b/app/pages/Profile/sections/economy/WageDistribution.jsx @@ -28,6 +28,12 @@ const formatWageDistributionData = wageDistributionData => { return wageDistributionData; }; +const wageGiniComparison = (currentLevelGini, nationalLevelGini) => { + if (currentLevelGini < nationalLevelGini) return ["higher than", "less"]; + else if (currentLevelGini > nationalLevelGini) return ["lower than", "more"]; + else return ["equal to", ""]; +}; + class WageDistribution extends SectionColumns { constructor(props) { @@ -37,7 +43,7 @@ class WageDistribution extends SectionColumns { render() { - const {meta, wageDistributionData, wageGinidata} = this.props; + const {meta, wageDistributionData, wageGinidata, nationalWageGini} = this.props; const wageDistributionDataAvailable = wageDistributionData.length !== 0; const wageGinidataAvailable = wageGinidata.length !== 0; @@ -54,7 +60,13 @@ class WageDistribution extends SectionColumns { value={wageGinidataAvailable ? wageGini : "N/A"} qualifier={wageGinidataAvailable ? `in ${wageGinidata[0].Geography}` : ""} /> - {wageGinidataAvailable ?

In {wageGinidata[0].Year}, the income inequality in {wageGinidata[0].Geography} was {wageGini}, using the GINI coefficient. The GINI index measures the extent to which the distribution of income among individuals or households within an economy deviates from a perfectly equal distribution. Values range from 0 to 1, with 0 being perfect equality (every household earns equal income), and 1 being absolute inequality (one household earns all the income).

: ""} + + {wageGinidataAvailable ?

In {wageGinidata[0].Year}, the income inequality in {wageGinidata[0].Geography} was {wageGini}, using the GINI coefficient. {} + This was {wageGiniComparison(nationalWageGini[0]["Wage GINI"], wageGini)[0]} the national average of {nationalWageGini[0]["Wage GINI"]}. {} + In other words, wages are distributed {wageGiniComparison(nationalWageGini[0]["Wage GINI"], wageGini)[1]} evenly in Detroit, MI in comparison to the national average.

: ""} + +

The GINI index measures the extent to which the distribution of income among individuals or households within an economy deviates from a perfectly equal distribution. Values range from 0 to 1, with 0 being perfect equality (every household earns equal income), and 1 being absolute inequality (one household earns all the income).

+ {wageDistributionDataAvailable ?

The following chart shows the household income buckets and share for each bucket in {wageDistributionData[0].Geography}.

: ""} @@ -112,13 +124,15 @@ WageDistribution.defaultProps = { WageDistribution.need = [ fetchData("wageDistributionData", "https://acs.datausa.io/api/data?measures=Household Income&drilldowns=Household Income Bucket&Geography=&Year=latest", d => d.data), - fetchData("wageGinidata", "https://acs.datausa.io/api/data?measures=Wage GINI&Geography=&Year=latest", d => d.data) + fetchData("wageGinidata", "https://acs.datausa.io/api/data?measures=Wage GINI&Geography=&Year=latest", d => d.data), + fetchData("nationalWageGini", "https://acs.datausa.io/api/data?measures=Wage GINI&Geography=01000US&Year=latest", d => d.data) ]; const mapStateToProps = state => ({ meta: state.data.meta, wageDistributionData: state.data.wageDistributionData, - wageGinidata: state.data.wageGinidata + wageGinidata: state.data.wageGinidata, + nationalWageGini: state.data.nationalWageGini }); export default connect(mapStateToProps)(WageDistribution); From 83da0b4d9807d3e22df80ce41c3833618602007d Mon Sep 17 00:00:00 2001 From: Rashmi Date: Fri, 7 Jun 2019 17:30:38 -0700 Subject: [PATCH 17/26] adds definitions to some of the terms used --- .../sections/specialPopulation/DisabilityStatus.jsx | 3 ++- .../sections/specialPopulation/Incarceration.jsx | 10 ++++++++++ .../VisionAndAuditoryDisabilities.jsx | 7 +++++++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/app/pages/Profile/sections/specialPopulation/DisabilityStatus.jsx b/app/pages/Profile/sections/specialPopulation/DisabilityStatus.jsx index 6072f5d..dcef8d6 100644 --- a/app/pages/Profile/sections/specialPopulation/DisabilityStatus.jsx +++ b/app/pages/Profile/sections/specialPopulation/DisabilityStatus.jsx @@ -82,7 +82,7 @@ class DisabilityStatus extends SectionColumns { qualifier={disabilityStatusAvailable ? `(${formatPopulation(topDisabilityStatus.share)} of the population in ${topDisabilityStatus.Geography})` : ""} /> {/* Write short paragraph describing stats and barchart. */} - {disabilityStatusAvailable ?

In {topDisabilityStatus.Year}, the most common disabled age group was {topDisabilityStatus.share !== 0 ? rangeFormatter(topDisabilityStatus.Age) : "N/A"}, making up {formatPopulation(topDisabilityStatus.share)} of all citizens in {topDisabilityStatus.Geography}.

: ""} + {disabilityStatusAvailable ?

In {topDisabilityStatus.Year}, the most common disabled age group was {topDisabilityStatus.share !== 0 ? topDisabilityStatus.Age.toLowerCase() : "N/A"}, making up {formatPopulation(topDisabilityStatus.share)} of all citizens in {topDisabilityStatus.Geography} in this age group.

: ""} {healthCoverageTypeAvailable ?

The chart here shows the health coverage breakdown of the disabled population by age in {filteredHealthCoverageType[0].Geography}.

: ""} @@ -110,6 +110,7 @@ class DisabilityStatus extends SectionColumns { y: "Age", x: "share", time: "Year", + title: d => `Percentage of Disabled Population Within Each Age Group in ${d[0].Geography}`, yConfig: { tickFormat: d => rangeFormatter(d) }, diff --git a/app/pages/Profile/sections/specialPopulation/Incarceration.jsx b/app/pages/Profile/sections/specialPopulation/Incarceration.jsx index 398d2de..921560d 100644 --- a/app/pages/Profile/sections/specialPopulation/Incarceration.jsx +++ b/app/pages/Profile/sections/specialPopulation/Incarceration.jsx @@ -12,8 +12,17 @@ import Disclaimer from "components/Disclaimer"; import Stat from "components/Stat"; import {updateSource} from "utils/helper"; import SourceGroup from "components/SourceGroup"; +import Glossary from "components/Glossary"; import Options from "components/Options"; +const definitions = [ + {term: "Assaultive Offence Includes", definition: "Homicide, Robbery, CSC, Assault, Arson, Other Sex Offense, Burglary, Weapons Possession, etc."}, + {term: "Non-Assaultive Offence Includes", definition: "Larceny, Fraud, Forgery/Embezzle, Motor Vehicle, Malicious Destruction, Drugs, OUIL 3rd, etc."}, + {term: "Probation", definition: "A term of supervision afforded either a convicted felon or a convicted misdemeanant by a court as an alternative to prison or jail, although some judges may sentence offenders to a combination of both probation and jail or boot camp."}, + {term: "Prison", definition: "A correctional facility where offenders serve a felony sentence imposed by the court under the supervision of the Michigan Department of Corrections."}, + {term: "Jail", definition: " A county institution that houses persons awaiting trial, unsentenced felons and misdemeanants, and sentenced misdemeanants and felons."} +]; + const formatPercentage = d => `${formatAbbreviate(d)}%`; const formatName = data => { @@ -113,6 +122,7 @@ class Incarceration extends SectionColumns {

This chart shows the percentages of punishments broken down by offense type for all convicted crimes in {topIncarcerationData.Geography}.

+ diff --git a/app/pages/Profile/sections/specialPopulation/VisionAndAuditoryDisabilities.jsx b/app/pages/Profile/sections/specialPopulation/VisionAndAuditoryDisabilities.jsx index b54d7af..117358d 100644 --- a/app/pages/Profile/sections/specialPopulation/VisionAndAuditoryDisabilities.jsx +++ b/app/pages/Profile/sections/specialPopulation/VisionAndAuditoryDisabilities.jsx @@ -18,8 +18,14 @@ import places from "utils/places"; import {updateSource} from "utils/helper"; import SourceGroup from "components/SourceGroup"; import CensusTractDefinition from "components/CensusTractDefinition"; +import Glossary from "components/Glossary"; import Options from "components/Options"; +const definitions = [ + {term: "Vision Disability", definition: "In the American Housing Survey, a person with a vision disability is blind or has serious difficulty reading or driving due to a visual impairment even when wearing glasses."}, + {term: "Hearing Disability", definition: "In the American Housing Survey, a person with a hearing disability is deaf or has a hearing impairment that makes it very difficult to hear conversations, televisions, or radio broadcasts."} +]; + const formatPercentage = d => `${formatAbbreviate(d)}%`; const formatTopojsonFilter = (d, meta, childrenTractIds) => { if (meta.level === "county") return places.includes(d.id); @@ -233,6 +239,7 @@ class VisionAndAuditoryDisabilities extends SectionColumns {

} +
From 4cce2dabaa8c3453dd630c82248098dd9eef068e Mon Sep 17 00:00:00 2001 From: Rashmi Date: Tue, 11 Jun 2019 16:43:08 -0700 Subject: [PATCH 18/26] renames FoodStamps component --- app/pages/Profile/Profile.jsx | 6 +++--- .../{FoodStamps.jsx => PublicFoodAssistance.jsx} | 13 ++++++------- 2 files changed, 9 insertions(+), 10 deletions(-) rename app/pages/Profile/sections/foodAccess/{FoodStamps.jsx => PublicFoodAssistance.jsx} (96%) diff --git a/app/pages/Profile/Profile.jsx b/app/pages/Profile/Profile.jsx index f8729d3..10f659d 100644 --- a/app/pages/Profile/Profile.jsx +++ b/app/pages/Profile/Profile.jsx @@ -11,7 +11,7 @@ import "./Profile.css"; import Introduction from "./sections/about/Introduction"; import FoodInsecurity from "./sections/foodAccess/FoodInsecurity"; import FoodAvailability from "./sections/foodAccess/FoodAvailability"; -import FoodStamps from "./sections/foodAccess/FoodStamps"; +import PublicFoodAssistance from "./sections/foodAccess/PublicFoodAssistance"; import StoreAccessByDemographic from "./sections/foodAccess/StoreAccessByDemographic"; import PreventiveCare from "./sections/healthBehaviors/PreventiveCare"; import RiskyBehaviors from "./sections/healthBehaviors/RiskyBehaviors"; @@ -121,7 +121,7 @@ class Profile extends Component {
- +
@@ -202,7 +202,7 @@ class Profile extends Component { Profile.need = [ Introduction, FoodAvailability, - FoodStamps, + PublicFoodAssistance, FoodInsecurity, StoreAccessByDemographic, CancerPrevalenceByDemographics, diff --git a/app/pages/Profile/sections/foodAccess/FoodStamps.jsx b/app/pages/Profile/sections/foodAccess/PublicFoodAssistance.jsx similarity index 96% rename from app/pages/Profile/sections/foodAccess/FoodStamps.jsx rename to app/pages/Profile/sections/foodAccess/PublicFoodAssistance.jsx index 1692c16..4e7d230 100644 --- a/app/pages/Profile/sections/foodAccess/FoodStamps.jsx +++ b/app/pages/Profile/sections/foodAccess/PublicFoodAssistance.jsx @@ -10,7 +10,6 @@ import {fetchData, SectionColumns, SectionTitle} from "@datawheel/canon-core"; import Contact from "components/Contact"; import Disclaimer from "components/Disclaimer"; -import Stat from "components/Stat"; import StatGroup from "components/StatGroup"; import {updateSource} from "utils/helper"; import SourceGroup from "components/SourceGroup"; @@ -39,7 +38,7 @@ const formatPublicAssistanceData = publicAssistanceData => { return withCashFoodStamps; }; -class FoodStamps extends SectionColumns { +class PublicFoodAssistance extends SectionColumns { constructor(props) { super(props); @@ -88,7 +87,7 @@ class FoodStamps extends SectionColumns { return ( - Food Stamps + Public Food Assistance
{!isSnapWicDataAvailableForCurrentGeography && SNAP and WIC data is shown for {snapWicData.data[0].Geography} @@ -173,11 +172,11 @@ class FoodStamps extends SectionColumns { } } -FoodStamps.defaultProps = { - slug: "food-stamps" +PublicFoodAssistance.defaultProps = { + slug: "public-food-assistance" }; -FoodStamps.need = [ +PublicFoodAssistance.need = [ fetchData("publicAssistanceData", "/api/data?measures=Food-Stamp Population&drilldowns=Public Assistance or Snap&Geography=&Year=latest", d => d.data), fetchData("snapWicData", "/api/data?measures=Number of Nutrition Assistance Stores&drilldowns=Assistance Type&Geography=&Year=all") // getting all year data since WIC and SNAP both have different latest years. ]; @@ -189,4 +188,4 @@ const mapStateToProps = state => ({ snapWicData: state.data.snapWicData }); -export default connect(mapStateToProps)(FoodStamps); +export default connect(mapStateToProps)(PublicFoodAssistance); From 7d7920df28bf9718517001ae754ec41b8f04de85 Mon Sep 17 00:00:00 2001 From: Rashmi Date: Tue, 11 Jun 2019 16:44:12 -0700 Subject: [PATCH 19/26] modifies text and percentage calculation --- .../sections/accessToCare/HealthCenterDemographics.jsx | 2 -- .../sections/accessToCare/HealthInsuranceCoverage.jsx | 6 +++--- .../sections/builtSocialEnvironment/Homeownership.jsx | 8 ++++---- .../Profile/sections/builtSocialEnvironment/Rentals.jsx | 2 +- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/app/pages/Profile/sections/accessToCare/HealthCenterDemographics.jsx b/app/pages/Profile/sections/accessToCare/HealthCenterDemographics.jsx index 0abc9c8..938a058 100644 --- a/app/pages/Profile/sections/accessToCare/HealthCenterDemographics.jsx +++ b/app/pages/Profile/sections/accessToCare/HealthCenterDemographics.jsx @@ -66,8 +66,6 @@ class HealthCenterDemographics extends SectionColumns { topZipLevelData = recentYearZipLevelData[0]; } - // const isHealthCentersSelected = dropdownValue === "Health Centers"; - return ( Health Center Demographics diff --git a/app/pages/Profile/sections/accessToCare/HealthInsuranceCoverage.jsx b/app/pages/Profile/sections/accessToCare/HealthInsuranceCoverage.jsx index 48bf00d..9952fba 100644 --- a/app/pages/Profile/sections/accessToCare/HealthInsuranceCoverage.jsx +++ b/app/pages/Profile/sections/accessToCare/HealthInsuranceCoverage.jsx @@ -92,9 +92,9 @@ const formatGeomapCoverageData = (data, meta, childrenTractIds) => { }; const getGeomapTitle = meta => { - if (meta.level === "county") return "Most covered population within places in Wayne County"; - else if (meta.level === "tract") return "Most covered population within census tracts in Wayne County"; - else return `Most covered population within tracts in ${meta.name}`; + if (meta.level === "county") return "Most covered place in Wayne County"; + else if (meta.level === "tract") return "Most covered census tract in Wayne County"; + else return `Most covered census tract in ${meta.name}`; }; const getGeomapQualifier = (data, meta) => { diff --git a/app/pages/Profile/sections/builtSocialEnvironment/Homeownership.jsx b/app/pages/Profile/sections/builtSocialEnvironment/Homeownership.jsx index 4859456..234f32e 100644 --- a/app/pages/Profile/sections/builtSocialEnvironment/Homeownership.jsx +++ b/app/pages/Profile/sections/builtSocialEnvironment/Homeownership.jsx @@ -35,9 +35,9 @@ const formatGeomapLabel = (d, meta, tractToPlace) => { }; const getGeomapTitle = meta => { - if (meta.level === "county") return "Highest median property value within places in Wayne County"; - else if (meta.level === "tract") return "Highest median property value within census tracts in Wayne County"; - else return `Highest median property value within tracts in ${meta.name}`; + if (meta.level === "county") return "Lowest median property value within places in Wayne County"; + else if (meta.level === "tract") return "Lowest median property value within census tracts in Wayne County"; + else return `Lowest median property value within tracts in ${meta.name}`; }; const formatGeomapPropertyValueData = (data, meta, childrenTractIds) => { @@ -55,7 +55,7 @@ const formatGeomapPropertyValueData = (data, meta, childrenTractIds) => { if (childrenTractIds.includes(d["ID Geography"])) filteredChildrenGeography.push(d); }); } - const topRecentYearData = filteredChildrenGeography.sort((a, b) => b["Property Value"] - a["Property Value"])[0]; + const topRecentYearData = filteredChildrenGeography.sort((a, b) => a["Property Value"] - b["Property Value"])[0]; return [filteredChildrenGeography, topRecentYearData]; }; diff --git a/app/pages/Profile/sections/builtSocialEnvironment/Rentals.jsx b/app/pages/Profile/sections/builtSocialEnvironment/Rentals.jsx index 458c4cb..4c55d57 100644 --- a/app/pages/Profile/sections/builtSocialEnvironment/Rentals.jsx +++ b/app/pages/Profile/sections/builtSocialEnvironment/Rentals.jsx @@ -68,7 +68,7 @@ class Rentals extends SectionColumns { /> {/* Show stats for Renter-Occupied Housing Units with Extra Pay on Utilities for most recent year. */} From 55611a0e6b03a482a6f9be9ac7843500b3e9eb46 Mon Sep 17 00:00:00 2001 From: Rashmi Date: Thu, 13 Jun 2019 17:28:13 -0700 Subject: [PATCH 20/26] adds definitions and modifies some text for the components --- .../ViolentAndPropertyCrimes.jsx | 3 ++- .../Profile/sections/foodAccess/FoodAvailability.jsx | 10 ++++++++-- .../sections/healthBehaviors/RiskyBehaviors.jsx | 9 +++++++++ 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/app/pages/Profile/sections/builtSocialEnvironment/ViolentAndPropertyCrimes.jsx b/app/pages/Profile/sections/builtSocialEnvironment/ViolentAndPropertyCrimes.jsx index ccd82dc..c818d12 100644 --- a/app/pages/Profile/sections/builtSocialEnvironment/ViolentAndPropertyCrimes.jsx +++ b/app/pages/Profile/sections/builtSocialEnvironment/ViolentAndPropertyCrimes.jsx @@ -36,7 +36,8 @@ const definitions = [ {term: "Robbery", definition: "Robbery is the crime of taking or attempting to take anything of value by force, threat of force, or by putting the victim in fear."}, {term: "Rape", definition: "Rape is defined in most jurisdictions as sexual intercourse, or other forms of sexual penetration, committed by a perpetrator against a victim without their consent."}, {term: "Murder and Non-negligent Manslaughter", definition: "Murder and non-negligent manslaughter are described by UCR as the willful (non-negligent) killing of one human being by another or a death that results from the commission of another criminal act."}, - {term: "Arson", definition: "Arson is the crime of willfully and maliciously burning of property (such as a building) especially with criminal or fraudulent intent."} + {term: "Arson", definition: "Arson is the crime of willfully and maliciously burning of property (such as a building) especially with criminal or fraudulent intent."}, + {term: "Aggravated Assault", definition: "Aggravated assault is the crime of physically attacking another person which results in serious bodily harm and/or is made with a deadly or dangerous weapon such as a gun, knife, sword, ax or blunt instrument."} ]; class ViolentAndPropertyCrimes extends SectionColumns { diff --git a/app/pages/Profile/sections/foodAccess/FoodAvailability.jsx b/app/pages/Profile/sections/foodAccess/FoodAvailability.jsx index 13e6f9b..1c3cc9c 100644 --- a/app/pages/Profile/sections/foodAccess/FoodAvailability.jsx +++ b/app/pages/Profile/sections/foodAccess/FoodAvailability.jsx @@ -18,7 +18,13 @@ const commas = format(",d"); const definitions = [ {term: "Full Service Restaurants", definition: "Full service restaurants are establishments with a relatively broad menu along with table, counter and/or booth service and a wait staff. These establishments offer meals and snacks for immediate consumption primarily on-premise, though they may also offer takeout service."}, - {term: "Fast-Food Restaurants", definition: "Fast-food restaurant are establishments whose patrons generally order or select items and pay before eating. Food and drink may be consumed on premises, taken out, or delivered to customers' locations."} + {term: "Fast-Food Restaurants", definition: "Fast-food restaurant are establishments whose patrons generally order or select items and pay before eating. Food and drink may be consumed on premises, taken out, or delivered to customers' locations."}, + {term: "Convenience Stores,", definition: "A small grocery store, selling a limited variety of food and nonfood products, typically open extended hours. Customers normally use a convenience store to purchase a few items, whereas grocery stores are used for large, volume purchases. Convenience stores normally have less than 2,500 square feet of total under-roof floor space. Many convenience stores operate gasoline pumps."}, + {term: "Grocery Stores", definition: "A grocery store is a retail shop that primarily sells food. A grocer is a bulk seller of food. Grocery stores also offer non-perishable foods that are packaged in bottles, boxes, and cans; some also have bakeries, butchers, delis, and fresh produce."}, + {term: "Specialized Food Stores", definition: "A foodstore primarily engaged in the retail sale of a single food category such as meat and seafood markets, dairy stores, candy and nut stores, and retail bakeries."}, + {term: "Supercenters", definition: "A large combination supermarket and discount general merchandise store, with grocery products accounting for up to 40 percent of selling area."}, + {term: "Clube Stores", definition: "A membership-based wholesale-retail hybrid outlet, serving both small businesses and individual consumers. Both grocery products (in large and multipack sizes) and a wide variety of general merchandise are offered."}, + {term: "Farmers Market", definition: "A farmers’ market is a common area where several farmers gather on a recurring basis to sell a variety of fresh fruits, vegetables, and other farm products directly to consumers."} ]; class FoodAvailability extends SectionColumns { @@ -77,7 +83,7 @@ class FoodAvailability extends SectionColumns { qualifier={`${commas(topStore["Number of Food Stores"])} in ${topStore.Geography}`} />

In {topStore.Year}, the most common food store type available in {topStore.Geography} was {topStore["Sub-category"].toLowerCase()} ({commas(topStore["Number of Food Stores"])}).

-

The chart here shows the share of fast-food restaurants, full-service restaurants, convenience stores, grocery stores, specialized food stores, supercenters and farmers market in {topStore.Geography}.

+

The chart here shows the shares of fast-food restaurants, full-service restaurants, convenience stores, grocery stores, specialized food stores, supercenters and farmers markets in {topStore.Geography}.

diff --git a/app/pages/Profile/sections/healthBehaviors/RiskyBehaviors.jsx b/app/pages/Profile/sections/healthBehaviors/RiskyBehaviors.jsx index 79bbe7c..26c075e 100644 --- a/app/pages/Profile/sections/healthBehaviors/RiskyBehaviors.jsx +++ b/app/pages/Profile/sections/healthBehaviors/RiskyBehaviors.jsx @@ -11,12 +11,20 @@ import styles from "style.yml"; import Contact from "components/Contact"; import Disclaimer from "components/Disclaimer"; import Stat from "components/Stat"; +import Glossary from "components/Glossary"; import ZipRegionDefinition from "components/ZipRegionDefinition"; import CensusTractDefinition from "components/CensusTractDefinition"; import {updateSource} from "utils/helper"; import SourceGroup from "components/SourceGroup"; import Options from "components/Options"; +const definitions = [ + {term: "Current Smoking", definition: "Current Smoking is defined as someone who has smoked greater than 100 cigarettes (including hand rolled cigarettes, cigars, cigarillos etc) in their lifetime and has smoked in the last 28 days."}, + {term: "Binge Drinking", definition: "Binge drinking is defined as the consumption of five or more alcoholic drinks on one occasion in the past month."}, + {term: "Secondhand Smoke Exposure", definition: "Secondhand smoke is a mixture of the smoke that comes from the burning end of a cigarette, cigar, or pipe, and the smoke breathed out by the smoker. It contains more than 7,000 chemicals. Hundreds of those chemicals are toxic and about 70 can cause cancer."}, + {term: "Monthly Alcohol Consumption", definition: ""} +]; + const formatPercentage = (d, mutiplyBy100 = false) => mutiplyBy100 ? `${formatAbbreviate(d * 100)}%` : `${formatAbbreviate(d)}%`; class RiskyBehaviors extends SectionColumns { @@ -103,6 +111,7 @@ class RiskyBehaviors extends SectionColumns { } +
From ce75bb08e6a23240ba3c0ba32fc992c14311f20c Mon Sep 17 00:00:00 2001 From: Dave Landry Date: Fri, 14 Jun 2019 11:26:55 -0400 Subject: [PATCH 21/26] updates cube2csv script --- package.json | 1 + scripts/cube2csv.js | 140 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 141 insertions(+) create mode 100644 scripts/cube2csv.js diff --git a/package.json b/package.json index b9d47af..147470a 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,7 @@ "main": "src/index.js", "scripts": { "cache": "node scripts/cache.js", + "cube2csv": "node scripts/cube2csv.js", "build": "canon-build", "dev": "canon-dev", "flickr": "node scripts/flickr-scrape.js", diff --git a/scripts/cube2csv.js b/scripts/cube2csv.js new file mode 100644 index 0000000..1e918c8 --- /dev/null +++ b/scripts/cube2csv.js @@ -0,0 +1,140 @@ +#! /usr/bin/env node + +const {Client} = require("mondrian-rest-client"), + PromiseThrottle = require("promise-throttle"), + d3Array = require("d3-array"), + fs = require("fs"); + +const throttle = new PromiseThrottle({ + requestsPerSecond: 50, + promiseImplementation: Promise +}); + +function parse(str) { + return str.replace(/\,/g, "\,").replace(/\"/g, "\'"); +} + +const {CANON_LOGICLAYER_CUBE} = process.env; + +const client = new Client(CANON_LOGICLAYER_CUBE); + +client.cubes() + .then(cubes => { + + const measures = {}; + cubes + // .filter(cube => cube.annotations.topic === "Health") + .forEach(cube => { + cube.measures + .filter(measure => !measure.annotations.rca_measure && !measure.annotations.error_for_measure && !measure.annotations.source_for_measure && !measure.annotations.collection_for_measure) + .forEach(measure => { + const {annotations, name} = measure; + if (!measures[name]) measures[name] = []; + const dimensions = cube.dimensions + .reduce((acc, d) => { + let hierarchies = d.hierarchies + .map(h => { + const levels = h.levels.map(l => { + const parts = l.fullName + .split(".") + .map(p => p.replace(/^\[|\]$/g, "")); + if (parts.length === 2) parts.unshift(parts[0]); + return { + dimension: parts[0], + hierarchy: parts[1], + level: parts[2] + }; + }); + levels.shift(); + return levels; + }); + hierarchies = Array.from(new Set(d3Array.merge(hierarchies))); + acc[d.name] = hierarchies; + return acc; + }, {}); + measures[name].push({ + annotations, + cube_annotations: cube.annotations, + dimensions, + name: cube.name + }); + }); + }); + + const cubeQueries = []; + // const cubeQueries = cubes + // .filter(cube => cube.dimensions.find(d => d.name === "Year")) + // .map(cube => throttle.add(() => client.cube(cube.name) + // .then(c => { + // const query = c.query.drilldown("Year", "Year"); + // return client.query(query, "jsonrecords"); + // }) + // .then(resp => { + // const years = resp.data.data.map(d => d["ID Year"]).sort(); + // return { + // cube: cube.name, + // years + // }; + // }) + // .catch(err => { + // console.log(` 🗓️ Year Cache Error: ${cube.name} (${err.status} - ${err.message})`); + // }))); + + return Promise.all(cubeQueries) + .then(rawYears => { + + let csv = "\"Measure\",\"Hide in Viz Builder\",\"Hide in Map\",\"Description\",\"Cube\",\"Topic\",\"Subtopic\",\"Dataset\",\"Source\",\"Source Description\",\"Years Available\",\"Cuts\""; + // console.log(csv); + + const yearLookup = rawYears.reduce((obj, d) => (obj[d.cube] = d3Array.extent(d.years), obj), {}); + + const filteredMeasures = Object.keys(measures).sort((a, b) => a.localeCompare(b)); + + filteredMeasures.forEach(measure => { + console.log(measure); + + let row = ""; + row += `\"${measure}\"`; + + const cubes = measures[measure]; + const {annotations, cube_annotations: source, name} = cubes[0]; + const {details, hide_in_map, hide_in_ui} = annotations; + const {source_description, source_name, subtopic, topic} = source; + const datasets = cubes + .filter(cube => cube.cube_annotations.dataset_name) + .map(cube => cube.cube_annotations.dataset_name) + .join(", "); + + row += `,\"${hide_in_ui ? hide_in_ui : false}\"`; + row += `,\"${hide_in_map ? hide_in_map : false}\"`; + row += `,\"${details ? parse(details) : ""}\"`; + row += `,\"${name || ""}\"`; + row += `,\"${topic || ""}\"`; + row += `,\"${subtopic || ""}\"`; + row += `,\"${datasets}\"`; + row += `,\"${source_name || ""}\"`; + row += `,\"${source_description ? parse(source_description) : ""}\"`; + row += `,\"${yearLookup[name] ? yearLookup[name].join("-") : ""}\"`; + + const dims = Array.from(new Set(d3Array.merge(cubes.map(cube => Object.keys(cube.dimensions) + .filter(d => d !== "Year") + .map(d => { + const levels = Array.from(new Set(cube.dimensions[d] + .filter(c => !c.level.includes("Parent")) + .map(c => c.level.includes("::") ? c.level.split("::")[1] : c.level))).join(", "); + return levels === d ? d : `${d} (${levels})`; + }))))).join(", "); + + row += `,\"${dims}\"`; + csv += `\n${row}`; + + }); + + fs.writeFile("./scripts/measures.csv", csv, "utf8", err => { + if (err) console.log(err); + else console.log("created scripts/measures.csv"); + }); + + }); + + }); From cde9e6952bbff73f4744f6fe5a8cd68ad0939c30 Mon Sep 17 00:00:00 2001 From: Dave Landry Date: Fri, 14 Jun 2019 11:55:21 -0400 Subject: [PATCH 22/26] updates logiclayer --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index dc3a6b5..7bfe4b3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -333,9 +333,9 @@ } }, "@datawheel/canon-logiclayer": { - "version": "0.3.19", - "resolved": "https://registry.npmjs.org/@datawheel/canon-logiclayer/-/canon-logiclayer-0.3.19.tgz", - "integrity": "sha512-89XmOxr48uR6Q9XH1mDji4vMq7EWcHSyLs885M8kBhzMGYqZtp/3b0Y0QoG+znm8xPKgObCW+klIw8Xz1yeALw==", + "version": "0.3.21", + "resolved": "https://registry.npmjs.org/@datawheel/canon-logiclayer/-/canon-logiclayer-0.3.21.tgz", + "integrity": "sha512-SoD2Z1f2QnxMqSroso6RqT5/soGoRR0DimYm7D73GgSHVo7KpskVMpZanrZJElAqb0ZjmI3wtmCtSbnzSf8CtQ==", "requires": { "d3-array": "^1.2.1", "d3-collection": "^1.0.4", diff --git a/package.json b/package.json index 147470a..e540470 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "@blueprintjs/labs": "^0.14.4", "@blueprintjs/table": "^1.31.3", "@datawheel/canon-core": "^0.16.32", - "@datawheel/canon-logiclayer": "^0.3.19", + "@datawheel/canon-logiclayer": "^0.3.21", "@datawheel/canon-vizbuilder": "^0.2.11", "d3plus-format": "^0.1.4", "flickr-sdk": "^3.8.0", From 5be5b1eb6ffd567d52c7cb3a7e827221505aef56 Mon Sep 17 00:00:00 2001 From: Rashmi Date: Fri, 14 Jun 2019 16:14:31 -0700 Subject: [PATCH 23/26] modifies paragraph text as per feedback for multiple components --- .../education/EducationalAttainment.jsx | 1 + .../foodAccess/StoreAccessByDemographic.jsx | 10 +++++----- .../healthBehaviors/PreventiveCare.jsx | 18 ++++++++++++++++-- .../CancerPrevalenceByDemographics.jsx | 4 ++-- .../OccurrenceByCancerSite.jsx | 2 +- 5 files changed, 25 insertions(+), 10 deletions(-) diff --git a/app/pages/Profile/sections/education/EducationalAttainment.jsx b/app/pages/Profile/sections/education/EducationalAttainment.jsx index 6f3b760..ea63647 100644 --- a/app/pages/Profile/sections/education/EducationalAttainment.jsx +++ b/app/pages/Profile/sections/education/EducationalAttainment.jsx @@ -88,6 +88,7 @@ class EducationalAttainment extends SectionColumns { />

In {topFemaleData.Year}, the most common education level attained in {topFemaleData.Geography} by women was {formatLabels(topFemaleData["Educational Attainment"]).toLowerCase()} ({formatPopulation(topFemaleData.share)}) {} and for men it was {formatLabels(topMaleData["Educational Attainment"]).toLowerCase()} ({formatPopulation(topMaleData.share)}).

+

Attainment is defined as the highest level of education, regardless of whether they are continuing or not.

The following chart shows educational attainment by gender in {topMaleData.Geography}.

diff --git a/app/pages/Profile/sections/foodAccess/StoreAccessByDemographic.jsx b/app/pages/Profile/sections/foodAccess/StoreAccessByDemographic.jsx index 2dd6a7c..70673c9 100644 --- a/app/pages/Profile/sections/foodAccess/StoreAccessByDemographic.jsx +++ b/app/pages/Profile/sections/foodAccess/StoreAccessByDemographic.jsx @@ -15,7 +15,7 @@ import Options from "components/Options"; const formatPercentage = d => `${formatAbbreviate(d)}%`; const formatRaceText = d => { - if (d === "Asian" || d === "Black" || d === "White") return `${d}(s)`; + if (d === "Asian" || d === "Black" || d === "White" || d === "Multiracial") return `${d}s`; else if (d === "American Indian or Alaska Native") return "American Indians or Alaska Natives"; else if (d === "Hawaiian or Pacific Islander") return "Hawaiians or Pacific Islanders"; else return d; @@ -77,15 +77,15 @@ class StoreAccessByDemographic extends SectionColumns { } {/* Show top stats for Age and Race groups based on the drilldown value. */} {/* Write a paragraph for top stats based on the dropdown choice. */} -

In {topFoodAccessData.Year}, {ageSelected ? `between children and seniors, ${topFoodAccessData["Age Group"].toLowerCase()}` : topFoodAccessData["Race Group"].toLowerCase()} were the most at risk {ageSelected ? "age" : "race"} group for low access to food stores ({ageSelected ? `${formatPercentage(topFoodAccessData["Low-Access to Food by Age"])} of all ${topFoodAccessData["Age Group"].toLowerCase()}` : `${formatPercentage(topFoodAccessData["Low-Access to Food by Race"])} of the population`}) in {topFoodAccessData.Geography}.

+

In {topFoodAccessData.Year}, {ageSelected ? `between children and seniors, ${topFoodAccessData["Age Group"].toLowerCase()}` : `${topFoodAccessData["Race Group"] === "Hispanic ethnicity" ? topFoodAccessData["Race Group"].toLowerCase() : topFoodAccessData["Race Group"].toLowerCase()}s`} were the most at risk {ageSelected ? "age" : "race"} group for low access to food stores ({ageSelected ? `${formatPercentage(topFoodAccessData["Low-Access to Food by Age"])} of all ${topFoodAccessData["Age Group"].toLowerCase()}` : `${formatPercentage(topFoodAccessData["Low-Access to Food by Race"])} of the population`}) in {topFoodAccessData.Geography}.

Low access to healthy food is defined as being far from a supermarket, supercenter, or large grocery store.

-

The following map shows the rates for {dropdownValue.split(" ").length === 1 ? formatRaceText(dropdownValue).toLowerCase() : formatRaceText(dropdownValue)} with low access to food stores across all counties in Michigan.

+

The following map shows the rates for {dropdownValue === "Hispanic ethnicity" ? "people of" : ""} {dropdownValue.split(" ").length === 1 ? formatRaceText(dropdownValue).toLowerCase() : formatRaceText(dropdownValue)} with low access to food stores across all counties in Michigan.

@@ -112,7 +112,7 @@ class StoreAccessByDemographic extends SectionColumns { }, yConfig: { barConfig: {stroke: "transparent"}, - ticks: [] + tickFormat: d => ageSelected ? "" : d }, time: "Year", title: d => `${ageSelected ? "Age Group Access" : "Race/Ethnicity Access"} in ${d[0].Geography}`, diff --git a/app/pages/Profile/sections/healthBehaviors/PreventiveCare.jsx b/app/pages/Profile/sections/healthBehaviors/PreventiveCare.jsx index 5364cb7..c9eaf3a 100644 --- a/app/pages/Profile/sections/healthBehaviors/PreventiveCare.jsx +++ b/app/pages/Profile/sections/healthBehaviors/PreventiveCare.jsx @@ -32,6 +32,20 @@ const getArticle = dropdownValue => { return "a"; }; +const corePreventiveText = (share, cesusTract, dropdownValue, topTractPlace) => {share} of older {dropdownValue === "Core Preventive Services for Older Women" ? "women" : "men"} in {}{topTractPlace !== undefined ? `, ${topTractPlace}` : ""} received a set of core preventive services.; + +const formatWomenText = dropdownValue => { + if (dropdownValue === "Pap Smear Test") return "women"; + if (dropdownValue === "Mammography") return "women aged 50–74 years"; + return ""; +}; + +const formatText = dropdownValue => { + if (dropdownValue === "Sleep Less Than 7 Hours") return "reported sleeping less than 7 hours."; + if (dropdownValue === "Cholesterol Screening") return "reported being screened for high cholesterol."; + return ""; +}; + const definitions = [ {term: "Annual Checkup", definition: "Visits to doctor for routine checkup within the past year among adults aged ≥18 years."}, {term: "Core Preventive Services for Older Men", definition: "Older adults aged ≥65 years who are up to date on a core set of clinical preventive services by age and sex (Number of men aged ≥65 years reporting having received all of the following: an influenza vaccination in the past year; a PPV ever; and either a fecal occult blood test (FOBT) within the past year, a sigmoidoscopy within the past 5 years and a FOBT within the past 3 years, or a colonoscopy within the past 10 years)."}, @@ -138,8 +152,8 @@ class PreventiveCare extends SectionColumns { {/* Write short paragraphs explaining Geomap and top stats for the dropdown value selected. */} {isPreventativeCareWeightedValueSelected - ?

In {topDropdownData["End Year"]}, {formatPercentage(topDropdownData[dropdownValue], true)} of the population of the {topDropdownData["Zip Region"]} had {getArticle(dropdownValue)} {formatDropdownNames(dropdownValue).toLowerCase()}, as compared to {formatPercentage(countyLevelData[0][dropdownValue], true)} overall for Wayne County.

- :

In {topDropdownData.Year}, {formatPercentage(topDropdownData[dropdownValue])} of the population of {topTractPlace !== undefined ? `, ${topTractPlace}` : ""} had {getArticle(dropdownValue)} {formatDropdownNames(dropdownValue).toLowerCase()} out of all tracts in Detroit, Livonia, Dearborn and Westland.

+ ?

In {topDropdownData["End Year"]}, {formatPercentage(topDropdownData[dropdownValue], true)} of the {dropdownValue === "Had Flu Vaccine" || dropdownValue === "Had Pneumonia Vaccine" ? "65 and older" : "adult"} population of the {topDropdownData["Zip Region"]} had {dropdownValue === "Sleep Less Than 7 Hours" ? formatText(dropdownValue) : {getArticle(dropdownValue)} {formatDropdownNames(dropdownValue).toLowerCase()}}, as compared to {formatPercentage(countyLevelData[0][dropdownValue], true)} overall for Wayne County.

+ :

In {topDropdownData.Year}, {dropdownValue === "Core Preventive Services for Older Men" || dropdownValue === "Core Preventive Services for Older Women" ? corePreventiveText(formatPercentage(topDropdownData[dropdownValue]), topDropdownData.Tract, dropdownValue, topTractPlace) : {formatPercentage(topDropdownData[dropdownValue])} of {dropdownValue === "Pap Smear Test" || dropdownValue === "Mammography" ? formatWomenText(dropdownValue) : "the adult population"} {dropdownValue === "Colorectal Cancer Screening" ? "aged 50–75 years" : ""} of {topTractPlace !== undefined ? `, ${topTractPlace}` : ""} had {dropdownValue === "Cholesterol Screening" ? formatText(dropdownValue) : {getArticle(dropdownValue)} {formatDropdownNames(dropdownValue).toLowerCase()}.}} This rate is the highest of all census tracts in Detroit, Livonia, Dearborn and Westland.

} {isPreventativeCareWeightedValueSelected ?

The map here shows {formatDropdownNames(dropdownValue).toLowerCase()} rate for zip regions in Wayne County.

diff --git a/app/pages/Profile/sections/healthConditions/CancerPrevalenceByDemographics.jsx b/app/pages/Profile/sections/healthConditions/CancerPrevalenceByDemographics.jsx index 2c3a83e..4cad364 100644 --- a/app/pages/Profile/sections/healthConditions/CancerPrevalenceByDemographics.jsx +++ b/app/pages/Profile/sections/healthConditions/CancerPrevalenceByDemographics.jsx @@ -111,7 +111,7 @@ class CancerPrevalenceByDemographics extends SectionColumns { {/* Added empty

element for some space between the dropdown choice and text*/}

-

In {occuranceByGender[0].Year}, the overall prevalence of cancer in the Detroit-Warren-Dearborn Metro Area was {formatAbbreviate(occuranceByGender[1]["Age-Adjusted Cancer Rate"])} for men and {formatAbbreviate(occuranceByGender[0]["Age-Adjusted Cancer Rate"])} for women, per 100,000 people.

+

In {occuranceByGender[0].Year}, the overall prevalence of newly diagnosed cancer cases in the Detroit-Warren-Dearborn Metro Area was {formatAbbreviate(occuranceByGender[1]["Age-Adjusted Cancer Rate"])} for men and {formatAbbreviate(occuranceByGender[0]["Age-Adjusted Cancer Rate"])} for women, per 100,000 people.

In {topOccuranceByRaceAndEthnicity.Year}, the race/ethnicity group in the Detroit-Warren-Dearborn Metro Area with the highest overall cancer rate was {topOccuranceByRaceAndEthnicity.Ethnicity} {formatRace(topOccuranceByRaceAndEthnicity.Race)} ({formatAbbreviate(topOccuranceByRaceAndEthnicity["Age-Adjusted Cancer Rate"])} per 100,000 people).

The following charts shows the occurrence rate per 100,000 people in Detroit-Warren-Dearborn Metro Area by gender and race/ethnicity for {isItemsListEmpty ? topOccuranceByRaceAndEthnicity["Cancer Site"].toLowerCase() : "the selected cancer site(s)"}.

@@ -162,7 +162,7 @@ class CancerPrevalenceByDemographics extends SectionColumns { .entries(cancerType.values) .forEach(group => { const total = sum(group.values, d => d["Cancer Diagnosis"]); - group.values.forEach(d => d.share = d["Cancer Diagnosis"] / total * 100); + group.values.forEach(d => d.share = total !== 0 ? d["Cancer Diagnosis"] / total * 100 : 0); }); }); return resp.data; diff --git a/app/pages/Profile/sections/healthConditions/OccurrenceByCancerSite.jsx b/app/pages/Profile/sections/healthConditions/OccurrenceByCancerSite.jsx index 07dd379..e5cf6f2 100644 --- a/app/pages/Profile/sections/healthConditions/OccurrenceByCancerSite.jsx +++ b/app/pages/Profile/sections/healthConditions/OccurrenceByCancerSite.jsx @@ -109,7 +109,7 @@ class OccurrenceByCancerSite extends SectionColumns {
-

In {mostRecentYearOccuranceRate.Year}, the cancer rate in the {mostRecentYearOccuranceRate.MSA} was {formatAbbreviate(mostRecentYearOccuranceRate["Age-Adjusted Cancer Rate"])} per 100,000 people. This represents a {growthRate < 0 ? formatPercentage(growthRate * -1) : formatPercentage(growthRate)} {growthRate < 0 ? "decline" : "growth"} from the previous year ({formatAbbreviate(secondMostRecentYearOccuranceRate["Age-Adjusted Cancer Rate"])} per 100,000 people).

+

In {mostRecentYearOccuranceRate.Year}, the prevalence of newly diagnosed cancer cases in the {mostRecentYearOccuranceRate.MSA} was {formatAbbreviate(mostRecentYearOccuranceRate["Age-Adjusted Cancer Rate"])} per 100,000 people. This represents a {growthRate < 0 ? formatPercentage(growthRate * -1) : formatPercentage(growthRate)} {growthRate < 0 ? "decline" : "growth"} from the previous year ({formatAbbreviate(secondMostRecentYearOccuranceRate["Age-Adjusted Cancer Rate"])} per 100,000 people).

The following chart shows the occurrence rate per 100,000 people (and the associated upper and lower 95% confidence intervals) in {mostRecentYearOccuranceRate.MSA} for {isItemsListEmpty ? mostRecentYearOccuranceRate["Cancer Site"].toLowerCase() : "the selected cancer site(s)"}.

From d1102adccc5cd44338228f8c17019cd323b33829 Mon Sep 17 00:00:00 2001 From: Rashmi Date: Fri, 14 Jun 2019 16:16:19 -0700 Subject: [PATCH 24/26] adds definition to glossary and removes Unsheltered data from the lineplot --- app/pages/Profile/sections/specialPopulation/Homeless.jsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/pages/Profile/sections/specialPopulation/Homeless.jsx b/app/pages/Profile/sections/specialPopulation/Homeless.jsx index ca23a0a..308a790 100644 --- a/app/pages/Profile/sections/specialPopulation/Homeless.jsx +++ b/app/pages/Profile/sections/specialPopulation/Homeless.jsx @@ -17,7 +17,8 @@ import Options from "components/Options"; const definitions = [ {term: "Sheltered Homeless", definition: "According to U.S. Department of Housing and Urban Development, a person is considered sheltered homeless when he/she resides in a an emergency shelter or in transitional housing or supportive housing for homeless persons who originally came from the streets or emergency shelters."}, - {term: "Unsheltered Homeless", definition: "According to U.S. Department of Housing and Urban Development, a person is considered unsheltered homeless when he/she resides in a place not meant for human habitation, such as cars, parks, sidewalks, abandoned buildings (on the street)."} + {term: "Unsheltered Homeless", definition: "According to U.S. Department of Housing and Urban Development, a person is considered unsheltered homeless when he/she resides in a place not meant for human habitation, such as cars, parks, sidewalks, abandoned buildings (on the street)."}, + {term: "Children of Parenting Youth", definition: "Persons who are 24 and younger who are the parents or legal guardians of one or more children who are present with or sleeping in the same place as that youth parent, or who are pregnant."} ]; const formatPercentage = d => `${formatAbbreviate(d)}%`; @@ -64,7 +65,9 @@ const formatTypesOfHomeless = typesOfHomeless => { const total = sum(group.values, d => d[d.HomelessType]); group.values.forEach(d => d.share = d[d.HomelessType] / total * 100); }); - return data; + + const shelteredData = data.filter(d => d.HomelessType !== "Unsheltered Homeless Population"); + return shelteredData; }; class Homeless extends SectionColumns { From 22be5efde10bfc6b94dcf4a125fffdc14a882d87 Mon Sep 17 00:00:00 2001 From: Rashmi Date: Fri, 14 Jun 2019 16:17:24 -0700 Subject: [PATCH 25/26] modifies chart title and text --- .../sections/accessToCare/HealthCenterDemographics.jsx | 2 +- app/pages/Profile/sections/economy/Poverty.jsx | 5 +++-- .../Profile/sections/specialPopulation/DisabilityStatus.jsx | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/pages/Profile/sections/accessToCare/HealthCenterDemographics.jsx b/app/pages/Profile/sections/accessToCare/HealthCenterDemographics.jsx index 938a058..e4e333c 100644 --- a/app/pages/Profile/sections/accessToCare/HealthCenterDemographics.jsx +++ b/app/pages/Profile/sections/accessToCare/HealthCenterDemographics.jsx @@ -90,7 +90,7 @@ class HealthCenterDemographics extends SectionColumns { title={"Most common race utilizing health centers"} year={`${topMostRaceData.Year}`} value={formatRaceNames(topMostRaceData.RaceType)} - qualifier={`${formatPercentage(topMostRaceData[topMostRaceData.RaceType])} of the population in Wayne County`} + qualifier={`${formatPercentage(topMostRaceData[topMostRaceData.RaceType])} of the health center visiting population in Wayne County`} /> {isZipLevelDataAvailable ?

In {topZipLevelData.Year}, {formatPercentage(topZipLevelData[topZipLevelData.RaceType])} of the health center visiting population in {`zip ${topZipLevelData.Geography}`} were {lowerCaseRaceName(formatRaceNames(topZipLevelData.RaceType))}, compared to {lowerCaseRaceName(formatRaceNames(topMostRaceData.RaceType))} residents in Wayne County ({formatPercentage(topMostRaceData[topMostRaceData.RaceType])}).

diff --git a/app/pages/Profile/sections/economy/Poverty.jsx b/app/pages/Profile/sections/economy/Poverty.jsx index a627332..791e710 100644 --- a/app/pages/Profile/sections/economy/Poverty.jsx +++ b/app/pages/Profile/sections/economy/Poverty.jsx @@ -39,14 +39,14 @@ const formatPovertyByRaceData = povertyByRace => { }; const formatPovertyByAgeAndGender = povertyByAgeAndGender => { + const belowPovertyLevelByAgeAndGender = povertyByAgeAndGender.filter(d => d["ID Poverty Status"] === 0); nest() .key(d => d.Year) - .entries(povertyByAgeAndGender) + .entries(belowPovertyLevelByAgeAndGender) .forEach(group => { const total = sum(group.values, d => d["Poverty Population"]); group.values.forEach(d => total !== 0 ? d.share = d["Poverty Population"] / total * 100 : d.share = 0); }); - const belowPovertyLevelByAgeAndGender = povertyByAgeAndGender.filter(d => d["ID Poverty Status"] === 0); const topMalePovertyData = belowPovertyLevelByAgeAndGender.filter(d => d.Gender === "Male").sort((a, b) => b.share - a.share)[0]; const topFemalePovertyData = belowPovertyLevelByAgeAndGender.filter(d => d.Gender === "Female").sort((a, b) => b.share - a.share)[0]; return [belowPovertyLevelByAgeAndGender, topMalePovertyData, topFemalePovertyData]; @@ -183,6 +183,7 @@ class Poverty extends SectionColumns { {povertyByAgeAndGenderAvailable ? this.viz2 = comp } config={{ data: `https://acs.datausa.io/api/data?measures=Poverty Population&drilldowns=Poverty Status,Age,Gender&Geography=${meta.id}&Year=all`, + stacked: true, discrete: "x", height: 400, groupBy: "Gender", diff --git a/app/pages/Profile/sections/specialPopulation/DisabilityStatus.jsx b/app/pages/Profile/sections/specialPopulation/DisabilityStatus.jsx index dcef8d6..6a1c351 100644 --- a/app/pages/Profile/sections/specialPopulation/DisabilityStatus.jsx +++ b/app/pages/Profile/sections/specialPopulation/DisabilityStatus.jsx @@ -110,7 +110,7 @@ class DisabilityStatus extends SectionColumns { y: "Age", x: "share", time: "Year", - title: d => `Percentage of Disabled Population Within Each Age Group in ${d[0].Geography}`, + title: d => `Disabled Population by Age and Health Coverage in ${d[0].Geography}`, yConfig: { tickFormat: d => rangeFormatter(d) }, From c741acc7cd0350ee307f694010a783f3a9ba42d4 Mon Sep 17 00:00:00 2001 From: Dave Landry Date: Tue, 18 Jun 2019 15:44:38 -0400 Subject: [PATCH 26/26] updates canon-core and d3plus-format --- package-lock.json | 765 +++++++++++++++++++++++++--------------------- package.json | 4 +- 2 files changed, 418 insertions(+), 351 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7bfe4b3..a13b1ea 100644 --- a/package-lock.json +++ b/package-lock.json @@ -75,9 +75,9 @@ } }, "@babel/runtime": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.4.3.tgz", - "integrity": "sha512-9lsJwJLxDh/T3Q3SZszfWOTkk3pHbkmH+3KY+zwIDmsNlxsumuhS2TH3NIpktU4kNvfzy+k3eLT7aTJSPTo0OA==", + "version": "7.4.5", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.4.5.tgz", + "integrity": "sha512-TuI4qpWZP6lGOGIuGWtp9sPluqYICmbk8T/1vpSysqJxRPkudh/ofFWyqdcMsDf2s7KvDL4/YHgKyvcS3g9CJQ==", "requires": { "regenerator-runtime": "^0.13.2" }, @@ -130,9 +130,9 @@ "integrity": "sha512-5Hlm13BJVAioCHpImtFqNOF2H3ieTOHd0fmFGMxOJ9jgeFqeAwsv3u5P5cR7CSeFrkgHsT19DgFJkHV0/Mcd8g==" }, "globals": { - "version": "11.11.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.11.0.tgz", - "integrity": "sha512-WHq43gS+6ufNOEqlrDBxVEbb8ntfXrfAUU2ZOpCxrBdGKW3gyv8mCxAfIBD0DroPKGrJ2eSsXsLtY9MPntsyTw==" + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==" } } }, @@ -197,9 +197,9 @@ } }, "@datawheel/canon-core": { - "version": "0.16.32", - "resolved": "https://registry.npmjs.org/@datawheel/canon-core/-/canon-core-0.16.32.tgz", - "integrity": "sha512-y8RGqUACc7BXNzQ/0RusXKct49M8okKoNQxEay9N4y7EjD06XwKtPy/rIKfY1GgTUrjHCEMSWL0tcK5hlQncsg==", + "version": "0.16.33", + "resolved": "https://registry.npmjs.org/@datawheel/canon-core/-/canon-core-0.16.33.tgz", + "integrity": "sha512-TooS81bTm16zoAJkLlxTeSG30++IGshlmABMl7syzXdRBXdfi62z4QnHurQUaaktO0dRwnkSHnJ+Lt725SyMlw==", "requires": { "@blueprintjs/core": "1.35.5", "axios": "^0.17.1", @@ -407,9 +407,9 @@ "integrity": "sha512-Xqg/lIZMrUd0VRmSRbCAewtwGZiAk3mEUDvV4op1tGl+LvyPcb/MIOSxTl9z+9+J+R4/vpjiCAT4xeKzH9ji1w==" }, "@types/node": { - "version": "8.10.45", - "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.45.tgz", - "integrity": "sha512-tGVTbA+i3qfXsLbq9rEq/hezaHY55QxQLeXQL2ejNgFAxxrgu8eMmYIOsRcl7hN1uTLVsKOOYacV/rcJM3sfgQ==" + "version": "8.10.49", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.49.tgz", + "integrity": "sha512-YX30JVx0PvSmJ3Eqr74fYLGeBxD+C7vIL20ek+GGGLJeUbVYRUW3EzyAXpIRA0K8c8o0UWqR/GwEFYiFoz1T8w==" }, "@types/tether": { "version": "1.4.4", @@ -422,12 +422,27 @@ "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" }, "accepts": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.5.tgz", - "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=", + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", + "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", "requires": { - "mime-types": "~2.1.18", - "negotiator": "0.6.1" + "mime-types": "~2.1.24", + "negotiator": "0.6.2" + }, + "dependencies": { + "mime-db": { + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz", + "integrity": "sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA==" + }, + "mime-types": { + "version": "2.1.24", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.24.tgz", + "integrity": "sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ==", + "requires": { + "mime-db": "1.40.0" + } + } } }, "acorn": { @@ -741,10 +756,11 @@ } }, "assert": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz", - "integrity": "sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE=", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/assert/-/assert-1.5.0.tgz", + "integrity": "sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA==", "requires": { + "object-assign": "^4.1.1", "util": "0.10.3" }, "dependencies": { @@ -774,9 +790,9 @@ "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=" }, "ast-types": { - "version": "0.12.3", - "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.12.3.tgz", - "integrity": "sha512-wJUcAfrdW+IgDoMGNz5MmcvahKgB7BwIbLupdKVVHxHNYt+HVR2k35swdYNv9aZpF8nvlkjbnkp2rrNwxGckZA==" + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.13.1.tgz", + "integrity": "sha512-b+EeK0WlzrSmpMw5jktWvQGxblpWnvMrV+vOp69RLjzGiHwWV0vgq75DPKtUjppKni3yWwSW8WLGV3Ch/XIWcQ==" }, "async": { "version": "2.6.2", @@ -1659,9 +1675,9 @@ }, "dependencies": { "core-js": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", - "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==" + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.9.tgz", + "integrity": "sha512-HOpZf6eXmnl7la+cUdMnLvUxKNqLUzJvgIziQ0DiF3JwSImNphIqdGqzj6hIKyX04MmV0poclQ7+wjWvxQyR2A==" }, "regenerator-runtime": { "version": "0.10.5", @@ -1807,9 +1823,9 @@ }, "dependencies": { "core-js": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", - "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==" + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.9.tgz", + "integrity": "sha512-HOpZf6eXmnl7la+cUdMnLvUxKNqLUzJvgIziQ0DiF3JwSImNphIqdGqzj6hIKyX04MmV0poclQ7+wjWvxQyR2A==" } } }, @@ -1823,9 +1839,9 @@ }, "dependencies": { "core-js": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", - "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==" + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.9.tgz", + "integrity": "sha512-HOpZf6eXmnl7la+cUdMnLvUxKNqLUzJvgIziQ0DiF3JwSImNphIqdGqzj6hIKyX04MmV0poclQ7+wjWvxQyR2A==" } } }, @@ -2004,9 +2020,9 @@ } }, "bluebird": { - "version": "3.5.4", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.4.tgz", - "integrity": "sha512-FG+nFEZChJrbQ9tIccIfZJBz3J7mLrAhxakAbnrJWn8d7aKOC+LWifa0G+p4ZqKp4y13T7juYvdhq9NzKdsrjw==" + "version": "3.5.5", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.5.tgz", + "integrity": "sha512-5am6HnnfN+urzt4yfg7IgTbotDjIT/u8AJpEt0sIU9FtXfVeezXAPKswrG+xKUCOYAINpSdgZVDU6QFh+cuH3w==" }, "bn.js": { "version": "4.11.8", @@ -2014,20 +2030,20 @@ "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==" }, "body-parser": { - "version": "1.18.3", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.3.tgz", - "integrity": "sha1-WykhmP/dVTs6DyDe0FkrlWlVyLQ=", + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", + "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", "requires": { - "bytes": "3.0.0", + "bytes": "3.1.0", "content-type": "~1.0.4", "debug": "2.6.9", "depd": "~1.1.2", - "http-errors": "~1.6.3", - "iconv-lite": "0.4.23", + "http-errors": "1.7.2", + "iconv-lite": "0.4.24", "on-finished": "~2.3.0", - "qs": "6.5.2", - "raw-body": "2.3.3", - "type-is": "~1.6.16" + "qs": "6.7.0", + "raw-body": "2.4.0", + "type-is": "~1.6.17" }, "dependencies": { "debug": { @@ -2038,18 +2054,15 @@ "ms": "2.0.0" } }, - "iconv-lite": { - "version": "0.4.23", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", - "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "qs": { + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", + "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" } } }, @@ -2261,9 +2274,9 @@ "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=" }, "bytes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", - "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=" + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", + "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==" }, "cache-base": { "version": "1.0.1", @@ -2286,6 +2299,21 @@ "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz", "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=" }, + "caller-callsite": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/caller-callsite/-/caller-callsite-2.0.0.tgz", + "integrity": "sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ=", + "requires": { + "callsites": "^2.0.0" + }, + "dependencies": { + "callsites": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", + "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=" + } + } + }, "caller-path": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz", @@ -2337,14 +2365,14 @@ } }, "caniuse-db": { - "version": "1.0.30000960", - "resolved": "https://registry.npmjs.org/caniuse-db/-/caniuse-db-1.0.30000960.tgz", - "integrity": "sha512-lgvTGHSJcROw38PaUzjAA1M3VA9hBkGsrTfo+Uiq6jSqfQXRSflpcQsM3MbytlFwBhPH6VD0GwLPihJgjqWrew==" + "version": "1.0.30000975", + "resolved": "https://registry.npmjs.org/caniuse-db/-/caniuse-db-1.0.30000975.tgz", + "integrity": "sha512-4Ht47eUW0uaOhuCs7bc7BhWqhP7ix3QCxcY7VLRLmw81AOz8S9A6pjTajxTDakQc+T/zTnUdy4iSmt5brSNxxw==" }, "caniuse-lite": { - "version": "1.0.30000960", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000960.tgz", - "integrity": "sha512-7nK5qs17icQaX6V3/RYrJkOsZyRNnroA4+ZwxaKJzIKy+crIy0Mz5CBlLySd2SNV+4nbUZeqeNfiaEieUBu3aA==" + "version": "1.0.30000975", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000975.tgz", + "integrity": "sha512-ZsXA9YWQX6ATu5MNg+Vx/cMQ+hM6vBBSqDeJs8ruk9z0ky4yIHML15MoxcFt088ST2uyjgqyUGRJButkptWf0w==" }, "canvas-toBlob": { "version": "1.0.0", @@ -2429,9 +2457,9 @@ "integrity": "sha1-04ACdv6l0PJH/8lRvnjIsC+ODXY=" }, "chokidar": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.5.tgz", - "integrity": "sha512-i0TprVWp+Kj4WRPtInjexJ8Q+BqTE909VpH8xVhXrJkoc5QC8VO9TryGOqTr+2hljzc1sC62t22h5tZePodM/A==", + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.6.tgz", + "integrity": "sha512-V2jUo67OKkc6ySiRpJrjlpJKl9kDuG+Xb8VgsGzb+aEouhgS1D0weyPU4lEzdAcsCAvrih2J2BqyXqHWvVLw5g==", "requires": { "anymatch": "^2.0.0", "async-each": "^1.0.1", @@ -2600,9 +2628,9 @@ "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=" }, "cloneable-readable": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/cloneable-readable/-/cloneable-readable-1.1.2.tgz", - "integrity": "sha512-Bq6+4t+lbM8vhTs/Bef5c5AdEMtapp/iFb6+s4/Hh9MVTt8OLKH7ZOOZSCT+Ys7hsHvqv0GuMPJ1lnQJVHvxpg==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/cloneable-readable/-/cloneable-readable-1.1.3.tgz", + "integrity": "sha512-2EF8zTQOxYq70Y4XKtorQupqF0m49MBz2/yf5Bj+MHjvpG3Hy7sImifnqD6UA+TKYxeSV+u6qqQPawN5UvnpKQ==", "requires": { "inherits": "^2.0.1", "process-nextick-args": "^2.0.0", @@ -2720,11 +2748,18 @@ "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=" }, "compressible": { - "version": "2.0.16", - "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.16.tgz", - "integrity": "sha512-JQfEOdnI7dASwCuSPWIeVYwc/zMsu/+tRhoUvEfXz2gxOA2DNjmG5vhtFdBlhWPPGo+RdT9S3tgc/uH5qgDiiA==", + "version": "2.0.17", + "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.17.tgz", + "integrity": "sha512-BGHeLCK1GV7j1bSmQQAi26X+GgWcTjLr/0tzSvMCl3LH1w1IJ4PFSPoV5316b30cneTziC+B1a+3OjoSUcQYmw==", "requires": { - "mime-db": ">= 1.38.0 < 2" + "mime-db": ">= 1.40.0 < 2" + }, + "dependencies": { + "mime-db": { + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz", + "integrity": "sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA==" + } } }, "compression": { @@ -2741,6 +2776,11 @@ "vary": "~1.1.2" }, "dependencies": { + "bytes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=" + }, "debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -2846,9 +2886,12 @@ "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=" }, "content-disposition": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", - "integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ=" + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", + "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", + "requires": { + "safe-buffer": "5.1.2" + } }, "content-security-policy-builder": { "version": "2.0.0", @@ -2948,14 +2991,14 @@ "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, "cosmiconfig": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-4.0.0.tgz", - "integrity": "sha512-6e5vDdrXZD+t5v0L8CrurPeybg4Fmf+FCSYxXKYVAqLUtyCSbuyqE059d0kDthTNRzKVjL7QMgNpEUlsoYH3iQ==", + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz", + "integrity": "sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==", "requires": { + "import-fresh": "^2.0.0", "is-directory": "^0.3.1", - "js-yaml": "^3.9.0", - "parse-json": "^4.0.0", - "require-from-string": "^2.0.1" + "js-yaml": "^3.13.1", + "parse-json": "^4.0.0" } }, "create-ecdh": { @@ -3200,11 +3243,12 @@ } }, "d": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz", - "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", + "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", "requires": { - "es5-ext": "^0.10.9" + "es5-ext": "^0.10.50", + "type": "^1.0.1" } }, "d3-array": { @@ -3484,9 +3528,9 @@ } }, "d3plus-format": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/d3plus-format/-/d3plus-format-0.1.7.tgz", - "integrity": "sha512-Lg2PUdkt0nkX/4WQyyRmLcupg0o5DPvLsfu/V++Yv00SIMRe+1ejiArRHAvcEMr3b6JfEJvsRRqtYlTzmwvLTg==", + "version": "0.1.10", + "resolved": "https://registry.npmjs.org/d3plus-format/-/d3plus-format-0.1.10.tgz", + "integrity": "sha512-e8IPp22coePPFK92GSxmfg0ei6zgYhPzX5hAGj6+bR1W1nDuhbXkJ61Qku6F3XcXmzfUKE9eNrHUoRHU3MU0Lg==", "requires": { "d3-format": "^1.3.0" } @@ -3740,11 +3784,6 @@ "resolved": "https://registry.npmjs.org/deep-diff/-/deep-diff-0.3.8.tgz", "integrity": "sha1-wB3mPvsO7JeYgB1Ax+Da4ltYLIQ=" }, - "deep-equal": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz", - "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=" - }, "deep-extend": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", @@ -4011,14 +4050,14 @@ "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" }, "ejs": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/ejs/-/ejs-2.6.1.tgz", - "integrity": "sha512-0xy4A/twfrRCnkhfk8ErDi5DqdAsAqeGxht4xkCUrsvhhbQNs7E+4jV0CN7+NKIY0aHE72+XvqtBIXzD31ZbXQ==" + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-2.6.2.tgz", + "integrity": "sha512-PcW2a0tyTuPHz3tWyYqtK6r1fZ3gp+3Sop8Ph+ZYN81Ob5rwmbHEzaqs10N3BEsaGTkh/ooniXK+WwszGlc2+Q==" }, "electron-to-chromium": { - "version": "1.3.124", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.124.tgz", - "integrity": "sha512-glecGr/kFdfeXUHOHAWvGcXrxNU+1wSO/t5B23tT1dtlvYB26GY8aHzZSWD7HqhqC800Lr+w/hQul6C5AF542w==" + "version": "1.3.164", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.164.tgz", + "integrity": "sha512-VLlalqUeduN4+fayVtRZvGP2Hl1WrRxlwzh2XVVMJym3IFrQUS29BFQ1GP/BxOJXJI1OFCrJ5BnFEsAe8NHtOg==" }, "elliptic": { "version": "6.4.1", @@ -4156,9 +4195,9 @@ } }, "es5-ext": { - "version": "0.10.49", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.49.tgz", - "integrity": "sha512-3NMEhi57E31qdzmYp2jwRArIUsj1HI/RxbQ4bgnSB+AIKIxsAmTiK83bYMifIcpWvEc3P1X30DhUKOqEtF/kvg==", + "version": "0.10.50", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.50.tgz", + "integrity": "sha512-KMzZTPBkeQV/JcSQhI5/z6d9VWJ3EnQ194USTUwIYZ2ZbpN8+SGXQKt1h68EX44+qt+Fzr8DO17vnxrw7c3agw==", "requires": { "es6-iterator": "~2.0.3", "es6-symbol": "~3.1.1", @@ -4189,9 +4228,9 @@ } }, "es6-promise": { - "version": "4.2.6", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.6.tgz", - "integrity": "sha512-aRVgGdnmW2OiySVPUC9e6m+plolMAJKjZnQlCwNSuK5yQ0JN61DZSO1X1Ufd1foqWRAlig0rhduTCHe7sVtK5Q==" + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", + "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==" }, "es6-promisify": { "version": "5.0.0", @@ -4228,13 +4267,13 @@ } }, "es6-weak-map": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.2.tgz", - "integrity": "sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8=", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz", + "integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==", "requires": { "d": "1", - "es5-ext": "^0.10.14", - "es6-iterator": "^2.0.1", + "es5-ext": "^0.10.46", + "es6-iterator": "^2.0.3", "es6-symbol": "^3.1.1" } }, @@ -4335,9 +4374,9 @@ "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" }, "globals": { - "version": "11.11.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.11.0.tgz", - "integrity": "sha512-WHq43gS+6ufNOEqlrDBxVEbb8ntfXrfAUU2ZOpCxrBdGKW3gyv8mCxAfIBD0DroPKGrJ2eSsXsLtY9MPntsyTw==" + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==" }, "strip-ansi": { "version": "4.0.0", @@ -4350,17 +4389,17 @@ } }, "eslint-plugin-react": { - "version": "7.12.4", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.12.4.tgz", - "integrity": "sha512-1puHJkXJY+oS1t467MjbqjvX53uQ05HXwjqDgdbGBqf5j9eeydI54G3KwiJmWciQ0HTBacIKw2jgwSBSH3yfgQ==", + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.13.0.tgz", + "integrity": "sha512-uA5LrHylu8lW/eAH3bEQe9YdzpPaFd9yAJTwTi/i/BKTD7j6aQMKVAdGM/ML72zD6womuSK7EiGtMKuK06lWjQ==", "requires": { "array-includes": "^3.0.3", "doctrine": "^2.1.0", "has": "^1.0.3", - "jsx-ast-utils": "^2.0.1", + "jsx-ast-utils": "^2.1.0", "object.fromentries": "^2.0.0", - "prop-types": "^15.6.2", - "resolve": "^1.9.0" + "prop-types": "^15.7.2", + "resolve": "^1.10.1" } }, "eslint-scope": { @@ -4520,47 +4559,52 @@ "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==" }, "expect-ct": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/expect-ct/-/expect-ct-0.1.1.tgz", - "integrity": "sha512-ngXzTfoRGG7fYens3/RMb6yYoVLvLMfmsSllP/mZPxNHgFq41TmPSLF/nLY7fwoclI2vElvAmILFWGUYqdjfCg==" + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/expect-ct/-/expect-ct-0.2.0.tgz", + "integrity": "sha512-6SK3MG/Bbhm8MsgyJAylg+ucIOU71/FzyFalcfu5nY19dH8y/z0tBJU0wrNBXD4B27EoQtqPF/9wqH0iYAd04g==" }, "express": { - "version": "4.16.4", - "resolved": "https://registry.npmjs.org/express/-/express-4.16.4.tgz", - "integrity": "sha512-j12Uuyb4FMrd/qQAm6uCHAkPtO8FDTRJZBDd5D2KOL2eLaz1yUNdUB/NOIyq0iU4q4cFarsUCrnFDPBcnksuOg==", + "version": "4.17.1", + "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", + "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==", "requires": { - "accepts": "~1.3.5", + "accepts": "~1.3.7", "array-flatten": "1.1.1", - "body-parser": "1.18.3", - "content-disposition": "0.5.2", + "body-parser": "1.19.0", + "content-disposition": "0.5.3", "content-type": "~1.0.4", - "cookie": "0.3.1", + "cookie": "0.4.0", "cookie-signature": "1.0.6", "debug": "2.6.9", "depd": "~1.1.2", "encodeurl": "~1.0.2", "escape-html": "~1.0.3", "etag": "~1.8.1", - "finalhandler": "1.1.1", + "finalhandler": "~1.1.2", "fresh": "0.5.2", "merge-descriptors": "1.0.1", "methods": "~1.1.2", "on-finished": "~2.3.0", - "parseurl": "~1.3.2", + "parseurl": "~1.3.3", "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.4", - "qs": "6.5.2", - "range-parser": "~1.2.0", + "proxy-addr": "~2.0.5", + "qs": "6.7.0", + "range-parser": "~1.2.1", "safe-buffer": "5.1.2", - "send": "0.16.2", - "serve-static": "1.13.2", - "setprototypeof": "1.1.0", - "statuses": "~1.4.0", - "type-is": "~1.6.16", + "send": "0.17.1", + "serve-static": "1.14.1", + "setprototypeof": "1.1.1", + "statuses": "~1.5.0", + "type-is": "~1.6.18", "utils-merge": "1.0.1", "vary": "~1.1.2" }, "dependencies": { + "cookie": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", + "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==" + }, "debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -4574,10 +4618,10 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" }, - "statuses": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", - "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==" + "qs": { + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", + "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" } } }, @@ -4696,9 +4740,9 @@ "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=" }, "fast-glob": { - "version": "2.2.6", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.6.tgz", - "integrity": "sha512-0BvMaZc1k9F+MeWWMe8pL6YltFzZYcJsYU7D4JyDA6PAczaXvxqQQ/z+mDF7/4Mw01DeUc+i3CTKajnkANkV4w==", + "version": "2.2.7", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.7.tgz", + "integrity": "sha512-g1KuQwHOZAmOZMuBtHdxDtju+T2RT8jgCC9aANsbpdiDDTSnjgfuVsIBNKbUeJI3oKMRExcfNDtJl4OhbffMsw==", "requires": { "@mrmlnc/readdir-enhanced": "^2.2.1", "@nodelib/fs.stat": "^1.1.2", @@ -4763,9 +4807,9 @@ } }, "feature-policy": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/feature-policy/-/feature-policy-0.2.0.tgz", - "integrity": "sha512-2hGrlv6efG4hscYVZeaYjpzpT6I2OZgYqE2yDUzeAcKj2D1SH0AsEzqJNXzdoglEddcIXQQYop3lD97XpG75Jw==" + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/feature-policy/-/feature-policy-0.3.0.tgz", + "integrity": "sha512-ZtijOTFN7TzCujt1fnNhfWPFPSHeZkesff9AXZj+UEjYBynWNUIYpC87Ve4wHzyexQsImicLu7WsC2LHq7/xrQ==" }, "figures": { "version": "2.0.0", @@ -4867,16 +4911,16 @@ } }, "finalhandler": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz", - "integrity": "sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", + "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", "requires": { "debug": "2.6.9", "encodeurl": "~1.0.2", "escape-html": "~1.0.3", "on-finished": "~2.3.0", - "parseurl": "~1.3.2", - "statuses": "~1.4.0", + "parseurl": "~1.3.3", + "statuses": "~1.5.0", "unpipe": "~1.0.0" }, "dependencies": { @@ -4892,11 +4936,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - }, - "statuses": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", - "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==" } } }, @@ -5012,9 +5051,9 @@ } }, "frameguard": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/frameguard/-/frameguard-3.0.0.tgz", - "integrity": "sha1-e8rUae57lukdEs6zlZx4I1qScuk=" + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/frameguard/-/frameguard-3.1.0.tgz", + "integrity": "sha512-TxgSKM+7LTA6sidjOiSZK9wxY0ffMPY3Wta//MqwmX0nZuEHc8QrkV8Fh3ZhMJeiH+Uyh/tcaarImRy8u77O7g==" }, "fresh": { "version": "0.5.2", @@ -5054,9 +5093,9 @@ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, "fsevents": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.8.tgz", - "integrity": "sha512-tPvHgPGB7m40CZ68xqFGkKuzN+RnpGmSV+hgeKxhRpbxdqKXUFJGC3yonBOLzQBcJyGpdZFDfCsdOC2KFsXzeA==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.9.tgz", + "integrity": "sha512-oeyj2H3EjjonWcFjD5NvZNE9Rqe4UW+nQBU2HNeKw0koVLEFIhtyETyAakeAM3de7Z/SW5kcA+fZUait9EApnw==", "optional": true, "requires": { "nan": "^2.12.1", @@ -5653,9 +5692,9 @@ } }, "readable-stream": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.3.0.tgz", - "integrity": "sha512-EsI+s3k3XsW+fU8fQACLN59ky34AZ14LoeVZpYwmZvldCFo0r0gnelwF2TcMjLor/BTL5aDJVBMkss0dthToPw==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.4.0.tgz", + "integrity": "sha512-jItXPLmrSR8jmTRmRWJXCnGJsfy85mB3Wd/uINMXA65yrnFo0cPClFIUWzo2najVNSl+mx7/4W8ttlLWJe99pQ==", "requires": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -5718,9 +5757,9 @@ "integrity": "sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4=" }, "glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", + "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -5777,12 +5816,12 @@ "integrity": "sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs=" }, "global": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/global/-/global-4.3.2.tgz", - "integrity": "sha1-52mJJopsdMOJCLEwWxD8DjlOnQ8=", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/global/-/global-4.4.0.tgz", + "integrity": "sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w==", "requires": { "min-document": "^2.19.0", - "process": "~0.5.1" + "process": "^0.11.10" } }, "global-dirs": { @@ -6068,24 +6107,24 @@ "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=" }, "helmet": { - "version": "3.16.0", - "resolved": "https://registry.npmjs.org/helmet/-/helmet-3.16.0.tgz", - "integrity": "sha512-rsTKRogc5OYGlvSHuq5QsmOsOzF6uDoMqpfh+Np8r23+QxDq+SUx90Rf8HyIKQVl7H6NswZEwfcykinbAeZ6UQ==", + "version": "3.18.0", + "resolved": "https://registry.npmjs.org/helmet/-/helmet-3.18.0.tgz", + "integrity": "sha512-TsKlGE5UVkV0NiQ4PllV9EVfZklPjyzcMEMjWlyI/8S6epqgRT+4s4GHVgc25x0TixsKvp3L7c91HQQt5l0+QA==", "requires": { "depd": "2.0.0", "dns-prefetch-control": "0.1.0", "dont-sniff-mimetype": "1.0.0", - "expect-ct": "0.1.1", - "feature-policy": "0.2.0", - "frameguard": "3.0.0", + "expect-ct": "0.2.0", + "feature-policy": "0.3.0", + "frameguard": "3.1.0", "helmet-crossdomain": "0.3.0", "helmet-csp": "2.7.1", "hide-powered-by": "1.0.0", "hpkp": "2.0.0", "hsts": "2.2.0", "ienoopen": "1.1.0", - "nocache": "2.0.0", - "referrer-policy": "1.1.0", + "nocache": "2.1.0", + "referrer-policy": "1.2.0", "x-xss-protection": "1.1.0" }, "dependencies": { @@ -6201,14 +6240,15 @@ "integrity": "sha1-goLGKsX9eBaPVwK15IdxV8qT854=" }, "http-errors": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", - "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", + "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", "requires": { "depd": "~1.1.2", "inherits": "2.0.3", - "setprototypeof": "1.1.0", - "statuses": ">= 1.4.0 < 2" + "setprototypeof": "1.1.1", + "statuses": ">= 1.5.0 < 2", + "toidentifier": "1.0.0" } }, "http-proxy-agent": { @@ -6316,11 +6356,12 @@ } }, "i18next-scanner": { - "version": "2.10.1", - "resolved": "https://registry.npmjs.org/i18next-scanner/-/i18next-scanner-2.10.1.tgz", - "integrity": "sha512-PnlbMfYiq8yoeUmyj1NAd0BjNuif14y3Olrw3/qyTZin/M3GMRxWD0T0E4GBUQd6Ws0kJntNwFt0hofjc0O2qg==", + "version": "2.10.2", + "resolved": "https://registry.npmjs.org/i18next-scanner/-/i18next-scanner-2.10.2.tgz", + "integrity": "sha512-nwmIoyGzxYdr+weD1WgEwOLL+Jc/sihpt0c3a8upq53Z+9Qis/mIhZeenowf0f3AGcwgqhp6zXQ5Ca+74zDPug==", "requires": { "acorn": "^6.1.1", + "acorn-dynamic-import": "^4.0.0", "acorn-jsx": "^5.0.1", "acorn-stage3": "^2.0.0", "acorn-walk": "^6.1.1", @@ -6437,6 +6478,30 @@ "import-from": "^2.1.0" } }, + "import-fresh": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz", + "integrity": "sha1-2BNVwVYS04bGH53dOSLUMEgipUY=", + "requires": { + "caller-path": "^2.0.0", + "resolve-from": "^3.0.0" + }, + "dependencies": { + "caller-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-2.0.0.tgz", + "integrity": "sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ=", + "requires": { + "caller-callsite": "^2.0.0" + } + }, + "resolve-from": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", + "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=" + } + } + }, "import-from": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/import-from/-/import-from-2.1.0.tgz", @@ -6472,11 +6537,6 @@ "resolved": "https://registry.npmjs.org/indexes-of/-/indexes-of-1.0.1.tgz", "integrity": "sha1-8w9xbI4r00bHtn0985FVZqfAVgc=" }, - "indexof": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", - "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=" - }, "inflection": { "version": "1.12.0", "resolved": "https://registry.npmjs.org/inflection/-/inflection-1.12.0.tgz", @@ -6963,14 +7023,14 @@ "integrity": "sha512-M7kLczedRMYX4L8Mdh4MzyAMM9O5osx+4FcOQuTvr3A9F2D9S5JXheN0ewNbrvK2UatkTRhL5ejGmGSjNMiZuw==" }, "js-beautify": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/js-beautify/-/js-beautify-1.9.1.tgz", - "integrity": "sha512-oxxvVZdOdUfzk8IOLBF2XUZvl2GoBEfA+b0of4u2EBY/46NlXasi8JdFvazA5lCrf9/lQhTjyVy2QCUW7iq0MQ==", + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/js-beautify/-/js-beautify-1.10.0.tgz", + "integrity": "sha512-OMwf/tPDpE/BLlYKqZOhqWsd3/z2N3KOlyn1wsCRGFwViE8LOQTcDtathQvHvZc+q+zWmcNAbwKSC+iJoMaH2Q==", "requires": { "config-chain": "^1.1.12", - "editorconfig": "^0.15.2", + "editorconfig": "^0.15.3", "glob": "^7.1.3", - "mkdirp": "~0.5.0", + "mkdirp": "~0.5.1", "nopt": "~4.0.1" }, "dependencies": { @@ -7068,9 +7128,9 @@ } }, "jsx-ast-utils": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-2.0.1.tgz", - "integrity": "sha1-6AGxs5mF4g//yHtA43SAgOLcrH8=", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-2.1.0.tgz", + "integrity": "sha512-yDGDG2DS4JcqhA6blsuYbtsT09xL8AoLuUR2Gb5exrw7UEM19sBcOTq+YBBhrNbl0PUC4R4LnFu+dHg2HKeVvA==", "requires": { "array-includes": "^3.0.3" } @@ -7839,14 +7899,14 @@ "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=" }, "negotiator": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", - "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=" + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", + "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" }, "neo-async": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.0.tgz", - "integrity": "sha512-MFh0d/Wa7vkKO3Y3LlacqAEeHK0mckVqzDieUKTT+KGxi+zIpeVsFxymkIiRpbpDziHc290Xr9A1O4Om7otoRA==" + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz", + "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==" }, "netmask": { "version": "1.0.6", @@ -7864,9 +7924,9 @@ "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=" }, "nocache": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/nocache/-/nocache-2.0.0.tgz", - "integrity": "sha1-ICtIAhoMTL3i34DeFaF0Q8i0OYA=" + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/nocache/-/nocache-2.1.0.tgz", + "integrity": "sha512-0L9FvHG3nfnnmaEQPjT9xhfN4ISk0A8/2j4M37Np4mcDesJjHgEUfgPhdCyZuFI954tjokaIj/A3NdpFNdEh4Q==" }, "node-abi": { "version": "2.7.1", @@ -7891,9 +7951,9 @@ "integrity": "sha512-sol30LUpz1jQFBjOKwbjxijiE3b6pjd74YwfD0fJOKPjF+fONKb2Yg8rYgS6+bK6VDl+/wfr4IYpC7jDzLUIfw==" }, "node-libs-browser": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.2.0.tgz", - "integrity": "sha512-5MQunG/oyOaBdttrL40dA7bUfPORLRWMUJLQtMg7nluxUvk5XwnLdL9twQHFAjRx/y7mIMkLKT9++qPbbk6BZA==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.2.1.tgz", + "integrity": "sha512-h/zcD8H9kaDZ9ALUWwlBUDo6TKF8a7qBSCSEGfjTVIYeqsioSKaAX+BN7NgiMGp6iSIXZ3PxgCu8KS3b71YK5Q==", "requires": { "assert": "^1.1.1", "browserify-zlib": "^0.2.0", @@ -7905,7 +7965,7 @@ "events": "^3.0.0", "https-browserify": "^1.0.0", "os-browserify": "^0.3.0", - "path-browserify": "0.0.0", + "path-browserify": "0.0.1", "process": "^0.11.10", "punycode": "^1.2.4", "querystring-es3": "^0.2.0", @@ -7917,14 +7977,7 @@ "tty-browserify": "0.0.0", "url": "^0.11.0", "util": "^0.11.0", - "vm-browserify": "0.0.4" - }, - "dependencies": { - "process": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=" - } + "vm-browserify": "^1.0.1" } }, "node-object-hash": { @@ -7946,9 +7999,9 @@ } }, "nodemon": { - "version": "1.18.11", - "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-1.18.11.tgz", - "integrity": "sha512-KdN3tm1zkarlqNo4+W9raU3ihM4H15MVMSE/f9rYDZmFgDHAfAJsomYrHhApAkuUemYjFyEeXlpCOQ2v5gtBEw==", + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-1.19.1.tgz", + "integrity": "sha512-/DXLzd/GhiaDXXbGId5BzxP1GlsqtMGM9zTmkWrgXtSqjKmGSbLicM/oAy4FR0YWm14jCHRwnR31AHS2dYFHrg==", "requires": { "chokidar": "^2.1.5", "debug": "^3.1.0", @@ -8333,9 +8386,9 @@ }, "dependencies": { "agent-base": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.2.1.tgz", - "integrity": "sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.3.0.tgz", + "integrity": "sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg==", "requires": { "es6-promisify": "^5.0.0" } @@ -8549,9 +8602,9 @@ } }, "path-browserify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz", - "integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=" + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.1.tgz", + "integrity": "sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ==" }, "path-dirname": { "version": "1.0.2", @@ -9398,9 +9451,9 @@ }, "dependencies": { "postcss": { - "version": "7.0.14", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.14.tgz", - "integrity": "sha512-NsbD6XUUMZvBxtQAJuWDJeeC4QFsmWsfozWxCJPWf3M55K9iu2iMDaKqyoOdTJ1R4usBXuxlVFAIo8rZPQD4Bg==", + "version": "7.0.17", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.17.tgz", + "integrity": "sha512-546ZowA+KZ3OasvQZHsbuEpysvwTZNGJv9EfyCQdsIDltPSWHAeTQ5fQy/Npi2ZDtLI3zs7Ps/p6wThErhm9fQ==", "requires": { "chalk": "^2.4.2", "source-map": "^0.6.1", @@ -9634,9 +9687,9 @@ }, "dependencies": { "postcss": { - "version": "7.0.14", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.14.tgz", - "integrity": "sha512-NsbD6XUUMZvBxtQAJuWDJeeC4QFsmWsfozWxCJPWf3M55K9iu2iMDaKqyoOdTJ1R4usBXuxlVFAIo8rZPQD4Bg==", + "version": "7.0.17", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.17.tgz", + "integrity": "sha512-546ZowA+KZ3OasvQZHsbuEpysvwTZNGJv9EfyCQdsIDltPSWHAeTQ5fQy/Npi2ZDtLI3zs7Ps/p6wThErhm9fQ==", "requires": { "chalk": "^2.4.2", "source-map": "^0.6.1", @@ -9857,9 +9910,9 @@ }, "dependencies": { "postcss": { - "version": "7.0.14", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.14.tgz", - "integrity": "sha512-NsbD6XUUMZvBxtQAJuWDJeeC4QFsmWsfozWxCJPWf3M55K9iu2iMDaKqyoOdTJ1R4usBXuxlVFAIo8rZPQD4Bg==", + "version": "7.0.17", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.17.tgz", + "integrity": "sha512-546ZowA+KZ3OasvQZHsbuEpysvwTZNGJv9EfyCQdsIDltPSWHAeTQ5fQy/Npi2ZDtLI3zs7Ps/p6wThErhm9fQ==", "requires": { "chalk": "^2.4.2", "source-map": "^0.6.1", @@ -9882,11 +9935,11 @@ } }, "postcss-load-config": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-2.0.0.tgz", - "integrity": "sha512-V5JBLzw406BB8UIfsAWSK2KSwIJ5yoEIVFb4gVkXci0QdKgA24jLmHZ/ghe/GgX0lJ0/D1uUK1ejhzEY94MChQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-2.1.0.tgz", + "integrity": "sha512-4pV3JJVPLd5+RueiVVB+gFOAa7GWc25XQcMp86Zexzke69mKf6Nx9LRcQywdz7yZI9n1udOxmLuAwTBypypF8Q==", "requires": { - "cosmiconfig": "^4.0.0", + "cosmiconfig": "^5.0.0", "import-cwd": "^2.0.0" } }, @@ -10134,9 +10187,9 @@ }, "dependencies": { "postcss": { - "version": "7.0.14", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.14.tgz", - "integrity": "sha512-NsbD6XUUMZvBxtQAJuWDJeeC4QFsmWsfozWxCJPWf3M55K9iu2iMDaKqyoOdTJ1R4usBXuxlVFAIo8rZPQD4Bg==", + "version": "7.0.17", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.17.tgz", + "integrity": "sha512-546ZowA+KZ3OasvQZHsbuEpysvwTZNGJv9EfyCQdsIDltPSWHAeTQ5fQy/Npi2ZDtLI3zs7Ps/p6wThErhm9fQ==", "requires": { "chalk": "^2.4.2", "source-map": "^0.6.1", @@ -10791,9 +10844,9 @@ "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==" }, "process": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/process/-/process-0.5.2.tgz", - "integrity": "sha1-FjjYqONML0QKkduVq5rrZ3/Bhc8=" + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=" }, "process-nextick-args": { "version": "2.0.0", @@ -10901,9 +10954,9 @@ "integrity": "sha512-/6pt4+C+T+wZUieKR620OpzN/LlnNKuWjy1iFLQ/UG35JqHlR/89MP1d96dUfkf6Dne3TuLQzOYEYshJ+Hx8mw==" }, "pstree.remy": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.6.tgz", - "integrity": "sha512-NdF35+QsqD7EgNEI5mkI/X+UwaxVEbQaz9f4IooEmMUv6ZPmlTQYGjBPJGgrlzNdjSvIy4MWMg6Q6vCgBO2K+w==" + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.7.tgz", + "integrity": "sha512-xsMgrUwRpuGskEzBFkH8NmTimbZ5PcPup0LA8JJkHIm2IMUbQcpo3yeLNWVrufEYjh8YwtSVh0xz6UeWc5Oh5A==" }, "public-encrypt": { "version": "4.0.3", @@ -10997,29 +11050,19 @@ } }, "range-parser": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", - "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=" + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" }, "raw-body": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.3.tgz", - "integrity": "sha512-9esiElv1BrZoI3rCDuOuKCBRbuApGGaDPQfjSflGxdy4oyzqghxu6klEkkVIvBje+FF0BX9coEv8KqW6X/7njw==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", + "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", "requires": { - "bytes": "3.0.0", - "http-errors": "1.6.3", - "iconv-lite": "0.4.23", + "bytes": "3.1.0", + "http-errors": "1.7.2", + "iconv-lite": "0.4.24", "unpipe": "1.0.0" - }, - "dependencies": { - "iconv-lite": { - "version": "0.4.23", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", - "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - } } }, "rc": { @@ -11076,14 +11119,19 @@ "prop-types": "^15.5.10" } }, + "react-fast-compare": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/react-fast-compare/-/react-fast-compare-2.0.4.tgz", + "integrity": "sha512-suNP+J1VU1MWFKcyt7RtjiSWUjvidmQSlqu+eHslq+342xCbGTYmC0mEhPCOHxlW0CywylOC1u2DFAT+bv4dBw==" + }, "react-helmet": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/react-helmet/-/react-helmet-5.2.0.tgz", - "integrity": "sha1-qBgR3yExOm1VxfBYxK66XW89l6c=", + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/react-helmet/-/react-helmet-5.2.1.tgz", + "integrity": "sha512-CnwD822LU8NDBnjCpZ4ySh8L6HYyngViTZLfBBb3NjtrpN8m49clH8hidHouq20I51Y6TpCTISCBbqiY5GamwA==", "requires": { - "deep-equal": "^1.0.1", "object-assign": "^4.1.1", "prop-types": "^15.5.4", + "react-fast-compare": "^2.0.2", "react-side-effect": "^1.1.0" } }, @@ -11169,9 +11217,9 @@ "integrity": "sha1-InQDWWtRUeGCN32rg1tdRfD4BU4=" }, "react-scroll": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/react-scroll/-/react-scroll-1.7.11.tgz", - "integrity": "sha512-MCWtt8KWTBzBlo9oFE7xgAhGcgbslsfQAuGZAfYlBTt3Pxi2CX+kh8OoTUVAuOwNlt9XkoWcvDTWQwtHzm2uOg==", + "version": "1.7.12", + "resolved": "https://registry.npmjs.org/react-scroll/-/react-scroll-1.7.12.tgz", + "integrity": "sha512-hvi3MixtYQC1FADODqWx6MSYaShBbsq7ElQBny/pmzrGtF4ubGLuDOGpzP3mvJjWZ66Cepujt4PBjysYV3itwg==", "requires": { "lodash.throttle": "^4.1.1", "prop-types": "^15.5.8" @@ -11255,7 +11303,7 @@ }, "pify": { "version": "2.3.0", - "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" } } @@ -11386,9 +11434,9 @@ "integrity": "sha512-km6dclyFnmcvxhAcrQV2AkZmPQjzPDjgVlQtR0EQjxZPyJ0BnMf3in1ryuR8A2qU0HldVRfxYXbFSKlI3N7Slw==" }, "referrer-policy": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/referrer-policy/-/referrer-policy-1.1.0.tgz", - "integrity": "sha1-NXdOtzW/UPtsB46DM0tHI1AgfXk=" + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/referrer-policy/-/referrer-policy-1.2.0.tgz", + "integrity": "sha512-LgQJIuS6nAy1Jd88DCQRemyE3mS+ispwlqMk3b0yjZ257fI1v9c+/p6SD5gP5FGyXUIgrNOAfmyioHwZtYv2VA==" }, "regenerate": { "version": "1.4.0", @@ -11562,11 +11610,6 @@ "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" }, - "require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==" - }, "require-in-the-middle": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-2.2.2.tgz", @@ -11591,9 +11634,9 @@ } }, "resolve": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.0.tgz", - "integrity": "sha512-3sUr9aq5OfSg2S9pNtPA9hL1FVEAjvfOC4leW0SNf/mpnaakz2a9femSd6LqAww2RaFctwyf1lCqnTHuF1rxDg==", + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.0.tgz", + "integrity": "sha512-WL2pBDjqT6pGUNSUzMw00o4T7If+z4H2x3Gz893WoUQ5KW8Vr9txp00ykiP16VBaZF5+j/OcXJHZ9+PCvdiDKw==", "requires": { "path-parse": "^1.0.6" } @@ -11765,9 +11808,9 @@ } }, "send": { - "version": "0.16.2", - "resolved": "https://registry.npmjs.org/send/-/send-0.16.2.tgz", - "integrity": "sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw==", + "version": "0.17.1", + "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", + "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", "requires": { "debug": "2.6.9", "depd": "~1.1.2", @@ -11776,12 +11819,12 @@ "escape-html": "~1.0.3", "etag": "~1.8.1", "fresh": "0.5.2", - "http-errors": "~1.6.2", - "mime": "1.4.1", - "ms": "2.0.0", + "http-errors": "~1.7.2", + "mime": "1.6.0", + "ms": "2.1.1", "on-finished": "~2.3.0", - "range-parser": "~1.2.0", - "statuses": "~1.4.0" + "range-parser": "~1.2.1", + "statuses": "~1.5.0" }, "dependencies": { "debug": { @@ -11790,24 +11833,26 @@ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "requires": { "ms": "2.0.0" + }, + "dependencies": { + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + } } }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - }, - "statuses": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", - "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==" + "mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" } } }, "sequelize": { - "version": "4.43.2", - "resolved": "https://registry.npmjs.org/sequelize/-/sequelize-4.43.2.tgz", - "integrity": "sha512-EA3V1AsxVjf2EtGbdEoa9Fe5rSAqy5g4OsX0VwtU6iMezTjIYTCXV8o6mG7i6u3lu4Zc7JWZ6XwhS0k79pT/EQ==", + "version": "4.44.0", + "resolved": "https://registry.npmjs.org/sequelize/-/sequelize-4.44.0.tgz", + "integrity": "sha512-2XhS+koWZT9odyPVmq1xKiWMOIAYGgpUSlUJ6EbWjJCjXbkTKKfde0w5axJQcDjbPYCBvX5UOgID7xmPHL2xTw==", "requires": { "bluebird": "^3.5.0", "cls-bluebird": "^2.1.0", @@ -11841,14 +11886,14 @@ "integrity": "sha512-ke8UG8ulpFOxO8f8gRYabHQe/ZntKlcig2Mp+8+URDP1D8vJZ0KUt7LYo07q25Z/+JVSgpr/cui9PIp5H6/+nA==" }, "serve-static": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.2.tgz", - "integrity": "sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", + "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==", "requires": { "encodeurl": "~1.0.2", "escape-html": "~1.0.3", - "parseurl": "~1.3.2", - "send": "0.16.2" + "parseurl": "~1.3.3", + "send": "0.17.1" } }, "set-blocking": { @@ -11888,9 +11933,9 @@ "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" }, "setprototypeof": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", - "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==" + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", + "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" }, "sha.js": { "version": "2.4.11", @@ -12477,9 +12522,9 @@ }, "dependencies": { "postcss": { - "version": "7.0.14", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.14.tgz", - "integrity": "sha512-NsbD6XUUMZvBxtQAJuWDJeeC4QFsmWsfozWxCJPWf3M55K9iu2iMDaKqyoOdTJ1R4usBXuxlVFAIo8rZPQD4Bg==", + "version": "7.0.17", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.17.tgz", + "integrity": "sha512-546ZowA+KZ3OasvQZHsbuEpysvwTZNGJv9EfyCQdsIDltPSWHAeTQ5fQy/Npi2ZDtLI3zs7Ps/p6wThErhm9fQ==", "requires": { "chalk": "^2.4.2", "source-map": "^0.6.1", @@ -12802,6 +12847,11 @@ "through2": "^2.0.3" } }, + "toidentifier": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", + "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==" + }, "topojson-client": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/topojson-client/-/topojson-client-3.0.0.tgz", @@ -12880,6 +12930,11 @@ "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" }, + "type": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/type/-/type-1.0.1.tgz", + "integrity": "sha512-MAM5dBMJCJNKs9E7JXo4CXRAansRfG0nlJxW7Wf6GZzSOvH31zClSaHdIMWLehe/EGMBkqeC55rrkaOr5Oo7Nw==" + }, "type-check": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", @@ -12889,12 +12944,27 @@ } }, "type-is": { - "version": "1.6.16", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.16.tgz", - "integrity": "sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q==", + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", "requires": { "media-typer": "0.3.0", - "mime-types": "~2.1.18" + "mime-types": "~2.1.24" + }, + "dependencies": { + "mime-db": { + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz", + "integrity": "sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA==" + }, + "mime-types": { + "version": "2.1.24", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.24.tgz", + "integrity": "sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ==", + "requires": { + "mime-db": "1.40.0" + } + } } }, "typedarray": { @@ -13259,9 +13329,9 @@ "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" }, "vendors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/vendors/-/vendors-1.0.2.tgz", - "integrity": "sha512-w/hry/368nO21AN9QljsaIhb9ZiZtZARoVH5f3CsFbawdLdayCgKRPup7CggujvySMxx0I91NOyxdVENohprLQ==" + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/vendors/-/vendors-1.0.3.tgz", + "integrity": "sha512-fOi47nsJP5Wqefa43kyWSg80qF+Q3XA6MUkgi7Hp1HQaKDQW4cQrK2D0P7mmbFtsV1N89am55Yru/nyEwRubcw==" }, "verror": { "version": "1.10.0", @@ -13337,12 +13407,9 @@ } }, "vm-browserify": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", - "integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=", - "requires": { - "indexof": "0.0.1" - } + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.0.tgz", + "integrity": "sha512-iq+S7vZJE60yejDYM0ek6zg308+UZsdtPExWP9VZoCFCz1zkJoXFnAX7aZfd/ZwrkidzdUZL0C/ryW+JwAiIGw==" }, "void-elements": { "version": "2.0.1", @@ -13515,16 +13582,16 @@ }, "dependencies": { "mime": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.2.tgz", - "integrity": "sha512-zJBfZDkwRu+j3Pdd2aHsR5GfH2jIWhmL1ZzBoc+X+3JEti2hbArWcyJ+1laC1D2/U/W1a/+Cegj0/OnEU2ybjg==" + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.4.tgz", + "integrity": "sha512-LRxmNwziLPT828z+4YkNzloCFC2YM4wrB99k+AV5ZbEyfGNWfG8SO1FUXLmLDBSo89NrJZ4DIWeLjy1CHGhMGA==" } } }, "webpack-hot-middleware": { - "version": "2.24.3", - "resolved": "https://registry.npmjs.org/webpack-hot-middleware/-/webpack-hot-middleware-2.24.3.tgz", - "integrity": "sha512-pPlmcdoR2Fn6UhYjAhp1g/IJy1Yc9hD+T6O9mjRcWV2pFbBjIFoJXhP0CoD0xPOhWJuWXuZXGBga9ybbOdzXpg==", + "version": "2.25.0", + "resolved": "https://registry.npmjs.org/webpack-hot-middleware/-/webpack-hot-middleware-2.25.0.tgz", + "integrity": "sha512-xs5dPOrGPCzuRXNi8F6rwhawWvQQkeli5Ro48PRuQh8pYPCPmNnltP9itiUPT4xI8oW+y0m59lyyeQk54s5VgA==", "requires": { "ansi-html": "0.0.7", "html-entities": "^1.2.0", @@ -13614,9 +13681,9 @@ "integrity": "sha1-oJYpuakgAo1yFAT7Q1vc/1yRvCE=" }, "wkx": { - "version": "0.4.6", - "resolved": "https://registry.npmjs.org/wkx/-/wkx-0.4.6.tgz", - "integrity": "sha512-LHxXlzRCYQXA9ZHgs8r7Gafh0gVOE8o3QmudM1PIkOdkXXjW7Thcl+gb2P2dRuKgW8cqkitCRZkkjtmWzpHi7A==", + "version": "0.4.7", + "resolved": "https://registry.npmjs.org/wkx/-/wkx-0.4.7.tgz", + "integrity": "sha512-pHf546L96TK8RradLt1cWaIffstgv/zXZ14CGz5KnBs1AxBX0wm+IDphjJw0qrEqRv8P9W9CdTt8Z1unMRZ19A==", "requires": { "@types/node": "*" } @@ -13669,9 +13736,9 @@ } }, "write-file-atomic": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.2.tgz", - "integrity": "sha512-s0b6vB3xIVRLWywa6X9TOMA7k9zio0TMOsl9ZnDkliA/cfJlpHXAscj0gbHVJiTdIuAYpIyqS5GW91fqm6gG5g==", + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.3.tgz", + "integrity": "sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ==", "requires": { "graceful-fs": "^4.1.11", "imurmurhash": "^0.1.4", diff --git a/package.json b/package.json index e540470..32b88ab 100644 --- a/package.json +++ b/package.json @@ -28,10 +28,10 @@ "dependencies": { "@blueprintjs/labs": "^0.14.4", "@blueprintjs/table": "^1.31.3", - "@datawheel/canon-core": "^0.16.32", + "@datawheel/canon-core": "^0.16.33", "@datawheel/canon-logiclayer": "^0.3.21", "@datawheel/canon-vizbuilder": "^0.2.11", - "d3plus-format": "^0.1.4", + "d3plus-format": "^0.1.10", "flickr-sdk": "^3.8.0", "google-spreadsheet": "^2.0.7", "jszip": "^3.2.1",