Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data table doesn't match field documentation #5

Open
migurski opened this issue Jan 28, 2018 · 4 comments
Open

Data table doesn't match field documentation #5

migurski opened this issue Jan 28, 2018 · 4 comments

Comments

@migurski
Copy link

The fields documented in the README don’t appear to match those in the 2016 General data file. Here are the first few documented fields:

Field Description Length Data Type
Election Year 4 Numeric
Election Type (G = General) 1 Character
County Code * 2 Numeric
Precinct Code 7 Numeric
Candidate Office Rank 2 Numeric
Candidate District 3 Numeric

And these are the first few lines:

"2016","G",1,10,1,0,1,1,"USP","DEM",2016C0483,"CLINTON","HILLARY","","",119,4,33,193,6,"ABBOTTSTOWN","","","","",0,5,001,0010,0,19,33,193
"2016","G",1,20,1,0,1,1,"USP","DEM",2016C0483,"CLINTON","HILLARY","","",143,4,33,193,6,"ARENDTSVILLE","","","","",0,10,001,0020,0,19,33,91
"2016","G",1,30,1,0,1,1,"USP","DEM",2016C0483,"CLINTON","HILLARY","","",83,4,33,193,6,"BENDERSVILLE","","","","",0,15,001,0030,0,19,33,193
"2016","G",1,40,1,0,1,1,"USP","DEM",2016C0483,"CLINTON","HILLARY","","",257,4,33,193,4,"BERWICK","","","","",0,20,001,0040,0,19,33,193
"2016","G",1,50,1,0,1,1,"USP","DEM",2016C0483,"CLINTON","HILLARY","","",148,4,33,193,6,"BIGLERVILLE","","","","",0,25,001,0050,0,19,33,193

The lengths and positions don’t match, and the file is missing a header row (as in other OE data sets) to disambiguate.

@wtadler
Copy link

wtadler commented Feb 15, 2018

I think you can trust the order of the field descriptions and ignore length and data type. Note that the third column includes numbers 1 through 67 and there are 67 counties in PA [Ballotpedia]. Things seem to check out if you sniff around some of the other columns too.

It looks like the table in the README is just copied from the communication provided by the PA Department of State. My hypotheses are either:

  • The original description provided by PA was off.
  • Some leading zeros got dropped when OE converted the PA-provided files.

@dwillis
Copy link
Contributor

dwillis commented Mar 4, 2018

I'll ask PA about whether the record layout changed for 2016 files and will provide a response to this.

@riordan
Copy link

riordan commented Feb 7, 2019

Is this now resolved?

@dwillis
Copy link
Contributor

dwillis commented Feb 7, 2019

We still need to do 2016, but this issue doesn't occur for 2018 general.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants