diff --git a/server/config/topic_page/equity/USA.textproto b/server/config/topic_page/equity/USA.textproto index 7bc906197c..b4917b1b70 100644 --- a/server/config/topic_page/equity/USA.textproto +++ b/server/config/topic_page/equity/USA.textproto @@ -49,87 +49,9 @@ categories { } } -categories { - title: "Health" - - blocks { - title: "Health and poverty" - description: "Studies from CDC and others have shown a correlation between obesity and poverty. Unfortunately, many other medical conditions are inversely correlated with economic well being." - stat_var_metadata { - stat_var: "Count_Person_BelowPovertyLevelInThePast12Months" - denom: "Count_Person" - unit: "%" - scaling: 100 - name: "Poverty rate" - } - stat_var_metadata { - stat_var: "Count_Person_NoHealthInsurance" - denom: "Count_Person" - unit: "%" - scaling: 100 - name: "Uninsurance rate" - } - left_tiles { - type: SCATTER - title: "Poverty rate vs. Uninsurance rate" - } - right_tiles { - type: SCATTER - title: "Inflation adjusted GDP vs. Death from Covid-19" - stat_var_override { - stat_var: "InflationAdjustedGDP" - unit: "$" - name: "Inflation adjusted GDP" - } - stat_var_override { - stat_var: "CumulativeCount_MedicalConditionIncident_COVID_19_PatientDeceased" - denom: "Count_Person" - unit: "%" - scaling: 100 - name: "Cumulative death from Covid-19" - } - } - right_tiles { - type: SCATTER - title: "Poverty rate vs. Death from diseases of the circulatory system" - stat_var_override { - stat_var: "Count_Person_BelowPovertyLevelInThePast12Months" - denom: "Count_Person" - unit: "%" - scaling: 100 - name: "Poverty rate" - } - stat_var_override { - stat_var: "Count_Death_DiseasesOfTheCirculatorySystem" - denom: "Count_Person" - unit: "%" - scaling: 100 - name: "Death from diseases of the circulatory system" - } - } - left_tiles { - type: SCATTER - title: "Poverty rate vs. Death from diseases of the digestive system" - stat_var_override { - stat_var: "Count_Person_BelowPovertyLevelInThePast12Months" - denom: "Count_Person" - unit: "%" - scaling: 100 - name: "Poverty rate" - } - stat_var_override { - stat_var: "Count_Death_DiseasesOfTheDigestiveSystem" - denom: "Count_Person" - unit: "%" - scaling: 100 - name: "Death from diseases of the digestive system per capita" - } - } - } -} - categories { title: "Equity between sexes" + description: "Gender is often confused with the concept of sex. Gender is a social construct, whereas sex is based on the biological attributes of men and women. The US Census intends to capture a person's biological sex and not gender. For more information, see https://www.census.gov/topics/population/age-and-sex/about.html" blocks { title: "Income inequality between sexes" description: "Income inequality is computed as the ratio of the difference between median income for each sex, with the combined median incomes. A value of 0 means complete equality of median income." @@ -182,27 +104,29 @@ categories { blocks { title: "Poverty rate, by sex" - description: "Percentage of the population living below the poverty level, broken down by sex." + description: "Percentage of the population of each sex living below the poverty level." stat_var_metadata { stat_var: "Count_Person_Female_BelowPovertyLevelInThePast12Months" - denom: "Count_Person_BelowPovertyLevelInThePast12Months" + denom: "Count_Person_Female" + scaling: 100 unit: "%" } stat_var_metadata { stat_var: "Count_Person_Male_BelowPovertyLevelInThePast12Months" - denom: "Count_Person_BelowPovertyLevelInThePast12Months" + denom: "Count_Person_Male" + scaling: 100 unit: "%" } left_tiles { type: MAP - title: "Percentage of the population in poverty who are female (${date})" + title: "Percentage of the female population in poverty (${date})" } right_tiles { type: MAP - title: "Percentage of the population in poverty who are male (${date})" + title: "Percentage of the male population in poverty (${date})" stat_var_override { stat_var: "Count_Person_Male_BelowPovertyLevelInThePast12Months" - denom: "Count_Person_BelowPovertyLevelInThePast12Months" + denom: "Count_Person_Male" unit: "%" } } @@ -270,7 +194,53 @@ categories { } blocks { - title: "Education attainment by sex: Associate's degree" + title: "With disabilities, by sex" + description: "Percentage of the population of each sex with disabilities" + stat_var_metadata { + stat_var: "Count_Person_WithDisability_Female" + denom: "Count_Person_Female" + unit: "%" + scaling: 100 + name: "Female, with disability" + } + stat_var_metadata { + stat_var: "Count_Person_WithDisability_Male" + denom: "Count_Person_Male" + unit: "%" + scaling: 100 + name: "Male, with disability" + } + # TODO(beets): This isn't available at the country level + # stat_var_metadata { + # stat_var: "Count_Person_Female_WithHealthInsurance" + # denom: "Count_Person_Female" + # unit: "%" + # scaling: 100 + # name: "Female, insured" + # } + # stat_var_metadata { + # stat_var: "Count_Person_Male_WithHealthInsurance" + # denom: "Count_Person_Male" + # unit: "%" + # scaling: 100 + # name: "Male, insured" + # } + left_tiles { + type: LINE + title: "With disability, by sex in ${place}" + } + right_tiles { + type: RANKING + ranking_metadata { + show_highest: true + } + } + } + + # Note: This data is not available by race. + blocks { + title: "Education attainment by sex" + description: "Percentage of the population of each sex with an associate's degree" stat_var_metadata { stat_var: "Count_Person_25To34Years_EducationalAttainmentAssociatesDegree_Female" denom: "Count_Person_25To34Years_Female" @@ -299,7 +269,8 @@ categories { } blocks { - title: "Education attainment by sex: Bachelors's degree" + # Note: title intentionally left out + description: "Percentage of the population of each sex with an bachelors's degree" stat_var_metadata { stat_var: "Count_Person_25To34Years_EducationalAttainmentBachelorsDegree_Female" denom: "Count_Person_25To34Years_Female" @@ -328,7 +299,8 @@ categories { } blocks { - title: "Education attainment by sex: Graduate or professional degree" + # Note: title intentionally left out + description: "Percentage of the population of each sex with a graduate or professional degree" stat_var_metadata { stat_var: "Count_Person_25To34Years_EducationalAttainmentGraduateOrProfessionalDegree_Female" denom: "Count_Person_25To34Years_Female" @@ -374,6 +346,8 @@ categories { categories { title: "Equity between races" + description: "The US Census Bureau measures race and ethnicity based on self-identification and may choose to identify with more than one race. The races are White, Black or African American, American Indian or Alaska Native, Asian and Native Hawaiian or Other Pacific Islander. As well, two ethnicities are included: Hispanic or Latino, and Not Hispanic or Latino. For more information, see https://www.census.gov/topics/population/race/about.html and https://www.census.gov/topics/population/hispanic-origin/about.html" + # TODO: Not available at the country level # blocks { # title: "Median income, by race" @@ -516,16 +490,74 @@ categories { } } + blocks { + title: "Disability status by race" + description: "Percentage of the population of each race with disabilities" + stat_var_metadata { + stat_var: "Count_Person_WithDisability_AmericanIndianOrAlaskaNativeAlone" + denom: "Count_Person_AmericanIndianOrAlaskaNativeAlone" + scaling: 100 + unit: "%" + name: "American Indian or Alaska Native" + } + stat_var_metadata { + stat_var: "Count_Person_WithDisability_AsianAlone" + denom: "Count_Person_AsianAlone" + scaling: 100 + unit: "%" + name: "Asian" + } + stat_var_metadata { + stat_var: "Count_Person_WithDisability_BlackOrAfricanAmericanAlone" + denom: "Count_Person_BlackOrAfricanAmericanAlone" + scaling: 100 + unit: "%" + name: "Black or African American" + } + stat_var_metadata { + stat_var: "Count_Person_WithDisability_HispanicOrLatino" + denom: "Count_Person_HispanicOrLatino" + scaling: 100 + unit: "%" + name: "Hispanic or Latino" + } + stat_var_metadata { + stat_var: "Count_Person_WithDisability_NativeHawaiianOrOtherPacificIslanderAlone" + denom: "Count_Person_NativeHawaiianOrOtherPacificIslanderAlone" + scaling: 100 + unit: "%" + name: "Native Hawaiian or Pacific Islander" + } + stat_var_metadata { + stat_var: "Count_Person_WithDisability_WhiteAlone" + denom: "Count_Person_WhiteAlone" + scaling: 100 + unit: "%" + name: "White" + } + left_tiles { + type: LINE + title: "Percentage of the population of each race with disabilities in ${place}" + } + right_tiles { + type: RANKING + ranking_metadata { + show_highest: true + highest_title: "Highest among ${statVar}" + } + } + } + blocks { title: "Correctional facility residents by race" - # TODO(beets): investigate high numbes for this - # stat_var_metadata { - # stat_var: "Count_Person_BelowPovertyLevelInThePast12Months_AmericanIndianOrAlaskaNativeAlone" - # denom: "Count_Person_ResidesInJuvenileFacilities" - # scaling: 100 - # unit: "%" - # name: "American Indian or Alaska Native" - # } + description: "Percentage of the population of each facility type, broken down by race" + stat_var_metadata { + stat_var: "Count_Person_AmericanIndianOrAlaskaNativeAlone_ResidesInJuvenileFacilities" + denom: "Count_Person_ResidesInJuvenileFacilities" + scaling: 100 + unit: "%" + name: "American Indian or Alaska Native" + } stat_var_metadata { stat_var: "Count_Person_AsianAlone_ResidesInJuvenileFacilities" denom: "Count_Person_ResidesInJuvenileFacilities" @@ -561,13 +593,42 @@ categories { unit: "%" name: "White" } + # TODO(bhoot): Count_Person_ResidesInJuvenileFacilities is not available at the country level + # left_tiles { + # title: "Percentage of the population in juvenile facilities, ${place} (${date})" + # type: MAP + # stat_var_override { + # stat_var: "Count_Person_ResidesInJuvenileFacilities" + # denom: "Count_Person" + # scaling: 100 + # unit: "%" + # } + # } left_tiles { title: "Racial breakdown of juvenile facility residents" type: LINE } + # TODO: Enable when juvenile map is available. + # right_tiles { + # title: "Percentage of the population in adult correctional facilities, ${place} (${date})" + # type: MAP + # stat_var_override { + # stat_var: "Count_Person_ResidesInAdultCorrectionalFacilities" + # denom: "Count_Person" + # scaling: 100 + # unit: "%" + # } + # } right_tiles { title: "Racial breakdown of adult correctional facility residents" type: LINE + stat_var_override { + stat_var: "Count_Person_AmericanIndianOrAlaskaNativeAlone_ResidesInAdultCorrectionalFacilities" + denom: "Count_Person_ResidesInJuvenileFacilities" + scaling: 100 + unit: "%" + name: "American Indian or Alaska Native" + } stat_var_override { stat_var: "Count_Person_AsianAlone_ResidesInAdultCorrectionalFacilities" denom: "Count_Person_ResidesInAdultCorrectionalFacilities" @@ -605,4 +666,246 @@ categories { } } } + blocks { + # Title intentionally left out to "merge" with previous block + description: "Percentage of the population of each race living in correctional facilities" + stat_var_metadata { + stat_var: "Count_Person_AmericanIndianOrAlaskaNativeAlone_ResidesInJuvenileFacilities" + denom: "Count_Person_AmericanIndianOrAlaskaNativeAlone" + scaling: 100 + unit: "%" + name: "American Indian or Alaska Native" + } + stat_var_metadata { + stat_var: "Count_Person_AsianAlone_ResidesInJuvenileFacilities" + denom: "Count_Person_AsianAlone" + scaling: 100 + unit: "%" + name: "Asian" + } + stat_var_metadata { + stat_var: "Count_Person_BlackOrAfricanAmericanAlone_ResidesInJuvenileFacilities" + denom: "Count_Person_BlackOrAfricanAmericanAlone" + scaling: 100 + unit: "%" + name: "Black or African American" + } + stat_var_metadata { + stat_var: "Count_Person_HispanicOrLatino_ResidesInJuvenileFacilities" + denom: "Count_Person_HispanicOrLatino" + scaling: 100 + unit: "%" + name: "Hispanic or Latino" + } + stat_var_metadata { + stat_var: "Count_Person_NativeHawaiianOrOtherPacificIslanderAlone_ResidesInJuvenileFacilities" + denom: "Count_Person_NativeHawaiianOrOtherPacificIslanderAlone" + scaling: 100 + unit: "%" + name: "Native Hawaiian or Pacific Islander" + } + stat_var_metadata { + stat_var: "Count_Person_WhiteAlone_ResidesInJuvenileFacilities" + denom: "Count_Person_WhiteAlone" + scaling: 100 + unit: "%" + name: "White" + } + left_tiles { + title: "Percentage of each race in correctional facilities" + type: LINE + } + right_tiles { + title: "Percentage of each race in correctional facilities" + type: LINE + stat_var_override { + stat_var: "Count_Person_AmericanIndianOrAlaskaNativeAlone_ResidesInAdultCorrectionalFacilities" + denom: "Count_Person_AmericanIndianOrAlaskaNativeAlone" + scaling: 100 + unit: "%" + name: "American Indian or Alaska Native" + } + stat_var_override { + stat_var: "Count_Person_AsianAlone_ResidesInAdultCorrectionalFacilities" + denom: "Count_Person_AsianAlone" + scaling: 100 + unit: "%" + name: "Asian" + } + stat_var_override { + stat_var: "Count_Person_BlackOrAfricanAmericanAlone_ResidesInAdultCorrectionalFacilities" + denom: "Count_Person_BlackOrAfricanAmericanAlone" + scaling: 100 + unit: "%" + name: "Black or African American" + } + stat_var_override { + stat_var: "Count_Person_HispanicOrLatino_ResidesInAdultCorrectionalFacilities" + denom: "Count_Person_HispanicOrLatino" + scaling: 100 + unit: "%" + name: "Hispanic or Latino" + } + stat_var_override { + stat_var: "Count_Person_NativeHawaiianOrOtherPacificIslanderAlone_ResidesInAdultCorrectionalFacilities" + denom: "Count_Person_NativeHawaiianOrOtherPacificIslanderAlone" + scaling: 100 + unit: "%" + name: "Native Hawaiian or Pacific Islander" + } + stat_var_override { + stat_var: "Count_Person_WhiteAlone_ResidesInAdultCorrectionalFacilities" + denom: "Count_Person_WhiteAlone" + scaling: 100 + unit: "%" + name: "White" + } + } + } +} + +categories { + title: "Disability status" + description: "The US Census Bureau collects data on disability through a few programs which have different definitions of disability. The data in this section is from the American Community Survey (ACS) which includes six questions on the topic. Respondents reporting hearing, vision, cognitive, ambulatory, self-care or independent living difficulties are considered to have a disability. For more information, see https://www.census.gov/topics/health/disability/guidance/data-collection-acs.html" + + blocks { + stat_var_metadata { + stat_var: "Count_Person_WithDisability" + denom: "Count_Person" + name: "Percentage of people with disability" + unit: "%" + scaling: 100 + } + + left_tiles { + title: "Percentage of the population with disabilities (${date})" + type: MAP + } + + right_tiles { + type: HIGHLIGHT + description: "of Americans have disabilities (${date})" + } + + right_tiles { + type: RANKING + ranking_metadata { + show_highest: true + show_lowest: true + } + } + } + + blocks { + title: "Without health insurance" + stat_var_metadata { + stat_var: "Count_Person_NoHealthInsurance_WithDisability" + denom: "Count_Person_WithDisability" + name: "Percentage of people with disabilities and no health insurance" + unit: "%" + scaling: 100 + } + + right_tiles { + title: "Percentage of the population with disabilities (${date})" + type: MAP + } + + left_tiles { + type: HIGHLIGHT + description: "of Americans with disabilities have no health insurance (${date})" + } + + left_tiles { + type: RANKING + ranking_metadata { + show_highest: true + show_lowest: true + } + } + } + + # TODO: Computed percentages does not sum up to 100% with uninsured block. + # blocks { + # title: "With health insurance" + # stat_var_metadata { + # stat_var: "Count_Person_WithHealthInsurance_WithDisability" + # denom: "Count_Person_WithDisability" + # name: "Percentage of people with disabilities and health insurance" + # unit: "%" + # scaling: 100 + # } + + # left_tiles { + # title: "Percentage of the population with disabilities and health insurance (${date})" + # type: MAP + # } + + # # TODO(pradh): Count_Person_WithHealthInsurance_WithDisability not available at country level. + # # right_tiles { + # # type: HIGHLIGHT + # # description: "of Americans with disabilities have health insurance (${date})" + # # } + + # right_tiles { + # type: RANKING + # ranking_metadata { + # show_highest: true + # show_lowest: true + # } + # } + # } + + # TODO(beets): The charts here would be better as percentages, but there is no denominator: Count_Household_WithDisability + blocks { + title: "Food assistance for households with disabilities" + description: "Number of households with one or more people with a disability receiving food stamps in the last 12 months." + stat_var_metadata { + stat_var: "Count_Household_WithFoodStampsInThePast12Months_WithDisability" + } + left_tiles { + type: MAP + title: "Number of households with one or more people with a disability receiving food stamps (${date})" + } + right_tiles { + type: MAP + title: "Number of households with one or more people with a disability not receiving food stamps (${date})" + stat_var_override { + stat_var: "Count_Household_WithoutFoodStampsInThePast12Months_WithDisability" + } + } + } + + + blocks { + title: "Correctional facility residents with disabilities" + description: "Percentage of the population of each facility type with disabiliites" + stat_var_metadata { + stat_var: "Count_Person_WithDisability_ResidesInJuvenileFacilities" + denom: "Count_Person_ResidesInJuvenileFacilities" + scaling: 100 + unit: "%" + name: "With disability" + } + # TODO(bhoot): This data is not available at the state level. Neither is the 'no disability' corrolary data. + # left_tiles { + # title: "Percentage of the juvenile facility residents with disabiliites (${date})" + # type: MAP + # } + left_tiles { + title: "Percentage of the juvenile facility residents with disabiliites" + type: LINE + } + right_tiles { + title: "Percentage of the adult correctional facility residents with disabiliites (${date})" + type: MAP + stat_var_override { + stat_var: "Count_Person_WithDisability_ResidesInAdultCorrectionalFacilities" + denom: "Count_Person_ResidesInAdultCorrectionalFacilities" + scaling: 100 + unit: "%" + name: "Asian" + } + } + } } \ No newline at end of file diff --git a/server/config/topic_page/poverty/USA.textproto b/server/config/topic_page/poverty/USA.textproto index 917999107f..717a6dc375 100644 --- a/server/config/topic_page/poverty/USA.textproto +++ b/server/config/topic_page/poverty/USA.textproto @@ -378,4 +378,83 @@ categories { # Count_Household_3OrLessRatioToPovertyLine_FamilyHousehold # Count_Household_4OrLessRatioToPovertyLine_FamilyHousehold # Count_Household_5OrLessRatioToPovertyLine_FamilyHousehold - # } \ No newline at end of file + # } + +categories { + title: "Poverty and health" + + blocks { + title: "Health and poverty" + description: "Studies from CDC and others have shown a correlation between obesity and poverty. Unfortunately, many other medical conditions are inversely correlated with economic well being." + stat_var_metadata { + stat_var: "Count_Person_BelowPovertyLevelInThePast12Months" + denom: "Count_Person" + unit: "%" + scaling: 100 + name: "Poverty rate" + } + stat_var_metadata { + stat_var: "Count_Person_NoHealthInsurance" + denom: "Count_Person" + unit: "%" + scaling: 100 + name: "Uninsurance rate" + } + left_tiles { + type: SCATTER + title: "Poverty rate vs. Uninsurance rate" + } + right_tiles { + type: SCATTER + title: "Inflation adjusted GDP vs. Death from Covid-19" + stat_var_override { + stat_var: "InflationAdjustedGDP" + unit: "$" + name: "Inflation adjusted GDP" + } + stat_var_override { + stat_var: "CumulativeCount_MedicalConditionIncident_COVID_19_PatientDeceased" + denom: "Count_Person" + unit: "%" + scaling: 100 + name: "Cumulative death from Covid-19" + } + } + right_tiles { + type: SCATTER + title: "Poverty rate vs. Death from diseases of the circulatory system" + stat_var_override { + stat_var: "Count_Person_BelowPovertyLevelInThePast12Months" + denom: "Count_Person" + unit: "%" + scaling: 100 + name: "Poverty rate" + } + stat_var_override { + stat_var: "Count_Death_DiseasesOfTheCirculatorySystem" + denom: "Count_Person" + unit: "%" + scaling: 100 + name: "Death from diseases of the circulatory system" + } + } + left_tiles { + type: SCATTER + title: "Poverty rate vs. Death from diseases of the digestive system" + stat_var_override { + stat_var: "Count_Person_BelowPovertyLevelInThePast12Months" + denom: "Count_Person" + unit: "%" + scaling: 100 + name: "Poverty rate" + } + stat_var_override { + stat_var: "Count_Death_DiseasesOfTheDigestiveSystem" + denom: "Count_Person" + unit: "%" + scaling: 100 + name: "Death from diseases of the digestive system per capita" + } + } + } +} \ No newline at end of file diff --git a/static/css/topic_page.scss b/static/css/topic_page.scss index e731945cb6..7910983148 100644 --- a/static/css/topic_page.scss +++ b/static/css/topic_page.scss @@ -214,4 +214,8 @@ article.category > h2 { line-height: 1.2rem; padding: 0.3rem 0; text-decoration: none; +} + +.subtopic.notitle:not(:first-of-type) { + border-top: 0.5px dotted #dee2e6 !important; } \ No newline at end of file diff --git a/static/js/topic_page/block.tsx b/static/js/topic_page/block.tsx index c4c72b17df..907a940e57 100644 --- a/static/js/topic_page/block.tsx +++ b/static/js/topic_page/block.tsx @@ -37,7 +37,7 @@ export interface BlockPropType { id: string; place: NamedTypedPlace; enclosedPlaceType: string; - title: string; + title?: string; description: string; leftTiles: Tile[]; rightTiles: Tile[]; @@ -46,7 +46,10 @@ export interface BlockPropType { export function Block(props: BlockPropType): JSX.Element { return ( -
+
{props.title &&

{props.title}

} {props.description &&

{props.description}

}
diff --git a/static/js/topic_page/category.tsx b/static/js/topic_page/category.tsx index 4a5b18d3b1..b7c29fff5c 100644 --- a/static/js/topic_page/category.tsx +++ b/static/js/topic_page/category.tsx @@ -51,7 +51,7 @@ export function Category(props: CategoryPropType): JSX.Element { return ( { - elements.push(renderItem(block.title, false)); + if (block.title) { + elements.push(renderItem(block.title, false)); + } }); return elements; })}