Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
benhammondmusic committed Jun 18, 2024
2 parents ec23d4d + 5a77b66 commit 25080e3
Show file tree
Hide file tree
Showing 22 changed files with 660 additions and 394 deletions.
2 changes: 1 addition & 1 deletion data_server/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ google-auth==2.29.0
# google-cloud-storage
google-cloud-core==2.4.1
# via google-cloud-storage
google-cloud-storage==2.16.0
google-cloud-storage==2.17.0
# via -r ../python/data_server/requirements.in
google-crc32c==1.0.0
# via
Expand Down
4 changes: 2 additions & 2 deletions exporter/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ google-cloud-core==2.4.1
# -r requirements.in
# google-cloud-bigquery
# google-cloud-storage
google-cloud-pubsub==2.21.2
google-cloud-pubsub==2.21.3
# via -r requirements.in
google-cloud-storage==2.16.0
google-cloud-storage==2.17.0
# via -r requirements.in
google-crc32c==1.3.0
# via
Expand Down
6 changes: 3 additions & 3 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions frontend/src/data/config/DatasetMetadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -869,6 +869,7 @@ export const DatasetMetadataMap: Record<DatasetId, DatasetMetadata> = {
'cdc_wisqars_data-race_and_ethnicity_state_historical': {
name: 'Gun-related Deaths, by race/ethnicity and state',
original_data_sourced: '2018-2021',
contains_nh: true,
source_id: 'cdc_wisqars_data',
},
'cdc_wisqars_data-sex_state_historical': {
Expand All @@ -885,6 +886,7 @@ export const DatasetMetadataMap: Record<DatasetId, DatasetMetadata> = {
'cdc_wisqars_data-race_and_ethnicity_state_current': {
name: 'Gun-related Deaths, by race/ethnicity and state',
original_data_sourced: '2021',
contains_nh: true,
source_id: 'cdc_wisqars_data',
},
'cdc_wisqars_data-sex_state_current': {
Expand All @@ -901,6 +903,7 @@ export const DatasetMetadataMap: Record<DatasetId, DatasetMetadata> = {
'cdc_wisqars_data-race_and_ethnicity_national_historical': {
name: 'Gun-related Deaths, by race/ethnicity, nationally',
original_data_sourced: '2018-2021',
contains_nh: true,
source_id: 'cdc_wisqars_data',
},
'cdc_wisqars_data-sex_national_historical': {
Expand All @@ -917,6 +920,7 @@ export const DatasetMetadataMap: Record<DatasetId, DatasetMetadata> = {
'cdc_wisqars_data-race_and_ethnicity_national_current': {
name: 'Gun-related Deaths, by race/ethnicity, nationally',
original_data_sourced: '2021',
contains_nh: true,
source_id: 'cdc_wisqars_data',
},
'cdc_wisqars_data-sex_national_current': {
Expand All @@ -937,52 +941,62 @@ export const DatasetMetadataMap: Record<DatasetId, DatasetMetadata> = {
'cdc_wisqars_youth_data-youth_by_race_and_ethnicity_state_current': {
name: 'Gun-related Youth and Young Adult Deaths, by race and ethnicity and state',
original_data_sourced: '2021',
contains_nh: true,
source_id: 'cdc_wisqars_data'
},
'cdc_wisqars_youth_data-youth_by_race_and_ethnicity_state_historical': {
name: 'Gun-related Youth and Young Adult Deaths, by race and ethnicity and state',
original_data_sourced: '2018-2021',
contains_nh: true,
source_id: 'cdc_wisqars_data'
},
'cdc_wisqars_black_men_data-black_men_by_urbanicity_national_current': {
name: 'Gun homicides for Black men, by urbanicity (e.g. Metro or Non-Metro), nationally',
original_data_sourced: '2021',
contains_nh: true,
source_id: 'cdc_wisqars_data'
},
'cdc_wisqars_black_men_data-black_men_by_urbanicity_national_historical': {
name: 'Gun homicides for Black men, by urbanicity (e.g. Metro or Non-Metro), nationally',
original_data_sourced: '2018-2021',
contains_nh: true,
source_id: 'cdc_wisqars_data'
},
'cdc_wisqars_black_men_data-black_men_by_urbanicity_state_current': {
name: 'Gun homicides for Black men, by urbanicity (e.g. Metro or Non-Metro) and state',
original_data_sourced: '2021',
contains_nh: true,
source_id: 'cdc_wisqars_data'
},
'cdc_wisqars_black_men_data-black_men_by_urbanicity_state_historical': {
name: 'Gun homicides for Black men, by urbanicity (e.g. Metro or Non-Metro) and state',
original_data_sourced: '2018-2021',
contains_nh: true,
source_id: 'cdc_wisqars_data'
},

'cdc_wisqars_black_men_data-black_men_by_age_national_current': {
name: 'Gun homicides for Black men, by age, nationally',
original_data_sourced: '2021',
contains_nh: true,
source_id: 'cdc_wisqars_data'
},
'cdc_wisqars_black_men_data-black_men_by_age_national_historical': {
name: 'Gun homicides for Black men, by age, nationally',
original_data_sourced: '2018-2021',
contains_nh: true,
source_id: 'cdc_wisqars_data'
},
'cdc_wisqars_black_men_data-black_men_by_age_state_current': {
name: 'Gun homicides for Black men, by age and state',
original_data_sourced: '2021',
contains_nh: true,
source_id: 'cdc_wisqars_data'
},
'cdc_wisqars_black_men_data-black_men_by_age_state_historical': {
name: 'Gun homicides for Black men, by age and state',
original_data_sourced: '2018-2021',
contains_nh: true,
source_id: 'cdc_wisqars_data'
},
"maternal_mortality_data-by_race_national_current": {
Expand Down
23 changes: 11 additions & 12 deletions frontend/src/data/config/MetricConfigCommunitySafety.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,30 +296,28 @@ export const GUN_VIOLENCE_YOUTH_METRICS: DataTypeConfig[] = [
export const GUN_DEATHS_BLACK_MEN_METRICS: DataTypeConfig[] = [
{
categoryId: 'community-safety',
dataTableTitle: 'Breakdown summary of gun homicides among Black men',
dataTableTitle: 'Breakdown summary of gun homicides among Black (NH) men',
dataTypeId: 'gun_deaths_black_men',
dataTypeShortLabel: 'Gun Homicides (Black Men)',
definition: {
text: 'Deaths of Black or African-American males, caused by gun homicides.'
text: 'Deaths of Black or African-American (NH) males, caused by gun homicides.'
},
fullDisplayName: 'Gun homicides (Black Men)',
fullDisplayNameInline: 'gun homicides (Black Men)',
mapConfig: menHigherIsWorseMapConfig,
otherSubPopulationLabel: 'Black Men',
metrics: {

pct_relative_inequity: {
chartTitle: 'Historical relative inequity of gun homicides among Black men',
chartTitle: 'Historical relative inequity of gun homicides among Black (NH) men',
metricId: 'gun_homicides_black_men_pct_relative_inequity',
shortLabel: '% relative inequity',
type: 'pct_relative_inequity',
},
pct_share: {
chartTitle: 'Share of total gun homicides among Black men',
columnTitleHeader: 'Share of total gun homicides among Black men',
chartTitle: 'Share of total gun homicides among Black (NH) men',
columnTitleHeader: 'Share of total gun homicides among Black (NH) men',
metricId: 'gun_homicides_black_men_pct_share',
populationComparisonMetric: {
chartTitle: 'Population vs. distribution of total gun homicides among Black men',
chartTitle: 'Population vs. distribution of total gun homicides among Black (NH) men',
columnTitleHeader: `${populationPctTitle} (Black NH, Male)`,
metricId: 'gun_homicides_black_men_population_pct',
shortLabel: populationPctShortLabel,
Expand All @@ -329,11 +327,11 @@ export const GUN_DEATHS_BLACK_MEN_METRICS: DataTypeConfig[] = [
type: 'pct_share',
},
per100k: {
chartTitle: 'Rates of gun homicides among Black men',
columnTitleHeader: 'Gun homicides per 100k Black men',
chartTitle: 'Rates of gun homicides among Black (NH) men',
columnTitleHeader: 'Gun homicides per 100k Black (NH) men',
metricId: 'gun_homicides_black_men_per_100k',
shortLabel: 'homicides per 100k',
trendsCardTitleName: 'Rates of gun homicides among Black men over time',
trendsCardTitleName: 'Rates of gun homicides among Black (NH) men over time',
type: 'per100k',
rateNumeratorMetric: {
chartTitle: '',
Expand All @@ -348,7 +346,8 @@ export const GUN_DEATHS_BLACK_MEN_METRICS: DataTypeConfig[] = [
type: 'count',
}
},
}
},
otherSubPopulationLabel: 'Black Men',
}
]

Original file line number Diff line number Diff line change
Expand Up @@ -244,3 +244,29 @@ export function MissingAHRData() {
</>
)
}

export function MissingWisqarsData() {
return (
<>
<h4 className='text-text font-light'>
Missing WISQARS Data
</h4>
<ul className='m-0 ml-1 self-start text-small text-altBlack'>
<li>
<b>Legal intervention data:</b> Data on deaths caused by legal intervention
is limited. Therefore, we choose to show raw counts of deaths caused by legal
intervention in states where the data is available. This approach ensures
that the information presented is accurate and reflective of the available data
without making potentially misleading calculations based on incomplete information.
It is important to note that the number of deaths from legal intervention
available from the CDC is widely considered to be underreported.
</li>
<li>
<b>Data suppression:</b> WISQARS suppresses data where the value is between
one to nine deaths. This suppression is done to protect the privacy of
individuals and ensure the confidentiality of sensitive information.
</li>
</ul>
</>
);
}
12 changes: 12 additions & 0 deletions frontend/src/pages/Methodology/methodologyContent/routeConfigs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
METHODOLOGY_PAGE_LINK,
AGE_ADJUSTMENT_LINK,
LIMITATIONS_LINK,
COMMUNITY_SAFETY_LINK,
} from '../../../utils/internalRoutes';
import AgeAdjustmentLink from '../methodologySections/AgeAdjustmentLink';
import BehavioralHealthLink from '../methodologySections/BehavioralHealthLink';
Expand All @@ -38,6 +39,7 @@ import MethodologyHomeLink from '../methodologySections/MethodologyHomeLink';
import GlossaryLink from '../methodologySections/GlossaryLink';
import type { ReactNode } from 'react';
import { raceAndEthnicitySublinks } from './RacesAndEthnicitiesDefinitions';
import CommunitySafetyLink from '../methodologySections/CommunitySafetyLink';

export type RouteConfig = {
isTopLevel?: boolean;
Expand Down Expand Up @@ -141,6 +143,16 @@ export const routeConfigs: RouteConfig[] = [
{ label: 'Key Terms', path: '#chronic-diseases-key-terms' },
],
},
{
label: 'Community Safety',
path: COMMUNITY_SAFETY_LINK,
component: CommunitySafetyLink,
subLinks: [
{ label: 'Data Sourcing', path: '#community-safety-data-sourcing' },
{ label: 'Data Sources', path: '#community-safety-data-sources' },
{ label: 'Key Terms', path: '#community-safety-key-terms' },
]
},
{
label: 'COVID-19',
path: COVID_19_LINK,
Expand Down
Loading

0 comments on commit 25080e3

Please sign in to comment.