catalyst-cooperative / pudl

The Public Utility Data Liberation Project provides analysis-ready energy system data to climate advocates, researchers, policymakers, and journalists.
https://catalyst.coop/pudl
MIT License
475 stars 109 forks source link

Treat FIPS codes as strings everywhere #1013

Closed zaneselvans closed 3 years ago

zaneselvans commented 3 years ago

We have State, County, and Census Tract level FIPS codes in a couple of places, including:

FIPS codes are like ZIP codes -- they're numeric, but actually they are strings and the leading zeroes matter. In the state_demand module right now they are being treated as integers, which leads to the need to convert data types, and will potentially end up corrupting the data if e.g. leading zeroes are dropped and then state and county FIPS codes are concatenated and some zeroes are missing.

Make whatever changes need to be made to the state_demand module to ensure that it's always treating FIPS codes as strings.

zaneselvans commented 3 years ago

Well okay that was easier than expected thankfully.