This PR represents the final major code change to support generation of the output datasets—aggregation by reservations. In effect, this models the aggregations performed in the last step of METHODOLOGY.md, Create summary spreadsheets.
A few notes on the implementation here:
I chose to represent rights_type and trust_name aggregates as lists / arrays rather than comma-separated strings. This may just be preference, but I like being able to interact with values that are (semantically) lists as lists rather than having to perform additional processing to split strings.
Our BIA-AIAN layers have multiple entries for certain tribes, namely those with reservation polygons in both the original layer and the Tribal Statistical Areas layer. To ensure we have 1 entry per reservation in the final output, we dissolve by reservation_name to combine the geometries of these layers (and the total computed acreage).
The Methodology describes using the Aggregate tool in QGIS to perform these aggregations. However, as the document points out, there is a lot of additional data processing here, e.g.,
Splitting by rights_type to compute rights_type-specific aggregates (i.e., acreage and parcel count)
Joining the reservation acreage
(Implicitly) A lot of column renaming and subsetting
This PR codifies all of these steps in code but, as you can tell, this is much more intensive than just running one tool in QGIS.
This PR represents the final major code change to support generation of the output datasets—aggregation by reservations. In effect, this models the aggregations performed in the last step of METHODOLOGY.md, Create summary spreadsheets.
A few notes on the implementation here:
rights_type
andtrust_name
aggregates as lists / arrays rather than comma-separated strings. This may just be preference, but I like being able to interact with values that are (semantically) lists as lists rather than having to perform additional processing to split strings.reservation_name
to combine the geometries of these layers (and the total computed acreage).rights_type
to computerights_type
-specific aggregates (i.e., acreage and parcel count)This PR codifies all of these steps in code but, as you can tell, this is much more intensive than just running one tool in QGIS.