openelections-data-ny
openelections-data-ny copied to clipboard
2020 Kings County general file has inconsistent number of columns
2020/counties/20201103__ny__general__kings__precinct.csv has rows with an inconsistent number of columns:
Header ['county', 'precinct', 'office', 'district', 'party', 'candidate', 'votes', 'public_counter_votes', 'emergency_votes', 'absentee_military_votes', 'federal_votes', 'affidavit_votes', 'manually_counted_emergency', 'special_presidential'] has 14 entries, but there are 30429 rows with an inconsistent number of columns:
Row 2 (15 entries): ['Kings', '1~41', 'President', '', 'Democratic', 'Joseph R. Biden / Kamala D. Harris', '151', '433', '', '77', '3', '5', '7', '0', '0']
Row 3 (15 entries): ['Kings', '1~41', 'U.S. House', '9', 'Democratic', 'Yvette D. Clarke', '170', '433', '', '77', '3', '5', '7', '0', '0']
Row 4 (15 entries): ['Kings', '1~41', 'U.S. House', '9', 'Libertarian', 'Gary Popkin', '5', '433', '', '77', '3', '5', '7', '0', '0']
Row 5 (15 entries): ['Kings', '1~41', 'State Assembly', '41', 'Democratic', 'Helene E. Weinstein', '223', '433', '', '77', '3', '5', '7', '0', '0']
Row 6 (15 entries): ['Kings', '1~41', 'President', '', 'Working Families', 'Joseph R. Biden / Kamala D. Harris', '15', '433', '', '77', '3', '5', '7', '0', '0']
Row 7 (15 entries): ['Kings', '1~41', 'State Assembly', '41', 'Conservative', 'Ramona Johnson', '18', '433', '', '77', '3', '5', '7', '0', '0']
Row 8 (15 entries): ['Kings', '1~41', 'State Senate', '17', 'Conservative', 'Simcha Felder', '34', '433', '', '77', '3', '5', '7', '0', '0']
Row 9 (15 entries): ['Kings', '1~41', 'State Senate', '17', 'Republican', 'Simcha Felder', '275', '433', '', '77', '3', '5', '7', '0', '0']
Row 10 (15 entries): ['Kings', '1~41', 'U.S. House', '9', 'Conservative', 'Constantine Jean-Pierre', '27', '433', '', '77', '3', '5', '7', '0', '0']
Row 11 (15 entries): ['Kings', '1~41', 'President', '', 'Conservative', 'Donald J. Trump / Michael R. Pence', '25', '433', '', '77', '3', '5', '7', '0', '0']
[Truncated to 10 examples]
There appears to be a larger issue with all the NYC counties. NYC provides ballot type counts at the precinct level, but not broken down by candidate. The files seem to copy these values for each candidate, which is incorrect.
See official data here