taxcalc 3.5.2__tar.gz → 3.6.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. {taxcalc-3.5.2 → taxcalc-3.6.0}/MANIFEST.in +1 -1
  2. {taxcalc-3.5.2/taxcalc.egg-info → taxcalc-3.6.0}/PKG-INFO +1 -1
  3. {taxcalc-3.5.2 → taxcalc-3.6.0}/setup.py +1 -1
  4. {taxcalc-3.5.2 → taxcalc-3.6.0}/taxcalc/__init__.py +1 -1
  5. {taxcalc-3.5.2 → taxcalc-3.6.0}/taxcalc/cli/tc.py +5 -1
  6. {taxcalc-3.5.2 → taxcalc-3.6.0}/taxcalc/consumption.json +2 -2
  7. {taxcalc-3.5.2 → taxcalc-3.6.0}/taxcalc/cps_weights.csv.gz +0 -0
  8. {taxcalc-3.5.2 → taxcalc-3.6.0}/taxcalc/data.py +1 -1
  9. {taxcalc-3.5.2 → taxcalc-3.6.0}/taxcalc/growdiff.json +2 -2
  10. {taxcalc-3.5.2 → taxcalc-3.6.0}/taxcalc/growdiff.py +9 -3
  11. taxcalc-3.6.0/taxcalc/growfactors.csv +65 -0
  12. {taxcalc-3.5.2 → taxcalc-3.6.0}/taxcalc/growfactors.py +6 -6
  13. {taxcalc-3.5.2 → taxcalc-3.6.0}/taxcalc/policy.py +2 -2
  14. {taxcalc-3.5.2 → taxcalc-3.6.0}/taxcalc/policy_current_law.json +102 -102
  15. {taxcalc-3.5.2 → taxcalc-3.6.0}/taxcalc/puf_ratios.csv +13 -12
  16. {taxcalc-3.5.2 → taxcalc-3.6.0}/taxcalc/puf_weights.csv.gz +0 -0
  17. {taxcalc-3.5.2 → taxcalc-3.6.0}/taxcalc/records.py +30 -1
  18. {taxcalc-3.5.2 → taxcalc-3.6.0}/taxcalc/taxcalcio.py +41 -16
  19. taxcalc-3.6.0/taxcalc/tmd_weights.csv.gz +0 -0
  20. {taxcalc-3.5.2 → taxcalc-3.6.0}/taxcalc/utils.py +72 -48
  21. {taxcalc-3.5.2 → taxcalc-3.6.0/taxcalc.egg-info}/PKG-INFO +1 -1
  22. {taxcalc-3.5.2 → taxcalc-3.6.0}/taxcalc.egg-info/SOURCES.txt +1 -0
  23. taxcalc-3.5.2/taxcalc/growfactors.csv +0 -24
  24. {taxcalc-3.5.2 → taxcalc-3.6.0}/LICENSE +0 -0
  25. {taxcalc-3.5.2 → taxcalc-3.6.0}/README.md +0 -0
  26. {taxcalc-3.5.2 → taxcalc-3.6.0}/setup.cfg +0 -0
  27. {taxcalc-3.5.2 → taxcalc-3.6.0}/taxcalc/calcfunctions.py +0 -0
  28. {taxcalc-3.5.2 → taxcalc-3.6.0}/taxcalc/calculator.py +0 -0
  29. {taxcalc-3.5.2 → taxcalc-3.6.0}/taxcalc/cli/__init__.py +0 -0
  30. {taxcalc-3.5.2 → taxcalc-3.6.0}/taxcalc/conftest.py +0 -0
  31. {taxcalc-3.5.2 → taxcalc-3.6.0}/taxcalc/consumption.py +0 -0
  32. {taxcalc-3.5.2 → taxcalc-3.6.0}/taxcalc/cps.csv.gz +0 -0
  33. {taxcalc-3.5.2 → taxcalc-3.6.0}/taxcalc/decorators.py +0 -0
  34. {taxcalc-3.5.2 → taxcalc-3.6.0}/taxcalc/parameters.py +0 -0
  35. {taxcalc-3.5.2 → taxcalc-3.6.0}/taxcalc/records_variables.json +0 -0
  36. {taxcalc-3.5.2 → taxcalc-3.6.0}/taxcalc/utilsprvt.py +0 -0
  37. {taxcalc-3.5.2 → taxcalc-3.6.0}/taxcalc.egg-info/dependency_links.txt +0 -0
  38. {taxcalc-3.5.2 → taxcalc-3.6.0}/taxcalc.egg-info/entry_points.txt +0 -0
  39. {taxcalc-3.5.2 → taxcalc-3.6.0}/taxcalc.egg-info/requires.txt +0 -0
  40. {taxcalc-3.5.2 → taxcalc-3.6.0}/taxcalc.egg-info/top_level.txt +0 -0
