openva / crump

A parser for the Virginia State Corporation Commission's business registration records.
https://vabusinesses.org/
MIT License
20 stars 3 forks source link

Registered names has single-character state #72

Closed waldoj closed 9 years ago

waldoj commented 9 years ago

The registered names file (e.g., 8_registered_names.csv) has an error in every state/ZIP pairing, like such:

IRVINE,C,A9261-2000
PHILADELPHIA,P,A1919-2115
NORFOLK,V,A2351-4000

This probably stems from a pair of errors in 8_registered_names.yaml, although I don't understand what the actual errors are. One of them is that the state field is set to be 1 character in length, and the other one is that the ZIP field starts one character too early, but it doesn't look like that's the case:

- name:        res-state
  alt_name:    state
  description: State of Requestor
  group:       address
  type:        A
  start:       332
  length:      2
  search: 
    match:     exact
- name:        res-zip
  alt_name:    zip
  description: ZIP of Requestor
  group:       address
  type:        N
  start:       334
  length:      9
  search: 
    match:     exact

res-state is 2 characters long, but we're only getting 1 character. And the start on res-zip is 2 characters after the start on res-state, yet it's starting in the wrong place. I'll advance the res-zip start by 1, but I'll need to do some more debugging to figure out what's up with res-state.

waldoj commented 9 years ago

Well, now the ZIP codes are the correct length, but states are one character long.