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

Perform table 1 lookup code substitutions #51

Closed waldoj closed 10 years ago

waldoj commented 10 years ago

There is a lot of shorthand data scattered throughout the files, and those fields are assigned a table_code value within the YAML. They can be looked up within 1_tables.csv and resolved. Seems like we ought to be performing that resolution. Perform the following steps:

Make sure that this transformation is performed within the transformation stanza, so that anybody who wants the raw data can have it.

waldoj commented 10 years ago

I think the problem here is that each new dictionary entry has the same implied key (of nothing), so each .update overwrites the prior. I need to learn what unique element, if any, is supposed to be used to define each dictionary entry. Maybe increment an integer? I'm not sure.

waldoj commented 10 years ago

Ah-ha. I didn't want a dictionary. I wanted a list, which in turn contains dictionaries. (Like an array of objects, in PHP.)