Extract district codes

This PR isn't complete yet. I'll be adding the modules one by one - that way its easier review it too I hope.