Skip to content

Commit

Permalink
Cdc airquality generalized the code to download and process for four …
Browse files Browse the repository at this point in the history
…imports
  • Loading branch information
shamimansari1988 committed Dec 23, 2024
1 parent ed151de commit 6ea7a02
Show file tree
Hide file tree
Showing 5 changed files with 100,387 additions and 49 deletions.
58 changes: 55 additions & 3 deletions scripts/us_cdc/environmental_health_toxicology/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ The expected output of this test can be found in [`small_Palmer_expected.csv`](h

#### Processing Steps

`@input_file_name` - path to the input csv file to be cleaned
<!-- `@input_file_name` - path to the input csv file to be cleaned
`@output_file_name` - path to write the cleaned csv file
Expand All @@ -122,5 +122,57 @@ $ python3 parse_air_quality.py input_file_name output_file_name
To clean the precipitation index data files, run:
```bash
$ python3 parse_precipitation_index.py input_file_name output_file_name
```
$ python3 parse_precipitation_index.py input_file_name output_file_name -->

1. Import name: CDC_PM25CensusTract

command to download the file
============================

$ python3 scripts/us_cdc/environmental_health_toxicology/parse_air_quality.py CDC_PM25CensusTract --mode=download


Command to process the file
===========================

$ python3 scripts/us_cdc/environmental_health_toxicology/parse_air_quality.py CDC_PM25CensusTract --mode=process


2. Import name: CDC_OzoneCensusTract

command to download the file
============================

$ python3 scripts/us_cdc/environmental_health_toxicology/parse_air_quality.py CDC_OzoneCensusTract --mode=download


Command to process the file
===========================

$ python3 scripts/us_cdc/environmental_health_toxicology/parse_air_quality.py CDC_OzoneCensusTract --mode=process

3. Import name: CDC_PM25County

command to download the file
============================

$ python3 scripts/us_cdc/environmental_health_toxicology/parse_air_quality.py CDC_PM25County --mode=download


Command to process the file
===========================

$ python3 scripts/us_cdc/environmental_health_toxicology/parse_air_quality.py CDC_PM25County --mode=process

4. Import name: CDC_OzoneCounty

command to download the file
============================

$ python3 scripts/us_cdc/environmental_health_toxicology/parse_air_quality.py CDC_OzoneCounty --mode=download


Command to process the file
===========================

$ python3 scripts/us_cdc/environmental_health_toxicology/parse_air_quality.py CDC_OzoneCounty --mode=process
104 changes: 104 additions & 0 deletions scripts/us_cdc/environmental_health_toxicology/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
{
"import_specifications": [
{
"import_name": "CDC_PM25CensusTract",
"curator_emails": [
"[email protected]"
],
"provenance_url": "https://data.cdc.gov/browse?category=Environmental+Health+%26+Toxicology",
"provenance_description": "Environmental Health Toxicology",
"scripts": [
"parse_air_quality.py CDC_PM25CensusTract"
],
"import_inputs": [
{
"template_mcf": "PM25CensusTractPollution.tmcf",
"cleaned_csv": "output/PM2.5CensusTract_0.csv"
},
{
"template_mcf": "PM25CensusTractPollution.tmcf",
"cleaned_csv": "output/PM2.5CensusTract_1.csv"
},
{
"template_mcf": "PM25CensusTractPollution.tmcf",
"cleaned_csv": "output/PM2.5CensusTract_2.csv"
},
{
"template_mcf": "PM25CensusTractPollution.tmcf",
"cleaned_csv": "output/PM2.5CensusTract_3.csv"
}

],
"cron_schedule": "0 1 1 * *"
},
{
"import_name": "CDC_OzoneCensusTract",
"curator_emails": [
"[email protected]"
],
"provenance_url": "https://data.cdc.gov/browse?category=Environmental+Health+%26+Toxicology",
"provenance_description": "Environmental Health Toxicology",
"scripts": [
"parse_air_quality.py CDC_OzoneCensusTract"
],
"import_inputs": [
{
"template_mcf": "OzoneCensusTractPollution.tmcf",
"cleaned_csv": "output/Census_Tract_Level_Ozone_Concentrations_0.csv"
},
{
"template_mcf": "OzoneCensusTractPollution.tmcf",
"cleaned_csv": "output/PM2.Census_Tract_Level_Ozone_Concentrations_1.csv"
},
{
"template_mcf": "OzoneCensusTractPollution.tmcf",
"cleaned_csv": "output/Census_Tract_Level_Ozone_Concentrations_2.csv"
},
{
"template_mcf": "OzoneCensusTractPollution.tmcf",
"cleaned_csv": "output/Census_Tract_Level_Ozone_Concentrations_3"
}

],
"cron_schedule": "0 1 1 * *"
},
{
"import_name": "CDC_PM25County",
"curator_emails": [
"[email protected]"
],
"provenance_url": "https://data.cdc.gov/browse?category=Environmental+Health+%26+Toxicology",
"provenance_description": "Environmental Health Toxicology",
"scripts": [
"parse_air_quality.py CDC_PM25County"
],
"import_inputs": [
{
"template_mcf": "PM25CountyPollution.tmcf",
"cleaned_csv": "output/PM25county.csv"
}

],
"cron_schedule": "0 1 1 * *"
},
{
"import_name": "CDC_OzoneCounty",
"curator_emails": [
"[email protected]"
],
"provenance_url": "https://data.cdc.gov/browse?category=Environmental+Health+%26+Toxicology",
"provenance_description": "Environmental Health Toxicology",
"scripts": [
"parse_air_quality.py CDC_OzoneCounty"
],
"import_inputs": [
{
"template_mcf": "OzoneCountyPollution.tmcf",
"cleaned_csv": "output/OzoneCounty.csv"
}

],
"cron_schedule": "0 1 1 * *"
}
]
}
Loading

0 comments on commit 6ea7a02

Please sign in to comment.