Skip to main content

School-derived area products for DepEd PSGC, governance, and legislative geographies.

Project description

deped-geos

deped-geos builds school-derived area products for four artifact hierarchies:

  • Strict PSGC stats by region, province/HUC, city/municipality, and barangay.
  • Normalized PSGC stats by region, province, city, municipality, locality, and barangay.
  • DepEd governance stats starting at region, with derived boundaries for division and school district.
  • Legislative stats starting at region, with derived boundaries for legislative district.

The producer consumes psgc-maps artifacts and deped-dataset/db.sqlite3. It writes Parquet tables, partitioned membership data, GeoParquet boundaries, and a manifest with source fingerprints, timings, and geometry policy.

Quick start

uv sync --all-groups
just check
uv run --group geo deped-geos build --output-dir artifacts-current
uv run deped-geos status --output-dir artifacts-current

The CLI skips gracefully when the real external inputs are not present:

uv run --group geo deped-geos build --output-dir artifacts-current
uv run deped-geos status --output-dir artifacts-current

Derived boundary GeoParquet files require the geo dependency group. A plain uv run deped-geos build can still write stats, memberships, audit, and the manifest, but boundary entries in manifest.json are marked skipped: "geopandas is not installed" and the boundary row counts stay zero.

Outputs

artifacts-current/ contains:

  • manifest.json
  • school_spine.parquet
  • school_spine_current.parquet
  • school_area_source_universe.parquet
  • school_area_stats.parquet
  • school_area_assignment_audit.parquet
  • school_area_memberships/
  • school_area_region_group_components.parquet
  • school_area_division_coverage.parquet
  • school_area_division_coverage_audit.parquet
  • school_area_denominator_coverage.parquet
  • school_area_insight_context.parquet
  • school_area_display_subdivisions.parquet
  • school_id_crosswalk.parquet
  • school_area_boundaries_governance_division.parquet
  • school_area_boundaries_governance_school_district.parquet
  • school_area_boundaries_legislative_legis_district.parquet
  • school_area_boundaries_*_current.parquet
  • school_coordinate_boundary_qa_current.parquet
  • school_coordinate_boundary_qa_summary_current.parquet

Stats, assignment, audit, and boundaries are keyed by school_year_id. The manifest marks the latest year as current.

CSV exports are optional: run just build --export-csv when a downstream handoff needs CSV copies.

school_area_stats.parquet owns the complete group universe for every (school_year_id, hierarchy, level, group_id): current-year group counts, denominators, labels, and parent ids belong there. Boundary GeoParquet files own renderable dissolved geometry only. A current stats row without a matching school_area_boundaries_*_current.parquet row is valid and means the group is known, but has no display geometry for consumers to draw.

school_area_stats.parquet also includes planning ratios such as students_per_school, students_per_capita, population_per_school, school_density, plus urban_barangay_share and barangay_urbanicity_band. These are producer-owned artifact fields; notebooks and downstream consumers should read them rather than recomputing them at runtime.

school_area_source_universe.parquet preserves PSGC labels, parent ancestry, boundary mapping, and denominator seeds for no-school groups so boundary-first maps can render known geography without downstream inference.

Docs and notebooks

uv run zensical build
just notebooks
just check-full

The local Marimo notebooks inspect artifacts-current/ read-only and render maps in-cell. They do not import deped-glue or expose a server/API contract.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

deped_geos-0.1.0.tar.gz (291.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

deped_geos-0.1.0-py3-none-any.whl (123.3 kB view details)

Uploaded Python 3

File details

Details for the file deped_geos-0.1.0.tar.gz.

File metadata

  • Download URL: deped_geos-0.1.0.tar.gz
  • Upload date:
  • Size: 291.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for deped_geos-0.1.0.tar.gz
Algorithm Hash digest
SHA256 970ed93b339700fb0e9c8b9598941ff1d80c7ebec52f02aebe7591984f767fb7
MD5 a1a7d69d607d690d32a529155d593d1f
BLAKE2b-256 b1c0e9b82bdcb739df3874205eb24be9d3f76129099db8e3c69a384a78ef8896

See more details on using hashes here.

File details

Details for the file deped_geos-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: deped_geos-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 123.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for deped_geos-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2061117ee15e8a45962eb29fb4faa3d34159b346837df6be745e69ce1d1c1b89
MD5 e5f2c2774b9d6729459237588ca2495c
BLAKE2b-256 499547cb7d00d404c8f66a081b73feab333e38ef7ab07875718293c188d777ee

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page