@@ -7,4 +7,4 @@ include taxcalc/policy_current_law.json
7
7
  include taxcalc/puf_weights.csv.gz
8
8
  include taxcalc/puf_ratios.csv
9
9
  include taxcalc/records_variables.json
10
-
10
+ include taxcalc/tmd_weights.csv.gz
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: taxcalc
3
- Version: 3.5.2
3
+ Version: 3.6.0
4
4
  Summary: taxcalc
5
5
  Home-page: https://github.com/PSLmodels/Tax-Calculator
6
6
  Download-URL: https://github.com/PSLmodels/Tax-Calculator
@@ -3,7 +3,7 @@ from setuptools import setup
3
3
  with open("README.md") as f:
4
4
  longdesc = f.read()
5
5
 
6
- version = "3.5.2"
6
+ version = "3.6.0"
7
7
 
8
8
  config = {
9
9
  "description": "Tax Calculator",
@@ -14,4 +14,4 @@ from taxcalc.taxcalcio import *
14
14
  from taxcalc.utils import *
15
15
  from taxcalc.cli import *
16
16
 
17
- __version__ = '3.5.2'
17
+ __version__ = '3.6.0'
@@ -153,7 +153,11 @@ def cli_tc_main():
153
153
  sys.stderr.write(tcio.errmsg)
154
154
  sys.stderr.write('USAGE: tc --help\n')
155
155
  return 1
156
- aging = inputfn.endswith('puf.csv') or inputfn.endswith('cps.csv')
156
+ aging = (
157
+ inputfn.endswith('puf.csv') or
158
+ inputfn.endswith('cps.csv') or
159
+ inputfn.endswith('tmd.csv')
160
+ )
157
161
  tcio.init(input_data=inputfn, tax_year=taxyear,
158
162
  baseline=args.baseline,
159
163
  reform=args.reform, assump=args.assump,
@@ -6,7 +6,7 @@
6
6
  "validators": {
7
7
  "range": {
8
8
  "min": 2013,
9
- "max": 2033
9
+ "max": 2034
10
10
  }
11
11
  }
12
12
  },
@@ -282,4 +282,4 @@
282
282
  }
283
283
  }
284
284
  }
285
- }
285
+ }
@@ -276,6 +276,6 @@ class Data():
276
276
 
277
277
  def _extrapolate(self, year):
278
278
  """
279
- Apply to dats variables the growth factor values for specified year.
279
+ Apply to data variables the growth factor values for specified year.
280
280
  """
281
281
  # Override this empty method in subclass
@@ -6,7 +6,7 @@
6
6
  "validators": {
7
7
  "range": {
8
8
  "min": 2013,
9
- "max": 2033
9
+ "max": 2034
10
10
  }
11
11
  }
12
12
  },
@@ -500,4 +500,4 @@
500
500
  }
501
501
  }
502
502
  }
503
- }
503
+ }
@@ -7,6 +7,7 @@ Tax-Calculator GrowDiff class that is used to modify GrowFactors.
7
7
  import os
8
8
  import numpy as np
9
9
  from taxcalc.parameters import Parameters
10
+ from taxcalc.policy import Policy
10
11
  from taxcalc.growfactors import GrowFactors
11
12
 
12
13
 
@@ -26,8 +27,8 @@ class GrowDiff(Parameters):
26
27
  class instance: GrowDiff
27
28
  """
28
29
 
29
- JSON_START_YEAR = 2013 # must be same as Policy.JSON_START_YEAR
30
- DEFAULT_NUM_YEARS = 21 # must be same as Policy.DEFAULT_NUM_YEARS
30
+ JSON_START_YEAR = Policy.JSON_START_YEAR
31
+ DEFAULT_NUM_YEARS = Policy.DEFAULT_NUM_YEARS
31
32
  DEFAULTS_FILE_NAME = 'growdiff.json'
32
33
  DEFAULTS_FILE_PATH = os.path.abspath(os.path.dirname(__file__))
33
34
 
@@ -75,8 +76,13 @@ class GrowDiff(Parameters):
75
76
  """
76
77
  assert isinstance(growfactors, GrowFactors)
77
78
  for gfvn in GrowFactors.VALID_NAMES:
78
- _gfvn = '_{}'.format(gfvn)
79
+ _gfvn = f'_{gfvn}'
79
80
  for i in range(0, self.num_years):
80
81
  cyr = i + self.start_year
81
82
  diff_array = getattr(self, _gfvn)
82
83
  growfactors.update(gfvn, cyr, diff_array[i])
84
+
85
+ def set_rates(self):
86
+ """
87
+ Unimplemented base class method that is not used here.
88
+ """
@@ -0,0 +1,65 @@
1
+ YEAR,ATXPY,ASCHF,ABOOK,ACPIU,ACPIM,AWAGE,ASCHCI,ASCHCL,ASCHEI,ASCHEL,AINTS,ADIVS,ACGNS,ASOCSEC,AUCOMP,AIPD,ABENOTHER,ABENMCARE,ABENMCAID,ABENSSI,ABENSNAP,ABENWIC,ABENHOUSING,ABENTANF,ABENVET
2
+ 2011,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
3
+ 2012,1.043862,0.950283,1.104992,1.0209,1.0365,1.032649,1.049023,0.956138,1.165922,0.926962,0.923588,1.327776,1.58966,1.02827,0.7711,0.9231,0.992359,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
4
+ 2013,1.012518,1.142179,1.033784,1.014791,1.024602,1.019984,0.99505,1.050098,0.997245,1.013128,0.893658,0.819381,0.776217,1.014786,0.728829,0.896219,0.992515,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
5
+ 2014,1.029476,0.931683,0.976566,1.015927,1.023917,1.039999,1.040616,1.030349,1.075978,0.991321,0.925886,1.17606,1.387522,1.004801,0.641103,0.970506,0.99257,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
6
+ 2015,1.043858,0.508206,0.999544,1.001235,1.026485,1.024119,1.038052,1.040061,1.04481,1.057257,1.013311,1.013846,1.004308,1.017188,0.81793,0.988666,1.053858,1.023325,1.041528,1.019361,1.102667,1.007792,1.026748,1.132657,1.04693
7
+ 2016,1.021978,1.071198,0.984833,1.012621,1.037807,1.006659,0.984484,1.005593,0.982695,0.983807,0.999649,0.968237,0.881651,0.991403,0.933831,1.001764,1.097065,1.011695,1.010367,0.993375,0.989722,1.002577,1.01625,0.828168,1.105413
8
+ 2017,1.049373,0.907035,1.018491,1.01677,1.025035,1.040577,1.060677,1.132498,1.093477,1.160123,1.088642,1.102389,1.344721,1.00723,0.94186,1.029301,1.011911,1.030968,1.014601,0.981621,1.0,0.998715,1.063959,1.0,1.0
9
+ 2018,1.042394,0.976786,1.074059,1.02,1.019707,1.041821,1.042769,1.042713,1.074048,1.074033,1.031272,1.076804,1.074755,1.018778,0.92284,1.050825,1.103035,1.045097,1.045897,1.005738,1.0,1.002574,1.034828,1.0,1.0
10
+ 2019,1.032351,0.979401,1.019085,1.01341,1.028328,1.039292,1.004274,1.004387,1.019131,1.019122,1.014806,1.041751,0.925878,1.031182,0.940635,1.040577,1.054052,1.052158,1.045866,1.000751,1.0,1.002567,1.034809,1.0,1.0
11
+ 2020,1.067957,1.167938,0.947032,1.00799,1.041121,1.006381,1.016054,1.015991,0.947016,0.94708,0.989319,1.091767,1.292516,1.023383,1.034222,1.076313,0.996727,1.050763,1.046106,1.00255,1.0,1.003841,1.034974,1.0,1.0
12
+ 2021,1.065517,1.126248,1.216697,1.04269,1.012343,1.079707,1.057058,1.05708,1.216716,1.216644,0.999214,1.057982,1.792117,1.011965,8.619252,1.073809,1.03007,1.047248,1.047927,1.001796,1.0,1.002551,1.034869,1.0,1.0
13
+ 2022,1.014347,1.742914,1.047552,1.07229,1.040311,1.076282,1.022527,1.022546,1.047553,1.047566,1.049118,1.042358,0.631565,1.04749,0.152665,1.022138,1.030159,1.048769,1.047573,0.999851,1.0,1.002545,1.034942,1.0,1.0
14
+ 2023,1.050108,0.653145,1.091056,1.05402,1.004761,1.050035,1.013156,1.013121,1.091037,1.091047,1.026196,1.126711,1.0525,1.085497,0.748857,1.058072,1.030193,1.050822,1.048715,1.000448,1.0,1.003807,1.034968,1.0,1.0
15
+ 2024,1.046242,0.895528,1.007166,1.0255,1.01407,1.040377,1.0397,1.03963,1.007187,1.007157,1.156028,1.023049,0.932271,1.052921,1.337549,1.054081,1.030334,1.048426,1.051767,0.99776,1.0,1.002528,1.034951,1.0,1.0
16
+ 2025,1.040442,0.963117,1.020457,1.02198,0.958663,1.038977,1.037682,1.037745,1.020415,1.020444,1.091746,1.02538,0.97747,1.031721,1.154874,1.047914,1.030635,1.046248,1.052213,1.002245,1.0,1.003783,1.034897,1.0,1.0
17
+ 2026,1.039294,0.987094,1.014705,1.02074,1.014023,1.035978,1.037783,1.037762,1.014711,1.014716,1.098184,1.019802,0.970235,1.030992,1.035291,1.046856,1.030633,1.072236,1.0,0.999552,1.0,1.002513,1.034808,1.0,1.0
18
+ 2027,1.037119,0.998822,1.017535,1.01946,1.013312,1.033569,1.03414,1.034138,1.017568,1.017583,1.066606,1.013266,0.993714,1.031791,1.045541,1.044372,1.030788,1.0,1.0,1.0,1.0,1.002506,1.034863,1.0,1.0
19
+ 2028,1.036799,1.006582,1.023966,1.01942,1.013356,1.033042,1.031594,1.03158,1.023985,1.02393,1.050716,1.021542,1.009158,1.03344,1.043558,1.043967,1.030942,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
20
+ 2029,1.035913,1.010333,1.028149,1.01966,1.013612,1.033365,1.030869,1.030888,1.028085,1.028143,1.03013,1.032091,1.018962,1.033664,1.045739,1.042825,1.031131,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
21
+ 2030,1.036423,1.01018,1.024121,1.01977,1.013855,1.03321,1.030563,1.030595,1.02417,1.024128,1.036979,1.032934,1.024538,1.034401,1.043738,1.043174,1.03133,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
22
+ 2031,1.036362,1.010259,1.024733,1.01991,1.014016,1.032812,1.031233,1.03124,1.024699,1.024734,1.039197,1.032793,1.027842,1.036645,1.038241,1.042951,1.03151,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
23
+ 2032,1.036409,1.009979,1.028,1.01999,1.014306,1.032126,1.032334,1.032295,1.028004,1.027983,1.04014,1.03261,1.029719,1.036435,1.031319,1.042807,1.031644,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
24
+ 2033,1.035793,1.008195,1.02813,1.02002,1.014309,1.031481,1.033961,1.033991,1.028128,1.02811,1.031669,1.03246,1.030798,1.037554,1.028443,1.042009,1.031857,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
25
+ 2034,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
26
+ 2035,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
27
+ 2036,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
28
+ 2037,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
29
+ 2038,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
30
+ 2039,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
31
+ 2040,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
32
+ 2041,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
33
+ 2042,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
34
+ 2043,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
35
+ 2044,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
36
+ 2045,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
37
+ 2046,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
38
+ 2047,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
39
+ 2048,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
40
+ 2049,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
41
+ 2050,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
42
+ 2051,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
43
+ 2052,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
44
+ 2053,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
45
+ 2054,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
46
+ 2055,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
47
+ 2056,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
48
+ 2057,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
49
+ 2058,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
50
+ 2059,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
51
+ 2060,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
52
+ 2061,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
53
+ 2062,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
54
+ 2063,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
55
+ 2064,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
56
+ 2065,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
57
+ 2066,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
58
+ 2067,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
59
+ 2068,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
60
+ 2069,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
61
+ 2070,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
62
+ 2071,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
63
+ 2072,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
64
+ 2073,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
65
+ 2074,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
@@ -33,7 +33,7 @@ class GrowFactors():
33
33
  Notes
