Skip to content

feat: Add livestock census data processing pipeline#814

Open
neha222222 wants to merge 2 commits intocore-stack-org:mainfrom
neha222222:feature/livestock-census-pipeline
Open

feat: Add livestock census data processing pipeline#814
neha222222 wants to merge 2 commits intocore-stack-org:mainfrom
neha222222:feature/livestock-census-pipeline

Conversation

@neha222222
Copy link
Copy Markdown

Implements village-level livestock census data pipeline for issue #222:

  • data_loader.py: Downloads and parses 20th Livestock Census (DAHD) xlsx with all 4 sheets (Rural/Urban, Male/Female), normalizes columns, and aggregates male+female counts per village

  • village_matcher.py: Fuzzy matches livestock census village names to CoRE Stack village boundaries using exact + Levenshtein distance matching. Reports match stats per state.

  • pipeline.py: End-to-end CLI pipeline that downloads data, aggregates, matches to boundaries, and exports CSV with match statistics.

Data source: DAHD 20th Livestock Census
(VillageAndWardLevelDataMale-Female.xlsx)

Implements village-level livestock census data pipeline for issue core-stack-org#222:

- data_loader.py: Downloads and parses 20th Livestock Census (DAHD)
  xlsx with all 4 sheets (Rural/Urban, Male/Female), normalizes columns,
  and aggregates male+female counts per village

- village_matcher.py: Fuzzy matches livestock census village names to
  CoRE Stack village boundaries using exact + Levenshtein distance
  matching. Reports match stats per state.

- pipeline.py: End-to-end CLI pipeline that downloads data, aggregates,
  matches to boundaries, and exports CSV with match statistics.

Data source: DAHD 20th Livestock Census
(VillageAndWardLevelDataMale-Female.xlsx)
Adds gee_export.py that completes the pipeline:
- Joins matched livestock data with village boundary geometries
- Ensures EPSG:4326 CRS and valid geometry
- Converts enriched GeoDataFrame to ee.FeatureCollection
- Publishes as Earth Engine vector asset with livestock attributes
- Syncs to GeoServer and saves layer metadata to DB
- Supports filtering/aggregation by livestock type in GEE

Also supports GeoJSON export for local 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.

1 participant