synthpop icon indicating copy to clipboard operation
synthpop copied to clipboard

Recipe check utility

Open frproulx opened this issue 3 years ago • 0 comments

In developing my own recipe to synthesize a population using ACS and PUMS, I ran into the below error:

 raise RuntimeError( 
     'There is a mismatch between the constraints and the total ' 
     'number of households to draw. The total to draw appears ' 
     'to be higher than indicated by the constraints.') 

The ultimate cause was found to be a typo in my recipe, where one field that was to be mapped between the two datasets had a value typed incorrectly. As a result, the above error arose in some block groups when this particular value arose in the marginal distribution.

Proposing developing a utility for checking recipes before they are run through the synthesizer. This could check for:

  • Field name mapping consistency
  • Field value mapping consistency
  • Presence and correct structure of required methods (e.g., get_household_marginal_for_geography).

frproulx avatar Apr 05 '21 13:04 frproulx