Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CDCWonder_NNDSS_InfectiousAnnual PR #1164

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions scripts/us_cdc/nndss_annual_tables/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# CDCWonder NNDSS InfectiousAnnual Import

## About the Dataset
Notifiable Infectious Diseases Data: Annual tables from CDC WONDER which has the incident counts of different infectious diseases per year and are aggregated based on demographic factors. The statistics are reported by the 50 states, New York City, the District of Columbia, and the U.S. territories

### Download URL

Source URL {https://wonder.cdc.gov/nndss/nndss_annual_tables_menu.asp}.


To download the latest versions of ALL datasets available, run the following command. Files will be downloaded and extracted to a nndss_Annual_data folder.

### License

This dataset is available for public use, license is available at https://www.cdc.gov/other/agencymaterials.html


### Downloading and Processing Data


To download the data run the below command

```bash
python3 download_annual_data.py
```
To process the data, execute the below command:

Running this command generates input_fles and csv, mcf, tmcf files

```bash
A. python3 process_annual_demographics.py
B. python3 process_annual_reporting.py
```



275 changes: 275 additions & 0 deletions scripts/us_cdc/nndss_annual_tables/config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,275 @@
_PV_MAP = {
'confirmed': {
'medicalStatus': 'dcs:ConfirmedCase'
},
'probable': {
'medicalStatus': 'dcs:ProbableCase'
},
'deaths': {
'medicalStatus': 'dcs:PatientDeceased'
},
'pediatric mortality': {
'medicalStatus': 'dcs:PediatricMortality'
},
'all serotypes': {
'serotype': 'dcs:AllSerotypes'
},
'serotype b': {
'serotype': 'dcs:SerotypeB'
},
'unknown serotype': {
'serotype': 'dcs:UnknownSerotype'
},
'non-b serotype': {
'serotype': 'dcs:NonSerotypeB'
},
'other serogroups': {
'serogroup': 'dcs:OtherSerogroups'
},
'nontypeable': {
'serogroup': 'dcs:OtherSerogroups'
},
'unknown serogroup': {
'serogroup': 'dcs:UnknownSerogroups'
},
'all groups': {
'serogroup': 'dcs:AllSerogroups'
},
'all serogroups': {
'serogroup': 'dcs:AllSerogroups'
},
'serogroups acwy': {
'serogroup': 'dcs:ACWYSerogroup'
},
'serogroup b': {
'serogroup': 'dcs:SerogroupB'
},
'group a': {
'serogroup': 'dcs:SerogroupA'
},
'perinatal infection': {
'medicalCondition': 'dcs:PerinatalInfection'
},
'acute': {
'medicalCondition': 'dcs:AcuteCondition'
},
'chronic': {
'medicalCondition': 'dcs:ChronicCondition'
},
'imported': {
'medicalStatus': 'dcs:ImportedCase'
},
'indigenous': {
'medicalStatus': 'dcs:IndigenousCase'
},
'clinical': {
'medicalStatus': 'dcs:ClinicalCase'
},
'neuroinvasive': {
'medicalCondition': 'dcs:NeuroinvasiveDisease'
},
'non-neuroinvasive': {
'medicalCondition': 'dcs:NonNeuroinvasiveDisease'
},
'congenital': {
'medicalCondition': 'dcs:CongenitalDisease'
},
'non-congenital': {
'medicalCondition': 'dcs:NonCongenitalDisease'
},
'drug resistant': {
'medicalCondition': 'dcs:DrugResistantDisease'
},
'nondrug resistant': {
'medicalCondition': 'dcs:NonDrugResistantDisease'
},
'invasive disease': {
'medicalCondition': 'dcs:InvasiveDisease'
},
'post-diarrheal': {
'medicalCondition': 'dcs:PostDiarrheal'
},
'<1 yr': {
'age': '[- 1 Years]'
},
'1-4 yrs': {
'age': '[1 4 Years]'
},
'5-14 yrs': {
'age': '[5 14 Years]'
},
'15-24 yrs': {
'age': '[15 24 Years]'
},
'25-39 yrs': {
'age': '[25 39 Years]'
},
'40-64 yrs': {
'age': '[40 64 Years]'
},
'≥65 yrs': {
'age': '[65 - Years]'
},
'age <5 years': {
'age': '[- 5 Years]'
},
'age not stated': {
'age': 'dcs:USC_AgeNotStated'
},
'male': {
'gender': 'dcs:Male'
},
'female': {
'gender': 'dcs:Female'
},
'sex not stated': {
'gender': 'dcs:CDC_GenderUnknownOrNotStated'
},
'american indian or alaska native': {
'race': 'dcs:AmericanIndianAndAlaskaNativeAlone'
},
'american indian or alaska native': {
'race': 'dcs:AmericanIndianAndAlaskaNativeAlone'
},
'asian or pacific islander': {
'race': 'dcs:AsianOrPacificIslander'
},
'asian or pacific islander': {
'race': 'dcs:AsianOrPacificIslander'
},
'black or african american': {
'race': 'dcs:BlackOrAfricanAmericanAlone'
},
'black': {
'race': 'dcs:Black'
},
'white': {
'race': 'dcs:White'
},
'other race': {
'race': 'dcs:CDC_OtherRace'
},
'other or multi-race ¶': {
'race': 'dcs:CDC_OtherRace'
},
'race not stated': {
'race': 'dcs:CDC_RaceUnknownOrNotStated'
},
'hispanic': {
'ethnicity': 'dcs:HispanicOrLatino'
},
'hispanic or latino': {
'ethnicity': 'dcs:HispanicOrLatino'
},
'non-hispanic/latino': {
'ethnicity': 'dcs:NotHispanicOrLatino'
},
'non-hispanic': {
'ethnicity': 'dcs:NotHispanicOrLatino'
},
'ethnicity not stated': {
'ethnicity': 'dcs:CDC_EthnicityUnknownOrNotStated'
},
'confirmed': {
'medicalStatus': 'dcs:ConfirmedCase'
},
'probable': {
'medicalStatus': 'dcs:ProbableCase'
},
'pediatric mortality': {
'medicalStatus': 'dcs:PediatricMortality'
},
'deaths': {
'medicalStatus': 'dcs:PatientDeceased'
},
'age <5': {
'age': '[- 5 Years]'
},
'age < 5': {
'age': '[- 5 Years]'
},
'age <5 years': {
'age': '[- 5 Years]'
},
'age < 5 years': {
'age': '[- 5 Years]'
},
'all serotypes': {
'serotype': 'dcs:AllSerotypes'
},
'serotype b': {
'serotype': 'dcs:SerotypeB'
},
'unknown serotype': {
'serotype': 'dcs:UnknownSerotype'
},
'non-b serotype': {
'serotype': 'dcs:NonSerotypeB'
},
'other serogroups': {
'serogroup': 'dcs:OtherSerogroups'
},
'nontypeable': {
'serogroup': 'dcs:OtherSerogroups'
},
'unknown serogroup': {
'serogroup': 'dcs:UnknownSerogroups'
},
'all groups': {
'serogroup': 'dcs:AllSerogroups'
},
'all serogroups': {
'serogroup': 'dcs:AllSerogroups'
},
'serogroups acwy': {
'serogroup': 'dcs:ACWYSerogroup'
},
'serogroup b': {
'serogroup': 'dcs:SerogroupB'
},
'group a': {
'serogroup': 'dcs:SerogroupA'
},
'perinatal infection': {
'medicalCondition': 'dcs:PerinatalInfection'
},
'acute': {
'medicalCondition': 'dcs:AcuteCondition'
},
'chronic': {
'medicalCondition': 'dcs:ChronicCondition'
},
'imported': {
'medicalStatus': 'dcs:ImportedCase'
},
'indigenous': {
'medicalStatus': 'dcs:IndigenousCase'
},
'clinical': {
'medicalStatus': 'dcs:ClinicalCase'
},
'neuroinvasive': {
'medicalCondition': 'dcs:NeuroinvasiveDisease'
},
'non-neuroinvasive': {
'medicalCondition': 'dcs:NonNeuroinvasiveDisease'
},
'congenital': {
'medicalCondition': 'dcs:CongenitalDisease'
},
'non-congenital': {
'medicalCondition': 'dcs:NonCongenitalDisease'
},
'drug resistant': {
'medicalCondition': 'dcs:DrugResistantDisease'
},
'nondrug resistant': {
'medicalCondition': 'dcs:NonDrugResistantDisease'
},
'invasive disease': {
'medicalCondition': 'dcs:InvasiveDisease'
},
'post-diarrheal': {
'medicalCondition': 'dcs:PostDiarrheal'
}
}
Loading
Loading