diff --git a/scripts/us_cdc/heat_related_illness/README.md b/scripts/us_cdc/heat_related_illness/README.md index 02d9810793..a24bed48bf 100644 --- a/scripts/us_cdc/heat_related_illness/README.md +++ b/scripts/us_cdc/heat_related_illness/README.md @@ -7,7 +7,7 @@ The source data is downloaded manually from the EPH [website](https://ephtrackin To clean the source data, run: ```bash -python clean_data.py --input_path=source_data/ --output_path= +python3 clean_data.py --input_path=source_data/ --output_path= ``` ## Generating artifacts at a State level: @@ -15,7 +15,7 @@ The artifacts can be generated from the cleaned data. To generate `cleaned.csv`, `output.mcf` run: ```bash -python preprocess.py --input_path= --config_path= --output_path= +python3 preprocess.py --input_path= --config_path= --output_path= ``` ## Aggregating at a Country level @@ -23,7 +23,7 @@ At a country level, aggregation is performed by summing over the state level `cl To aggregate run: ```bash -python aggregate.py --input_path= --output_path= +python3 aggregate.py --input_path= --output_path= ``` ## Data Caveats: diff --git a/scripts/us_cdc/heat_related_illness/preprocess_test.py b/scripts/us_cdc/heat_related_illness/preprocess_test.py index 74ee1857f5..b4a114024c 100644 --- a/scripts/us_cdc/heat_related_illness/preprocess_test.py +++ b/scripts/us_cdc/heat_related_illness/preprocess_test.py @@ -32,7 +32,7 @@ def test_csv(self): input_path = os.path.join(_SCRIPT_PATH, 'testdata', 'cleaned_data') subprocess.call([ - 'python', preprocess_path, f'--input_path={input_path}', + 'python3', preprocess_path, f'--input_path={input_path}', f'--config_path={config_path}', f'--output_path={tmp_dir}' ]) diff --git a/scripts/us_cdc/heat_related_illness/source_data/deaths.html b/scripts/us_cdc/heat_related_illness/source_data/deaths.html index da527b7f72..6daa025a82 100644 --- a/scripts/us_cdc/heat_related_illness/source_data/deaths.html +++ b/scripts/us_cdc/heat_related_illness/source_data/deaths.html @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:544070b014b7de23c226956ff071aee92a930550385dc85568cf9860b26ba9ef -size 576892 +oid sha256:1f09b463db7084611270713e6ff5005a0bc0252cf65eac2be0c36339fb0ffbbe +size 531448 diff --git a/scripts/us_cdc/heat_related_illness/source_data/edVisits.html b/scripts/us_cdc/heat_related_illness/source_data/edVisits.html index 38c2d158b7..e756416a65 100644 --- a/scripts/us_cdc/heat_related_illness/source_data/edVisits.html +++ b/scripts/us_cdc/heat_related_illness/source_data/edVisits.html @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:505e19958e13badb7fdb1181b734a39dbd3983d1b7360ed179f5ff73e10c08a3 -size 408766 +oid sha256:8e871c68c5cd42a5dbac3bfd85c61f06aeb57f9a78b9a36cbb82858bc718e976 +size 371400 diff --git a/scripts/us_cdc/heat_related_illness/source_data/edVisits_age.html b/scripts/us_cdc/heat_related_illness/source_data/edVisits_age.html index 3ae349a2bc..ab532d1132 100644 --- a/scripts/us_cdc/heat_related_illness/source_data/edVisits_age.html +++ b/scripts/us_cdc/heat_related_illness/source_data/edVisits_age.html @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:34023718071df9574786685f6f0b59bc6b54bff271d308da41a9361e72849a19 -size 1011165 +oid sha256:e49775fec017871d6cff484b290c6b8057d8f8d632a8e554cf40ec334a9be9cd +size 1021155 diff --git a/scripts/us_cdc/heat_related_illness/source_data/edVisits_age_gender.html b/scripts/us_cdc/heat_related_illness/source_data/edVisits_age_gender.html index ac75c2ca2a..1546ebb184 100644 --- a/scripts/us_cdc/heat_related_illness/source_data/edVisits_age_gender.html +++ b/scripts/us_cdc/heat_related_illness/source_data/edVisits_age_gender.html @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e11ea8aff05b101de79bc21c78ad995d07c1a56f2d3075e4ac92edb9287e021f -size 2036624 +oid sha256:928cef9e8f9c3f33f6737b47ae233968bbf7e5920b5de3c2b6f4d490a6241c24 +size 2128053 diff --git a/scripts/us_cdc/heat_related_illness/source_data/edVisits_gender.html b/scripts/us_cdc/heat_related_illness/source_data/edVisits_gender.html index cd40c57d59..1218ef4e61 100644 --- a/scripts/us_cdc/heat_related_illness/source_data/edVisits_gender.html +++ b/scripts/us_cdc/heat_related_illness/source_data/edVisits_gender.html @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c9a40f820a3f957dd6d96a23658909b8c7381633c748b611f40610cdec634690 -size 582030 +oid sha256:7e2e337746be2eb6bf7ab4fb6d413535210b5f35ab5ec1bc6c13c1e2e88a2db8 +size 558383 diff --git a/scripts/us_cdc/heat_related_illness/source_data/hospitalizations.html b/scripts/us_cdc/heat_related_illness/source_data/hospitalizations.html index 0ab30eb70f..e969334b0e 100644 --- a/scripts/us_cdc/heat_related_illness/source_data/hospitalizations.html +++ b/scripts/us_cdc/heat_related_illness/source_data/hospitalizations.html @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f0c5ba42d55e9fb8de023a55c967bd5ae98251642665d70de44943f6a0e0eec7 -size 452647 +oid sha256:bd6ca4b645873c378d5d0f7004119f4299e1b2891225560eab882581fba08d41 +size 414256 diff --git a/scripts/us_cdc/heat_related_illness/source_data/hospitalizations_age.html b/scripts/us_cdc/heat_related_illness/source_data/hospitalizations_age.html index e2b7b6fd8f..9581071da2 100644 --- a/scripts/us_cdc/heat_related_illness/source_data/hospitalizations_age.html +++ b/scripts/us_cdc/heat_related_illness/source_data/hospitalizations_age.html @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:caab03b2eb1f545ad74477e96ce4bdc683a94ec4ad300074aacf7a168356d5a6 -size 1296196 +oid sha256:aced6fbfa4e2fc1347599b1b5505b4f39b298d312405748909c3ff1dd45adefa +size 1298990 diff --git a/scripts/us_cdc/heat_related_illness/source_data/hospitalizations_age_gender.html b/scripts/us_cdc/heat_related_illness/source_data/hospitalizations_age_gender.html index d460705d90..8be675b1ad 100644 --- a/scripts/us_cdc/heat_related_illness/source_data/hospitalizations_age_gender.html +++ b/scripts/us_cdc/heat_related_illness/source_data/hospitalizations_age_gender.html @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8ac7c398721167dc004757d5c99f0719d64c1eaa3a57f9902bbb5b955f25cf04 -size 2734945 +oid sha256:1e6cdca8ba2a0d4f8ddee23038dd58d1bbf971d60e20292a0e7c6d66f5073b25 +size 2808029 diff --git a/scripts/us_cdc/heat_related_illness/source_data/hospitalizations_gender.html b/scripts/us_cdc/heat_related_illness/source_data/hospitalizations_gender.html index 78234b67e6..1c6e1ba628 100644 --- a/scripts/us_cdc/heat_related_illness/source_data/hospitalizations_gender.html +++ b/scripts/us_cdc/heat_related_illness/source_data/hospitalizations_gender.html @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:dd0a0e7fe47c6dfa18ea134313b3f3e1a4d9fe8cd6f3e1a5e324069fc988c315 -size 694617 +oid sha256:935f394ea3a44e9a3db1220a37382591848f13f751b0fb490af3602bd4313692 +size 668859 diff --git a/scripts/us_cdc/heat_related_illness/testdata/expected.csv b/scripts/us_cdc/heat_related_illness/testdata/expected.csv index ad01c5d42c..6a23ca43ca 100644 --- a/scripts/us_cdc/heat_related_illness/testdata/expected.csv +++ b/scripts/us_cdc/heat_related_illness/testdata/expected.csv @@ -1,4 +1,24 @@ Year,Geo,StatVar,Quantity +2000-09,geoId/06,Count_MedicalConditionIncident_SummerSeason_ConditionHeatStress_PatientDeceased,41.0 +2001-09,geoId/06,Count_MedicalConditionIncident_SummerSeason_ConditionHeatStress_PatientDeceased,25.0 +2002-09,geoId/06,Count_MedicalConditionIncident_SummerSeason_ConditionHeatStress_PatientDeceased,43.0 +2003-09,geoId/06,Count_MedicalConditionIncident_SummerSeason_ConditionHeatStress_PatientDeceased,38.0 +2004-09,geoId/06,Count_MedicalConditionIncident_SummerSeason_ConditionHeatStress_PatientDeceased,33.0 +2005-09,geoId/06,Count_MedicalConditionIncident_SummerSeason_ConditionHeatStress_PatientDeceased,62.0 +2006-09,geoId/06,Count_MedicalConditionIncident_SummerSeason_ConditionHeatStress_PatientDeceased,188.0 +2007-09,geoId/06,Count_MedicalConditionIncident_SummerSeason_ConditionHeatStress_PatientDeceased,67.0 +2008-09,geoId/06,Count_MedicalConditionIncident_SummerSeason_ConditionHeatStress_PatientDeceased,42.0 +2009-09,geoId/06,Count_MedicalConditionIncident_SummerSeason_ConditionHeatStress_PatientDeceased,54.0 +2010-09,geoId/06,Count_MedicalConditionIncident_SummerSeason_ConditionHeatStress_PatientDeceased,39.0 +2011-09,geoId/06,Count_MedicalConditionIncident_SummerSeason_ConditionHeatStress_PatientDeceased,26.0 +2012-09,geoId/06,Count_MedicalConditionIncident_SummerSeason_ConditionHeatStress_PatientDeceased,61.0 +2013-09,geoId/06,Count_MedicalConditionIncident_SummerSeason_ConditionHeatStress_PatientDeceased,66.0 +2014-09,geoId/06,Count_MedicalConditionIncident_SummerSeason_ConditionHeatStress_PatientDeceased,47.0 +2015-09,geoId/06,Count_MedicalConditionIncident_SummerSeason_ConditionHeatStress_PatientDeceased,49.0 +2016-09,geoId/06,Count_MedicalConditionIncident_SummerSeason_ConditionHeatStress_PatientDeceased,67.0 +2017-09,geoId/06,Count_MedicalConditionIncident_SummerSeason_ConditionHeatStress_PatientDeceased,98.0 +2018-09,geoId/06,Count_MedicalConditionIncident_SummerSeason_ConditionHeatStress_PatientDeceased,98.0 +2019-09,geoId/06,Count_MedicalConditionIncident_SummerSeason_ConditionHeatStress_PatientDeceased,57.0 2005-09,geoId/06,Count_MedicalConditionIncident_0To4Years_SummerSeason_Male_ConditionHeatStress_VisitedEmergencyDepartment,55.0 2005-09,geoId/06,Count_MedicalConditionIncident_0To4Years_SummerSeason_Female_ConditionHeatStress_VisitedEmergencyDepartment,42.0 2005-09,geoId/06,Count_MedicalConditionIncident_5To14Years_SummerSeason_Male_ConditionHeatStress_VisitedEmergencyDepartment,141.0 @@ -329,23 +349,3 @@ Year,Geo,StatVar,Quantity 2018-09,geoId/06,Count_MedicalConditionIncident_35To64Years_SummerSeason_Female_ConditionHeatStress_PatientHospitalized,114.0 2018-09,geoId/06,Count_MedicalConditionIncident_65OrMoreYears_SummerSeason_Male_ConditionHeatStress_PatientHospitalized,285.0 2018-09,geoId/06,Count_MedicalConditionIncident_65OrMoreYears_SummerSeason_Female_ConditionHeatStress_PatientHospitalized,199.0 -2000-09,geoId/06,Count_MedicalConditionIncident_SummerSeason_ConditionHeatStress_PatientDeceased,41.0 -2001-09,geoId/06,Count_MedicalConditionIncident_SummerSeason_ConditionHeatStress_PatientDeceased,25.0 -2002-09,geoId/06,Count_MedicalConditionIncident_SummerSeason_ConditionHeatStress_PatientDeceased,43.0 -2003-09,geoId/06,Count_MedicalConditionIncident_SummerSeason_ConditionHeatStress_PatientDeceased,38.0 -2004-09,geoId/06,Count_MedicalConditionIncident_SummerSeason_ConditionHeatStress_PatientDeceased,33.0 -2005-09,geoId/06,Count_MedicalConditionIncident_SummerSeason_ConditionHeatStress_PatientDeceased,62.0 -2006-09,geoId/06,Count_MedicalConditionIncident_SummerSeason_ConditionHeatStress_PatientDeceased,188.0 -2007-09,geoId/06,Count_MedicalConditionIncident_SummerSeason_ConditionHeatStress_PatientDeceased,67.0 -2008-09,geoId/06,Count_MedicalConditionIncident_SummerSeason_ConditionHeatStress_PatientDeceased,42.0 -2009-09,geoId/06,Count_MedicalConditionIncident_SummerSeason_ConditionHeatStress_PatientDeceased,54.0 -2010-09,geoId/06,Count_MedicalConditionIncident_SummerSeason_ConditionHeatStress_PatientDeceased,39.0 -2011-09,geoId/06,Count_MedicalConditionIncident_SummerSeason_ConditionHeatStress_PatientDeceased,26.0 -2012-09,geoId/06,Count_MedicalConditionIncident_SummerSeason_ConditionHeatStress_PatientDeceased,61.0 -2013-09,geoId/06,Count_MedicalConditionIncident_SummerSeason_ConditionHeatStress_PatientDeceased,66.0 -2014-09,geoId/06,Count_MedicalConditionIncident_SummerSeason_ConditionHeatStress_PatientDeceased,47.0 -2015-09,geoId/06,Count_MedicalConditionIncident_SummerSeason_ConditionHeatStress_PatientDeceased,49.0 -2016-09,geoId/06,Count_MedicalConditionIncident_SummerSeason_ConditionHeatStress_PatientDeceased,67.0 -2017-09,geoId/06,Count_MedicalConditionIncident_SummerSeason_ConditionHeatStress_PatientDeceased,98.0 -2018-09,geoId/06,Count_MedicalConditionIncident_SummerSeason_ConditionHeatStress_PatientDeceased,98.0 -2019-09,geoId/06,Count_MedicalConditionIncident_SummerSeason_ConditionHeatStress_PatientDeceased,57.0 diff --git a/scripts/us_cdc/heat_related_illness/testdata/expected_output.mcf b/scripts/us_cdc/heat_related_illness/testdata/expected_output.mcf index d4b78374a4..9d634c2881 100644 --- a/scripts/us_cdc/heat_related_illness/testdata/expected_output.mcf +++ b/scripts/us_cdc/heat_related_illness/testdata/expected_output.mcf @@ -1,3 +1,12 @@ +Node: dcid:Count_MedicalConditionIncident_SummerSeason_ConditionHeatStress_PatientDeceased +populationType: dcs:MedicalConditionIncident +medicalStatus: dcs:PatientDeceased +medicalCondition: dcs:HeatStress +climaticSeason: dcs:SummerSeason +measuredProperty: dcs:count +statType: dcs:measuredValue +typeOf: dcs:StatisticalVariable + Node: dcid:Count_MedicalConditionIncident_0To4Years_SummerSeason_Male_ConditionHeatStress_VisitedEmergencyDepartment populationType: dcs:MedicalConditionIncident medicalStatus: dcs:VisitedEmergencyDepartment @@ -218,12 +227,3 @@ typeOf: dcs:StatisticalVariable age: [65 - Years] gender: dcs:Female -Node: dcid:Count_MedicalConditionIncident_SummerSeason_ConditionHeatStress_PatientDeceased -populationType: dcs:MedicalConditionIncident -medicalStatus: dcs:PatientDeceased -medicalCondition: dcs:HeatStress -climaticSeason: dcs:SummerSeason -measuredProperty: dcs:count -statType: dcs:measuredValue -typeOf: dcs:StatisticalVariable -