Skip to content

Automation of import Finland_Census #2087

Open
smarthg-gi wants to merge 4 commits into
datacommonsorg:masterfrom
smarthg-gi:Finland_Census_automation
Open

Automation of import Finland_Census #2087
smarthg-gi wants to merge 4 commits into
datacommonsorg:masterfrom
smarthg-gi:Finland_Census_automation

Conversation

@smarthg-gi

@smarthg-gi smarthg-gi commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Import name = Finland_Census
PR checklist = Doc

Overview

Automation of Finland Demographics Dataset ( Finland_Census) under statvar_imports/.

Key Changes

  • Addition of data_download.py which leverages existing util/download_util.py for data download.
  • Updated run.sh and manifest.json with the correct cron schedule and file paths to trigger the download and processing of the data.
  • Executed unit test suite and sample test fixtures under test_data/.

Verification & Validation Proofs

Local CI Presubmit: ./run_tests.sh -a passes 100% (unit tests + yapf --style=google formatting check).
Verification: stat_var_processor.py executed against test_data/finland_census_input.csv; git diff test_data/ is clean.
Data Commons Lint Check: Executed java -jar datacommons-import-tool.jar lint output_files/*.csv.
Result: 0 errors, 0 warnings. All generated StatVar DCIDs and TMCF references conform to schema rules.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request automates the import process for the Finland Demographics Dataset by introducing a data_download.py script to fetch data from the Statistics Finland PxWeb API and a run.sh script to orchestrate the download and processing. The README.md and manifest.json have been updated to document and support this automated refresh. Feedback on the changes suggests using the standard csv module in data_download.py to robustly parse headers containing commas, and quoting the wildcard pattern in run.sh to prevent unintended shell expansion.

Comment thread statvar_imports/finland_census/data_download.py Outdated
Comment thread statvar_imports/finland_census/run.sh Outdated
@smarthg-gi smarthg-gi changed the title Automation of import refresh Automation of import Finland_Census Jul 8, 2026
@pulkeet-wq

Copy link
Copy Markdown
Contributor

@smarthg-gi : Please add golden checks to the validation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants