PSLmodels / OG-Core

An overlapping generations model framework for evaluating fiscal policies.
https://pslmodels.github.io/OG-Core/
Creative Commons Zero v1.0 Universal
67 stars 118 forks source link

File ../ogusa/puf.csv does not exist #366

Closed asmockler closed 6 years ago

asmockler commented 6 years ago

When trying to run files in the run_examples folder, I get an IOError. I assume this file isn't included in the repo because of its size – how can I get it? And how can we make distributing puf.csv more scalable? If it exists on AWS we could have the example scripts fetch it or add a new script that would fetch it.

cc: @rickecon

jdebacker commented 6 years ago

@asmockler the puf.csv files is proprietary and can’t be shared. The model will run with the cps.csv files in the test_data folder. But none of the run_example scripts illustrate using that file. I could set up an example using that but no sooner that Tuesday.

jdebacker commented 6 years ago

To run OG-USA with the freely distributable CPS file, just include the data argument in the kwargs passed to runner and set it to cps. Such as:

kwargs = {'output_base': output_base, 'baseline_dir': BASELINE_DIR,
              'test': False, 'time_path': False, 'baseline': True,
              'constant_rates': True,
              'analytical_mtrs': False, 'age_specific': False,
              'user_params': user_params, 'guid': '_cps_TCJA_dask',
              'run_micro': True, 'small_open': small_open,
              'budget_balance': False, 'baseline_spending': False,
              'data': 'cps', 'client': client, 'num_workers': num_workers}
rickecon commented 6 years ago

@jdebacker . This is great.

jdebacker commented 6 years ago

Let me also note here that if you use the Tax-Calculator methods to read in a policy JSON, you need to specify the CPS constructor in the records object. e.g.,

rec = Records.cps_constructor()
pol = Policy()
calc = Calculator(policy=pol, records=rec)
ref = calc.read_json_param_objects(
    '../../tax-calculator/taxcalc/reforms/2017_law.json', None)
iit_reform = ref['policy']

If you have rec = Records(), Tax-Calculator will look for the PUF.