34
34
  -----
35
35
  Typical usage is "gfactor = GrowFactors()", which produces an object
36
- containing the default growth factors in the GrowFactors.FILE_NAME file.
36
+ containing growth factors in the GrowFactors.FILE_NAME file.
37
37
  """
38
38
 
39
39
  FILE_NAME = 'growfactors.csv'
@@ -56,7 +56,7 @@ class GrowFactors():
56
56
  growfactors_filename)
57
57
  if os.path.isfile(full_filename):
58
58
  gfdf = pd.read_csv(full_filename, index_col='YEAR')
59
- else: # find file in conda package
59
+ else: # find file in package
60
60
  gfdf = read_egg_csv(os.path.basename(growfactors_filename),
61
61
  index_col='YEAR') # pragma: no cover
62
62
  else:
@@ -65,7 +65,7 @@ class GrowFactors():
65
65
  # check validity of gfdf column names
66
66
  gfdf_names = set(list(gfdf))
67
67
  if gfdf_names != GrowFactors.VALID_NAMES:
68
- msg = ('missing names are: {} and invalid names are: {}')
68
+ msg = 'missing names are: {} and invalid names are: {}'
69
69
  missing = GrowFactors.VALID_NAMES - gfdf_names
70
70
  invalid = gfdf_names - GrowFactors.VALID_NAMES
71
71
  raise ValueError(msg.format(missing, invalid))
@@ -143,11 +143,11 @@ class GrowFactors():
143
143
  if year > self.last_year:
144
144
  msg = 'year={} > GrowFactors.last_year={}'
145
145
  raise ValueError(msg.format(year, self.last_year))
146
- return self.gfdf[name][year]
146
+ return self.gfdf.loc[year,name]
147
147
 
148
148
  def update(self, name, year, diff):
149
149
  """
