0

I have an attribute table with two types of text fields (34 of each). One type attributes an "r" or a "d" for each feature. These fields represent the voting results in either presidential or gubernatorial elections of each county for each election year from 1948 to 2014. These fields are called prez48, gov50, prez52, gov54, etc. The second set of fields have "_lng" appended to them (prez48_lng, gov50_lng, etc.) These fields have no data in them yet.

I would like to automate the process of calculating this second set of fields to turn "r" (from the first set) into "Republican" and "d" into "Democrat". Example: if prez48 = "r" then prez48_lng = "Republican".

Can this be done without coding?

5
  • 1
    Coding free approach: remove long fields. Bring what remains to excel. Replace r to whatever, same with d. Change column names to include lng. Join to parent using row unique id. Export to new table – FelixIP Jul 24 '16 at 3:36
  • Let me know if you want to re-open this as a non-coding question so that @FelixIP can apply their answer. – PolyGeo Jul 24 '16 at 4:50
  • @PolyGeo I think this Q can be safely re-opened because automation not necessarily means coding – FelixIP Jul 24 '16 at 5:44
  • @FelixIP its re-opened – PolyGeo Jul 24 '16 at 5:48
  • Thanks @FelixIP for the suggestion. That makes sense to not overthink this too much. – SteveC Jul 24 '16 at 18:47
1

@FelixIP has offered a ...

Coding free approach: remove long fields. Bring what remains to excel. Replace r to whatever, same with d. Change column names to include lng. Join to parent using row unique id. Export to new table

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.