Skip to content

CaliforniaSchoolPerformance : Automation update - #2198

Open
kartik-s21 wants to merge 51 commits into
datacommonsorg:masterfrom
kartik-s21:ca-school-performance-automation
Open

CaliforniaSchoolPerformance : Automation update#2198
kartik-s21 wants to merge 51 commits into
datacommonsorg:masterfrom
kartik-s21:ca-school-performance-automation

Conversation

@kartik-s21

@kartik-s21 kartik-s21 commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Converts the CaliforniaSchoolPerformance import from a legacy manual script to an automated StatVar import with multi-year data support (2015–2019, 2021–2025; 2020 was cancelled due to COVID-19).

Key Changes

  • download.py: Downloads and unifies CAASPP research files across three different historical format eras (comma-delimited 2015–2019, caret-delimited 2021–2023, and updated 69-column caret format 2024–2025). Filters for state (00000/0000000) and county levels.
  • Configurations (config/): PV mapping, metadata configuration, and StatVar MCF covering grades 3–8, 11, 13 for ELA & Math across 55 demographic subgroups.
  • Manifest (manifest.json): Configured with an annual cron schedule (0 0 1 10 *) matching the CAASPP October release cadence.
  • Tests & Goldens: Added unit test test_california_school_performance.py and golden_summary_report.csv.
  • Documentation: Comprehensive README.md and run_download_process.sh script.

Verification & Testing

  • Unit tests pass: python3 -m unittest test_data/test_california_school_performance.py
  • Full multi-year run generated: 64,016 SVObs across 10 years and 59 geographic entities.
  • Lint / genmcf validation: 0 fatal errors, 0 errors, 100% node resolution.
  • Validation Output - link
  • Cloud Batch Job (test) - link

Related CL

Internal Google3 CL updating .textproto manifest, provenance .mcf, and import group test.

Code Review And Troubleshooting Report

  • CRA Report - link
  • PostMortem Report - link

@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 introduces an automated Data Commons import pipeline for California School Performance (CAASPP) academic data, including download scripts, configuration mappings, orchestration bash scripts, and unit tests. The review feedback highlights several areas for improvement: adding robust error handling in download.py to raise exceptions on failed downloads and prevent silent pipeline failures, wrapping year-range parsing in try-except blocks to handle malformed CLI inputs, making the state/county entity filtering logic more resilient to padding variations, and removing redundant individual-year processing in run_download_process.sh to optimize execution time.

Comment thread statvar_imports/us_education/california_school_performance/download.py Outdated
Comment thread statvar_imports/us_education/california_school_performance/download.py Outdated
- Add validation_config.json with 0.1 deletion threshold and golden check rules
- Add golden_observations.csv generated via validator_goldens.py against top 100k places
- Update golden_summary_report.csv with standardized stable schema property sets
- Add counters/california_school_performance_counters.csv and configure in manifest.json
- Register node_mcf in manifest.json for generated MCF staging to GCS
… filtering, and script optimization

- Raise RuntimeError if no files were successfully downloaded in download.py
- Add try-except to handle malformed year range format in parse_years
- Make state/county entity filtering robust to zero-padding variations using lstrip('0')
- Remove redundant individual-year processing loop in run_download_process.sh
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.

1 participant