-
Notifications
You must be signed in to change notification settings - Fork 147
Autorefresh pr for child_birth import #1794
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
Merged
shapateriya
merged 5 commits into
datacommonsorg:master
from
shapateriya:child_birth_dec18
Dec 23, 2025
Merged
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
84291f8
Autorefresh pr for child_birth import
shapateriya 667f34c
Addressed core team comments
shapateriya f544a09
updated test data files
shapateriya ed43ad7
Merge branch 'master' into child_birth_dec18
shapateriya b496a7b
Merge branch 'master' into child_birth_dec18
shapateriya File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| # child_birth | ||
|
|
||
| The data set contains USA birth data | ||
|
|
||
| Download: | ||
| Data download URL : https://data.cdc.gov/api/views/hmz2-vwda/rows.csv?accessType=DOWNLOAD | ||
|
|
||
| ###Execution steps : | ||
|
|
||
| To Download, run: | ||
|
|
||
| python3 download_util_script.py --download_url=https://data.cdc.gov/api/views/hmz2-vwda/rows.csv?accessType=DOWNLOAD --output_folder=input_files/ | ||
|
|
||
| Note : The downloaded file will be saved as "input_files/rows.csv" | ||
|
|
||
| ###How to run: | ||
|
|
||
| python3 stat_var_processor.py | ||
| --input_data=../../statvar_imports/child_birth/input_files/*.csv \ | ||
| --pv_map=../../statvar_imports/child_birth/pv_map.csv \ | ||
| --places_resolved_csv=../../statvar_imports/child_birth/place_mapping.csv \ | ||
|
shapateriya marked this conversation as resolved.
Outdated
|
||
| --config_file=../../statvar_imports/child_birth/metadata.csv \ | ||
| --existing_statvar_mcf=gs://unresolved_mcf/scripts/statvar/stat_vars.mcf \ | ||
| --output_path=../../statvar_imports/child_birth/output_files/child_birth | ||
|
|
||
|
|
||
|
|
||
| ###Example | ||
|
|
||
| To Process the files, Run: | ||
|
|
||
| Execute the script inside the folder "/data/tools/statvar_importer/" | ||
|
shapateriya marked this conversation as resolved.
Outdated
|
||
|
|
||
| ``` | ||
| python3 stat_var_processor.py | ||
| --input_data=../../statvar_imports/child_birth/input_files/*.csv | ||
| --pv_map=../../statvar_imports/child_birth/pvmap.csv | ||
| --places_resolved_csv=../../statvar_imports/child_birth/places_resolved.csv | ||
| --config_file=../../statvar_imports/child_birth/metadata.csv | ||
| --existing_statvar_mcf=gs://unresolved_mcf/scripts/statvar/stat_vars.mcf | ||
| --output_path=../../statvar_imports/child_birth/output_files/child_birth | ||
| ``` | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| { | ||
| "import_specifications": [ | ||
| { | ||
| "import_name": "usa_child_birth", | ||
| "curator_emails": [ | ||
| "support@datacommons.org" | ||
| ], | ||
| "provenance_url": "https://www.cdc.gov/nchs/nvss/vsrr/provisional-tables.html", | ||
| "provenance_description": "The data set contains USA birth data", | ||
| "scripts": [ | ||
| "../../util/download_util_script.py --download_url=https://data.cdc.gov/api/views/hmz2-vwda/rows.csv?accessType=DOWNLOAD --output_folder=input_files/", | ||
| "../../tools/statvar_importer/stat_var_processor.py --input_data=input_files/*.csv --pv_map=pvmap.csv --config_file=metadata.csv --places_resolved_csv=places_resolved.csv --existing_statvar_mcf=gs://unresolved_mcf/scripts/statvar/stat_vars.mcf --output_path=output_files/child_birth" | ||
| ], | ||
| "source_files": [ | ||
| "input_files/*.csv" | ||
| ], | ||
| "import_inputs": [ | ||
| { | ||
| "template_mcf": "output_files/child_birth.tmcf", | ||
| "cleaned_csv": "output_files/child_birth.csv" | ||
| } | ||
| ], | ||
| "cron_schedule": "0 07 * * 2" | ||
| } | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| parameter,value | ||
| #places_within,country/USA | ||
| output_columns,"observationAbout,observationDate,value,variableMeasured,observationPeriod" | ||
| header_rows,1 | ||
| mapped_columns,5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| place_name,dcid | ||
| UNITED STATES,country/USA | ||
| ALABAMA,geoId/01 | ||
| ALASKA,geoId/02 | ||
| ARIZONA,geoId/04 | ||
| ARKANSAS,geoId/05 | ||
| CALIFORNIA,geoId/06 | ||
| COLORADO,geoId/08 | ||
| CONNECTICUT,geoId/09 | ||
| DELAWARE,geoId/10 | ||
| DISTRICT OF COLUMBIA,geoId/11 | ||
| FLORIDA,geoId/12 | ||
| GEORGIA,geoId/13 | ||
| HAWAII,geoId/15 | ||
| IDAHO,geoId/16 | ||
| ILLINOIS,geoId/17 | ||
| INDIANA,geoId/18 | ||
| IOWA,geoId/19 | ||
| KANSAS,geoId/20 | ||
| KENTUCKY,geoId/21 | ||
| LOUISIANA,geoId/22 | ||
| MAINE,geoId/23 | ||
| MARYLAND,geoId/24 | ||
| MASSACHUSETTS,geoId/25 | ||
| MICHIGAN,geoId/26 | ||
| MINNESOTA,geoId/27 | ||
| MISSISSIPPI,geoId/28 | ||
| MISSOURI,geoId/29 | ||
| MONTANA,geoId/30 | ||
| NEBRASKA,geoId/31 | ||
| NEVADA,geoId/32 | ||
| NEW HAMPSHIRE,geoId/33 | ||
| NEW JERSEY,geoId/34 | ||
| NEW MEXICO,geoId/35 | ||
| NEW YORK,geoId/36 | ||
| NORTH CAROLINA,geoId/37 | ||
| NORTH DAKOTA,geoId/38 | ||
| OHIO,geoId/39 | ||
| OKLAHOMA,geoId/40 | ||
| OREGON,geoId/41 | ||
| PENNSYLVANIA,geoId/42 | ||
| RHODE ISLAND,geoId/44 | ||
| SOUTH CAROLINA,geoId/45 | ||
| SOUTH DAKOTA,geoId/46 | ||
| TENNESSEE,geoId/47 | ||
| TEXAS,geoId/48 | ||
| UTAH,geoId/49 | ||
| VERMONT,geoId/50 | ||
| VIRGINIA,geoId/51 | ||
| WASHINGTON,geoId/53 | ||
| WEST VIRGINIA,geoId/54 | ||
| WISCONSIN,geoId/55 | ||
| WYOMING,geoId/56 | ||
| PUERTO RICO,geoId/72 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| key,p1,v1,p2,v2,,,, | ||
|
shapateriya marked this conversation as resolved.
Outdated
|
||
| Number of Live Births,medicalStatus,LiveBirth,populationType,BirthEvent,measuredProperty,count,statType,measuredValue | ||
| Number of Deaths,populationType,MortalityEvent,statType,measuredValue,measuredProperty,count,, | ||
| Number of Infant Deaths,populationType,MortalityEvent,age,YearsUpto1,statType,measuredValue,measuredProperty,count | ||
| Month,Month,{Data},,,,,, | ||
| Year,Year,{Data},,,,,, | ||
| Data Value,value,{Number},observationDate,{Month} {Year},,,, | ||
|
SandeepTuniki marked this conversation as resolved.
|
||
| Monthly,observationPeriod,P1M,,,,,, | ||
| 12 Month-ending,observationPeriod,P1Y,,,,,, | ||
| State,observationAbout,{Data},,,,,, | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.