Closed davipo closed 6 years ago
I wrote a function split_candidate_party()
to separate candidate from party. This appears to be working in davipo/openelections-data-wi, but needs testing before we close this issue.
I added three tests to check 20001107wigeneral__ward.csv, they pass. Looks like this is resolved.
We've seen single-line headers in just one election so far, id 1845 (results in 20001107wigeneral__ward.csv). Two of the six input files have a single-line header: 001107_US_SEN_SORT.xls 001107_PRES_SORT.xls The rest have the usual two-line headers.
In the single-line headers, the party name is appended to the name of each candidate. To separate these, we can look for known party names. (Splitting off the last word does not work for two-word parties, such as "Wisconsin Greens".)