Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
benhammondmusic committed May 30, 2024
2 parents cd7649c + 1af1f7d commit 9d1fc2b
Show file tree
Hide file tree
Showing 13 changed files with 21 additions and 158 deletions.
34 changes: 0 additions & 34 deletions airflow/dags/svi.py

This file was deleted.

4 changes: 0 additions & 4 deletions config/data_sources/cdc_svi_county.tf

This file was deleted.

12 changes: 0 additions & 12 deletions frontend/playwright-tests/hiv_prep.nightly.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,18 +103,6 @@ test('HIV PrEP', async ({ page }) => {
await page
.getByRole('heading', { name: 'Breakdown summary for PrEP' })
.click()
await page
.getByRole('figure', { name: 'Breakdown summary for PrEP' })
.locator('h4')
.click()
await page.getByRole('columnheader', { name: 'Sex' }).click()
await page
.getByRole('columnheader', { name: 'PrEP coverage', exact: true })
.click()
await page.getByRole('columnheader', { name: 'Share of total PrEP' }).click()
await page
.getByRole('columnheader', { name: 'PrEP-eligible population' })
.click()
await page.getByRole('columnheader', { name: 'Sex' }).click()
await page.getByRole('cell', { name: 'Female' }).click()
await page.getByRole('cell', { name: 'Male', exact: true }).click()
Expand Down
16 changes: 5 additions & 11 deletions frontend/src/data/config/DatasetMetadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ export type DatasetId =
| 'cdc_restricted_data-by_sex_national_processed'
| 'cdc_restricted_data-by_sex_state_processed_time_series'
| 'cdc_restricted_data-by_sex_state_processed'
| 'cdc_svi_county-age'
| 'cdc_vaccination_county-alls_county'
| 'cdc_vaccination_national-age_processed' // TODO: rm "processed" on the backend and use the actual geography "national"
| 'cdc_vaccination_national-race_processed' // TODO: rm "processed" on the backend and use the actual geography "national"
Expand Down Expand Up @@ -598,11 +597,6 @@ export const DatasetMetadataMap: Record<DatasetId, DatasetMetadata> = {
original_data_sourced: 'January 2020 - April 2024',
source_id: 'cdc_restricted',
},
'cdc_svi_county-age': {
name: 'National SVI (Social Vulnerability Index) by county',
original_data_sourced: '2022',
source_id: 'cdc_svi_county',
},
'cdc_vaccination_county-alls_county': {
name: 'COVID-19 vaccinations by county',
contains_nh: true,
Expand Down Expand Up @@ -760,18 +754,18 @@ export const DatasetMetadataMap: Record<DatasetId, DatasetMetadata> = {
},
'geo_context-national': {
name: 'Population from ACS nationally',
original_data_sourced: '2019',
original_data_sourced: '2022',
source_id: 'acs',
},
'geo_context-state': {
name: 'Population from ACS by state',
original_data_sourced: '2019',
original_data_sourced: '2022',
source_id: 'acs',
},
'geo_context-county': {
name: 'Population from ACS by county; SVI from CDC',
original_data_sourced: '2019',
source_id: 'acs',
name: 'SVI from CDC, Population from ACS by county',
original_data_sourced: '2022',
source_id: 'geo_context',
},
[GEOGRAPHIES_DATASET_ID]: {
name: 'U.S. Geographic Data',
Expand Down
31 changes: 7 additions & 24 deletions frontend/src/data/config/MetadataMap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export type DataSourceId =
| 'cawp'
| 'cdc_atlas'
| 'cdc_restricted'
| 'cdc_svi_county'
| 'cdc_vaccination_county'
| 'cdc_vaccination_national'
| 'cdc_wisqars_data'
Expand Down Expand Up @@ -170,22 +169,6 @@ export const dataSourceMetadataMap: Record<DataSourceId, DataSourceMetadata> = {
downloadable: true,
time_period_range: null,
},
cdc_svi_county: {
id: 'cdc_svi_county',
data_source_name: 'CDC SVI County Rankings',
data_source_acronym: 'CDC',
data_source_pretty_site_name: 'atsdr.cdc.gov',
data_source_link:
'https://www.atsdr.cdc.gov/placeandhealth/svi/documentation/SVI_documentation_2022.html',
geographic_level: 'County',
demographic_granularity: 'None',
update_frequency: 'Biannual',
description:
'Every community must prepare for and respond to hazardous events, whether a natural disaster like a tornado or a disease outbreak, or an anthropogenic event such as a harmful chemical spill. The degree to which a community exhibits certain social conditions, including high poverty, low percentage of vehicle access, or crowded households, may affect that community’s ability to prevent human suffering and financial loss in the event of disaster. These factors describe a community’s social vulnerability.',
dataset_ids: ['cdc_svi_county-age'],
downloadable: true,
time_period_range: null,
},
cdc_vaccination_county: {
id: 'cdc_vaccination_county',
data_source_name: 'CDC COVID-19 Vaccinations in the United States, County',
Expand Down Expand Up @@ -403,17 +386,17 @@ export const dataSourceMetadataMap: Record<DataSourceId, DataSourceMetadata> = {
},
geo_context: {
id: 'geo_context',
data_source_name: 'Geographic Context - Composite Dataset',
data_source_acronym: 'CDC, ACS',
data_source_name: 'CDC SVI Rankings',
data_source_acronym: 'CDC',
data_source_pretty_site_name:
'github.com/SatcherInstitute/health-equity-tracker',
'atsdr.cdc.gov',
data_source_link:
'https://github.com/SatcherInstitute/health-equity-tracker',
geographic_level: 'National, State, County',
'https://www.atsdr.cdc.gov/placeandhealth/svi/data_documentation_download.html',
geographic_level: 'County',
demographic_granularity: 'N/A',
update_frequency: 'Yearly',
update_frequency: 'Every 2 Years',
description:
'This is a composite dataset we create for faster loading; it includes population data from ACS and SVI data at the county level from the CDC.',
'This is a composite dataset we create for faster loading; it includes population data from ACS and SVI data at the county level from the CDC. SVI: Every community must prepare for and respond to hazardous events, whether a natural disaster like a tornado or a disease outbreak, or an anthropogenic event such as a harmful chemical spill. The degree to which a community exhibits certain social conditions, including high poverty, low percentage of vehicle access, or crowded households, may affect that community’s ability to prevent human suffering and financial loss in the event of disaster. These factors describe a community’s social vulnerability.',
dataset_ids: [
'geo_context-county',
'geo_context-state',
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/data/providers/GeoContextProvider.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ describe('GeoContextProvider', () => {
new Fips('06037'),
['svi', 'population'],
'geo_context-county',
['cdc_svi_county-age', 'acs_population-by_sex_county']
['geo_context-county', 'acs_population-by_sex_county']
)
})

Expand All @@ -62,7 +62,7 @@ describe('GeoContextProvider', () => {
new Fips('06037'),
['svi'],
'geo_context-county',
['cdc_svi_county-age']
['geo_context-county']
)
})

Expand All @@ -71,7 +71,7 @@ describe('GeoContextProvider', () => {
new Fips('72123'),
['svi', 'population'],
'geo_context-county',
['cdc_svi_county-age', 'acs_population-by_sex_county']
['geo_context-county', 'acs_population-by_sex_county']
)
})

Expand All @@ -81,7 +81,7 @@ describe('GeoContextProvider', () => {
['svi', 'population'],
'geo_context-county',
[
'cdc_svi_county-age',
'geo_context-county',
'decia_2020_territory_population-by_sex_territory_county_level',
]
)
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/data/providers/GeoContextProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class GeoContextProvider extends VariableProvider {
const breakdowns = metricQuery.breakdowns
const datasetId = this.getDatasetId(breakdowns)
if (!datasetId) throw Error('DatasetId undefined')

const specificDatasetId = appendFipsIfNeeded(datasetId, breakdowns)
const geoContext = await getDataManager().loadDataset(specificDatasetId)

Expand All @@ -36,9 +37,8 @@ class GeoContextProvider extends VariableProvider {
// handles both SVI and/or POPULATION requests, need to dynamically infer the consumed datasets for footer
const consumedDatasetIds: DatasetId[] = []

if (metricQuery.metricIds.includes(SVI)) {
// TODO: refactor SVI to not use pretend AGE demographic type, use ALL demographic type like in covid vaxx by county
consumedDatasetIds.push('cdc_svi_county-age')
if (breakdowns.geography === 'county') {
consumedDatasetIds.push('geo_context-county')
}

const acsDatasetMap: Record<GeographicBreakdown, DatasetId> = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { DatasetMetadataMap } from '../../../data/config/DatasetMetadata'
export default function DataMethodDefinitionsLink() {

const acsYear = DatasetMetadataMap["acs_population-by_race_national"].original_data_sourced
const sviYear = DatasetMetadataMap["cdc_svi_county-age"].original_data_sourced
const sviYear = DatasetMetadataMap["geo_context-county"].original_data_sourced

return (
<section id='#data-methods'>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const sdohDataSources = [
dataSourceMetadataMap.acs,
dataSourceMetadataMap.ahr,
dataSourceMetadataMap.chr,
dataSourceMetadataMap.cdc_svi_county,
dataSourceMetadataMap.geo_context,
]

// delete this, load from missingDataBlurbs instead
Expand Down
2 changes: 0 additions & 2 deletions python/datasources/data_sources.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from datasources.cawp_time import CAWPTimeData
from datasources.cdc_hiv import CDCHIVData
from datasources.cdc_restricted import CDCRestrictedData
from datasources.cdc_svi_county import CDCSviCounty
from datasources.cdc_vaccination_county import CDCVaccinationCounty
from datasources.cdc_vaccination_national import CDCVaccinationNational
from datasources.cdc_wisqars import CDCWisqarsData
Expand Down Expand Up @@ -37,7 +36,6 @@
CAWPTimeData.get_id(): CAWPTimeData(),
CDCHIVData.get_id(): CDCHIVData(),
CDCRestrictedData.get_id(): CDCRestrictedData(),
CDCSviCounty.get_id(): CDCSviCounty(),
CDCVaccinationCounty.get_id(): CDCVaccinationCounty(),
CDCVaccinationNational.get_id(): CDCVaccinationNational(),
CDCWisqarsData.get_id(): CDCWisqarsData(),
Expand Down
5 changes: 0 additions & 5 deletions python/tests/data/cdc_svi_county/cdc_svi_county_test.csv

This file was deleted.

This file was deleted.

52 changes: 0 additions & 52 deletions python/tests/datasources/test_cdc_svi_county.py

This file was deleted.

0 comments on commit 9d1fc2b

Please sign in to comment.