Updated mapping and respective files with download script - #2203
Updated mapping and respective files with download script#2203smarthg-gi wants to merge 6 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors and documents the NCSES Employed College Graduates import pipeline. Key changes include adding a dynamic scraper and header normalizer script (download.py), updating the mapping configuration (pv_map.csv) with future years and header directives, introducing a validation configuration (validation_config.json), and significantly expanding the documentation in README.md. Feedback is provided regarding manifest.json, where running download.py directly without the python3 interpreter or a path prefix will cause execution failures in Unix/Linux environments.
Import Code Review: PR #2203 & Bug b/535027917PR: datacommonsorg/data#2203 ( Key Findings & Required Actions[P0] Validation Threshold Blocks Production Auto-Refresh
[P1] Missing Mandatory
|
[P0] Validation Threshold Blocks Production Auto-Refresh [P1] Missing Mandatory node_mcf in manifest.json [P1] Missing Mandatory Freshness / Date Validation [P1] Unit Test Suite Omitted from PR Commit [P2] Test Fixtures & Housekeeping [P3] Code Hygiene & Consistency Removed _retry_method and updated resolve_url() to use the public download_util.request_url(). Added #!/usr/bin/env python3 to the top of download.py |
Import name : NCSES_Employed_College_Grads_Import
Test job run: ncses-employed-college-grads-import-smarthg-20260908-060246
validation_output.csv: LINK
differ_summary.json: LINK
Note: Validation reflects 1 deletion and multiple modifications. All of these are justified and expected due to updates in the PVmap. These will be fixed with updates in the latest_version.txt once approved.
Summary
This PR refactors and fixes data mapping and download for the NCSES_Employed_College_Grads_Import.
Key Changes:
download.py): Automatically finds and downloads the latest survey file from the NSF website based on the table number, and cleans up year column headers (e.g. changing2023ato2023).pv_map.csv): Fixed mapping where overall group totals were mistakenly assigned to specific jobs. For example, the total count of college-educated women (~15.1M) was previously recorded as female engineers instead of the actual count of 154K.validation_config.json): Added validation checks, confirming all changes match the source survey.README.mdand other test files, metadata and manifest file