150
- Add to self.gfdf[name][year] the specified diff amount.
150
+ Add to self.gfdf (for name and year) the specified diff amount.
151
151
  """
152
152
  if self.used:
153
153
  msg = 'cannot update growfactors after they have been used'
@@ -156,4 +156,4 @@ class GrowFactors():
156
156
  assert year >= self.first_year
157
157
  assert year <= self.last_year
158
158
  assert isinstance(diff, float)
159
- self.gfdf[name][year] += diff
159
+ self.gfdf.loc[year,name] += diff
@@ -37,9 +37,9 @@ class Policy(Parameters):
37
37
  DEFAULTS_FILE_NAME = 'policy_current_law.json'
38
38
  DEFAULTS_FILE_PATH = os.path.abspath(os.path.dirname(__file__))
39
39
  JSON_START_YEAR = 2013 # remains the same unless earlier data added
40
- LAST_KNOWN_YEAR = 2020 # last year for which indexed param vals are known
40
+ LAST_KNOWN_YEAR = 2022 # last year for which indexed param vals are known
41
41
  # should increase LAST_KNOWN_YEAR by one every calendar year
42
- LAST_BUDGET_YEAR = 2033 # last extrapolation year
42
+ LAST_BUDGET_YEAR = 2034 # last extrapolation year
43
43
  # should increase LAST_BUDGET_YEAR by one every calendar year
44
44
  DEFAULT_NUM_YEARS = LAST_BUDGET_YEAR - JSON_START_YEAR + 1
45
45