Grist-Data-Desk / STLoR

Code and methodology to produce the dataset in Grist and High Country News' investigation into state trust lands on reservations
Creative Commons Zero v1.0 Universal
0 stars 0 forks source link

feat: Integrate STLoRs from BIA-AIAN supplemental layer. #12

Closed parkerziegler closed 1 month ago

parkerziegler commented 1 month ago

This PR integrates state trust lands that intersect reservations from the BIA-AIAN supplemental layer; as such, it's the code side of #4. The primary goal here is to recreate the pre-activity match processing steps from METHODOLOGY.md—originally performed in QGIS—in Python. However, it comes with a few differences:

  1. We don't write intermediate outputs to the 02_States Overlapping Reservations Data or 03_States Merged Layers. We could do this if we deem it necessary or preferable, but I suspect most folks are only interested in the final dataset. The additional data is available on an aggregated basis in 04_All States/01d_Supplemental.geojson.
  2. We only run this code over state trust lands in New Mexico, North Dakota, and Colorado, the three states where state trust lands overlapped with reservations from the supplemental layer. Importantly, nothing about the implementation limits us from including more states if we want to later.
  3. We optimize the code to conform to the schema in 04_All States/02_Clipped.geojson. Rather than trying to integrate it with the various 01_InitialMerge files, we write the output of supplemental.py to 01d_Supplemental.geojson. We then concatenate that GeoDataFrame with 02_Clipped.geojson prior to the activity matching process.

A key challenge here was reverse engineering all of the column transformations, computations, and renamings that we performed in those early steps, which vary tremendously by state and rights type. That is a major barrier to true replication of this pipeline today, but this code is a start at what codifying those transformations in code could look like.