replicahq / doppelganger

A Python package of tools to support population synthesizers
Apache License 2.0
165 stars 32 forks source link

Add household_id, factor out col names #35

Closed katbusch closed 7 years ago

katbusch commented 7 years ago

This fixes #27, not in the requested way but in a cheap way that we can change later if we want. I also moved a few strings into the inputs file as constants to make the code easier to write/maintain


This change is Reviewable

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.1%) to 82.418% when pulling a752104807ddaefe269c6f6579f2905e34fa3c0b on unique_id into 94b5986284a12003e39e1dbad96e9f980cdc2803 on master.

katbusch commented 7 years ago

Create an initial population generator [3 days]

nikisix commented 7 years ago

The actual code looks and runs well. However, in order for this to be a unique_id, we should use the full tract id, including its state and county components. I.e.

STATEFP  COUNTYFP  TRACTCE  PUMA5CE
01       001       020100   02100
01       001       020200   02100
01       001       020300   02100
01       001       020400   02100
01       001       020500   02100
01       001       020600   02100
01       001       020700   02100
01       001       020801   02100
01       001       020802   02100

Ideally we'd have tract_ids that look more like: "01001020802" than "20802", which is what I'm ending up with right now after generating synth households.


Review status: 0 of 7 files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

nikisix commented 7 years ago

I also realize, this may very well be outside of the purview of this push


Review status: 0 of 7 files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

katbusch commented 7 years ago

Ah I got it. Okay, I agree that is outside the purview of this. We should add state & county throughout our code and then we can tie it into the unique ID. I will file a separate issue for that


Review status: 0 of 7 files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

katbusch commented 7 years ago

Made #36

nikisix commented 7 years ago
:lgtm:

Comments from Reviewable