Grist-Data-Desk / land-grab-2

Code and methodology to produce the dataset in Grist's Misplaced Trust investigation
https://grist.org/project/indigenous/land-grant-universities-indigenous-lands-fossil-fuels
Creative Commons Zero v1.0 Universal
14 stars 2 forks source link

fix: Ensure ID parcels do not have "misc" in activity fields. #51

Closed parkerziegler closed 10 months ago

parkerziegler commented 10 months ago

A quick fix to ensure we no longer include "misc" in the acitivity field for Idaho parcels. The root cause of this was rows in Miscellaneous.shp and Easements.shp with NULL values for the Type and EasementPu columns, respectively. In the case of NULL values, we compute an activity_name of None and fallback to the original activity.name in the final return, which in this case is "misc".

The fix here is to actually correct the data, using the string "Miscellaneous" for NULL values in the Type column of Miscellaneous.shp and "Easements" for NULL values in the EasementPu column for Easements.shp.

One last thing: I noticed we were using the column name Sale_Status as the activity column for Timber.shp, but that column is missing from that dataset. I assume we mean the column Sale_Statu? This PR includes that update as well.