From 27721f020fe91944f732a0a7db211b51969d3ccd Mon Sep 17 00:00:00 2001 From: Sudhisha K Date: Thu, 2 Jan 2025 06:13:36 +0000 Subject: [PATCH] CDC_Environmental_Health_Toxicology_Refresh --- .../manifest.json | 104 ++++++++++++++++++ .../parse_air_quality.py | 1 - 2 files changed, 104 insertions(+), 1 deletion(-) create mode 100644 scripts/us_cdc/environmental_health_toxicology/manifest.json diff --git a/scripts/us_cdc/environmental_health_toxicology/manifest.json b/scripts/us_cdc/environmental_health_toxicology/manifest.json new file mode 100644 index 000000000..d23e915ef --- /dev/null +++ b/scripts/us_cdc/environmental_health_toxicology/manifest.json @@ -0,0 +1,104 @@ +{ + "import_specifications": [ + { + "import_name": "CDC_PM25CensusTract", + "curator_emails": [ + "sudhisha@google.com" + ], + "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 2 * *" + }, + { + "import_name": "CDC_OzoneCensusTract", + "curator_emails": [ + "sudhisha@google.com" + ], + "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.csv" + } + + ], + "cron_schedule": "0 1 3 * *" + }, + { + "import_name": "CDC_PM25County", + "curator_emails": [ + "sudhisha@google.com" + ], + "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 4 * *" + }, + { + "import_name": "CDC_OzoneCounty", + "curator_emails": [ + "sudhisha@google.com" + ], + "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 5 * *" + } + ] + } diff --git a/scripts/us_cdc/environmental_health_toxicology/parse_air_quality.py b/scripts/us_cdc/environmental_health_toxicology/parse_air_quality.py index 61571aeac..2a0dba061 100644 --- a/scripts/us_cdc/environmental_health_toxicology/parse_air_quality.py +++ b/scripts/us_cdc/environmental_health_toxicology/parse_air_quality.py @@ -207,7 +207,6 @@ def clean_air_quality_data(file_path, output_file, importname): elif "County" in file and "Ozone" in file: data["statefips"] = data["statefips"].astype( str).str.zfill(2) - print("checkingggg") data["countyfips"] = data["countyfips"].astype( str).str.zfill(3) data["dcid"] = "geoId/" + data["statefips"] + data[