policyengine-us 1.351.4__py3-none-any.whl → 1.352.0__py3-none-any.whl

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.

Potentially problematic release.


This version of policyengine-us might be problematic. Click here for more details.

@@ -0,0 +1,551 @@
1
+ from policyengine_us.model_api import *
2
+ from typing import List
3
+
4
+
5
+ class UCGID(Enum):
6
+ US = "0100000US"
7
+ AL = "0400000US01"
8
+ AK = "0400000US02"
9
+ AZ = "0400000US04"
10
+ AR = "0400000US05"
11
+ CA = "0400000US06"
12
+ CO = "0400000US08"
13
+ CT = "0400000US09"
14
+ DE = "0400000US10"
15
+ DC = "0400000US11"
16
+ FL = "0400000US12"
17
+ GA = "0400000US13"
18
+ HI = "0400000US15"
19
+ ID = "0400000US16"
20
+ IL = "0400000US17"
21
+ IN = "0400000US18"
22
+ IA = "0400000US19"
23
+ KS = "0400000US20"
24
+ KY = "0400000US21"
25
+ LA = "0400000US22"
26
+ ME = "0400000US23"
27
+ MD = "0400000US24"
28
+ MA = "0400000US25"
29
+ MI = "0400000US26"
30
+ MN = "0400000US27"
31
+ MS = "0400000US28"
32
+ MO = "0400000US29"
33
+ MT = "0400000US30"
34
+ NE = "0400000US31"
35
+ NV = "0400000US32"
36
+ NH = "0400000US33"
37
+ NJ = "0400000US34"
38
+ NM = "0400000US35"
39
+ NY = "0400000US36"
40
+ NC = "0400000US37"
41
+ ND = "0400000US38"
42
+ OH = "0400000US39"
43
+ OK = "0400000US40"
44
+ OR = "0400000US41"
45
+ PA = "0400000US42"
46
+ RI = "0400000US44"
47
+ SC = "0400000US45"
48
+ SD = "0400000US46"
49
+ TN = "0400000US47"
50
+ TX = "0400000US48"
51
+ UT = "0400000US49"
52
+ VT = "0400000US50"
53
+ VA = "0400000US51"
54
+ WA = "0400000US53"
55
+ WV = "0400000US54"
56
+ WI = "0400000US55"
57
+ WY = "0400000US56"
58
+ AL_01 = "5001800US0101"
59
+ AL_02 = "5001800US0102"
60
+ AL_03 = "5001800US0103"
61
+ AL_04 = "5001800US0104"
62
+ AL_05 = "5001800US0105"
63
+ AL_06 = "5001800US0106"
64
+ AL_07 = "5001800US0107"
65
+ AK_01 = "5001800US0200"
66
+ AZ_01 = "5001800US0401"
67
+ AZ_02 = "5001800US0402"
68
+ AZ_03 = "5001800US0403"
69
+ AZ_04 = "5001800US0404"
70
+ AZ_05 = "5001800US0405"
71
+ AZ_06 = "5001800US0406"
72
+ AZ_07 = "5001800US0407"
73
+ AZ_08 = "5001800US0408"
74
+ AZ_09 = "5001800US0409"
75
+ AR_01 = "5001800US0501"
76
+ AR_02 = "5001800US0502"
77
+ AR_03 = "5001800US0503"
78
+ AR_04 = "5001800US0504"
79
+ CA_01 = "5001800US0601"
80
+ CA_02 = "5001800US0602"
81
+ CA_03 = "5001800US0603"
82
+ CA_04 = "5001800US0604"
83
+ CA_05 = "5001800US0605"
84
+ CA_06 = "5001800US0606"
85
+ CA_07 = "5001800US0607"
86
+ CA_08 = "5001800US0608"
87
+ CA_09 = "5001800US0609"
88
+ CA_10 = "5001800US0610"
89
+ CA_11 = "5001800US0611"
90
+ CA_12 = "5001800US0612"
91
+ CA_13 = "5001800US0613"
92
+ CA_14 = "5001800US0614"
93
+ CA_15 = "5001800US0615"
94
+ CA_16 = "5001800US0616"
95
+ CA_17 = "5001800US0617"
96
+ CA_18 = "5001800US0618"
97
+ CA_19 = "5001800US0619"
98
+ CA_20 = "5001800US0620"
99
+ CA_21 = "5001800US0621"
100
+ CA_22 = "5001800US0622"
101
+ CA_23 = "5001800US0623"
102
+ CA_24 = "5001800US0624"
103
+ CA_25 = "5001800US0625"
104
+ CA_26 = "5001800US0626"
105
+ CA_27 = "5001800US0627"
106
+ CA_28 = "5001800US0628"
107
+ CA_29 = "5001800US0629"
108
+ CA_30 = "5001800US0630"
109
+ CA_31 = "5001800US0631"
110
+ CA_32 = "5001800US0632"
111
+ CA_33 = "5001800US0633"
112
+ CA_34 = "5001800US0634"
113
+ CA_35 = "5001800US0635"
114
+ CA_36 = "5001800US0636"
115
+ CA_37 = "5001800US0637"
116
+ CA_38 = "5001800US0638"
117
+ CA_39 = "5001800US0639"
118
+ CA_40 = "5001800US0640"
119
+ CA_41 = "5001800US0641"
120
+ CA_42 = "5001800US0642"
121
+ CA_43 = "5001800US0643"
122
+ CA_44 = "5001800US0644"
123
+ CA_45 = "5001800US0645"
124
+ CA_46 = "5001800US0646"
125
+ CA_47 = "5001800US0647"
126
+ CA_48 = "5001800US0648"
127
+ CA_49 = "5001800US0649"
128
+ CA_50 = "5001800US0650"
129
+ CA_51 = "5001800US0651"
130
+ CA_52 = "5001800US0652"
131
+ CO_01 = "5001800US0801"
132
+ CO_02 = "5001800US0802"
133
+ CO_03 = "5001800US0803"
134
+ CO_04 = "5001800US0804"
135
+ CO_05 = "5001800US0805"
136
+ CO_06 = "5001800US0806"
137
+ CO_07 = "5001800US0807"
138
+ CO_08 = "5001800US0808"
139
+ CT_01 = "5001800US0901"
140
+ CT_02 = "5001800US0902"
141
+ CT_03 = "5001800US0903"
142
+ CT_04 = "5001800US0904"
143
+ CT_05 = "5001800US0905"
144
+ DE_01 = "5001800US1000"
145
+ DC_01 = "5001800US1198"
146
+ FL_01 = "5001800US1201"
147
+ FL_02 = "5001800US1202"
148
+ FL_03 = "5001800US1203"
149
+ FL_04 = "5001800US1204"
150
+ FL_05 = "5001800US1205"
151
+ FL_06 = "5001800US1206"
152
+ FL_07 = "5001800US1207"
153
+ FL_08 = "5001800US1208"
154
+ FL_09 = "5001800US1209"
155
+ FL_10 = "5001800US1210"
156
+ FL_11 = "5001800US1211"
157
+ FL_12 = "5001800US1212"
158
+ FL_13 = "5001800US1213"
159
+ FL_14 = "5001800US1214"
160
+ FL_15 = "5001800US1215"
161
+ FL_16 = "5001800US1216"
162
+ FL_17 = "5001800US1217"
163
+ FL_18 = "5001800US1218"
164
+ FL_19 = "5001800US1219"
165
+ FL_20 = "5001800US1220"
166
+ FL_21 = "5001800US1221"
167
+ FL_22 = "5001800US1222"
168
+ FL_23 = "5001800US1223"
169
+ FL_24 = "5001800US1224"
170
+ FL_25 = "5001800US1225"
171
+ FL_26 = "5001800US1226"
172
+ FL_27 = "5001800US1227"
173
+ FL_28 = "5001800US1228"
174
+ GA_01 = "5001800US1301"
175
+ GA_02 = "5001800US1302"
176
+ GA_03 = "5001800US1303"
177
+ GA_04 = "5001800US1304"
178
+ GA_05 = "5001800US1305"
179
+ GA_06 = "5001800US1306"
180
+ GA_07 = "5001800US1307"
181
+ GA_08 = "5001800US1308"
182
+ GA_09 = "5001800US1309"
183
+ GA_10 = "5001800US1310"
184
+ GA_11 = "5001800US1311"
185
+ GA_12 = "5001800US1312"
186
+ GA_13 = "5001800US1313"
187
+ GA_14 = "5001800US1314"
188
+ HI_01 = "5001800US1501"
189
+ HI_02 = "5001800US1502"
190
+ ID_01 = "5001800US1601"
191
+ ID_02 = "5001800US1602"
192
+ IL_01 = "5001800US1701"
193
+ IL_02 = "5001800US1702"
194
+ IL_03 = "5001800US1703"
195
+ IL_04 = "5001800US1704"
196
+ IL_05 = "5001800US1705"
197
+ IL_06 = "5001800US1706"
198
+ IL_07 = "5001800US1707"
199
+ IL_08 = "5001800US1708"
200
+ IL_09 = "5001800US1709"
201
+ IL_10 = "5001800US1710"
202
+ IL_11 = "5001800US1711"
203
+ IL_12 = "5001800US1712"
204
+ IL_13 = "5001800US1713"
205
+ IL_14 = "5001800US1714"
206
+ IL_15 = "5001800US1715"
207
+ IL_16 = "5001800US1716"
208
+ IL_17 = "5001800US1717"
209
+ IN_01 = "5001800US1801"
210
+ IN_02 = "5001800US1802"
211
+ IN_03 = "5001800US1803"
212
+ IN_04 = "5001800US1804"
213
+ IN_05 = "5001800US1805"
214
+ IN_06 = "5001800US1806"
215
+ IN_07 = "5001800US1807"
216
+ IN_08 = "5001800US1808"
217
+ IN_09 = "5001800US1809"
218
+ IA_01 = "5001800US1901"
219
+ IA_02 = "5001800US1902"
220
+ IA_03 = "5001800US1903"
221
+ IA_04 = "5001800US1904"
222
+ KS_01 = "5001800US2001"
223
+ KS_02 = "5001800US2002"
224
+ KS_03 = "5001800US2003"
225
+ KS_04 = "5001800US2004"
226
+ KY_01 = "5001800US2101"
227
+ KY_02 = "5001800US2102"
228
+ KY_03 = "5001800US2103"
229
+ KY_04 = "5001800US2104"
230
+ KY_05 = "5001800US2105"
231
+ KY_06 = "5001800US2106"
232
+ LA_01 = "5001800US2201"
233
+ LA_02 = "5001800US2202"
234
+ LA_03 = "5001800US2203"
235
+ LA_04 = "5001800US2204"
236
+ LA_05 = "5001800US2205"
237
+ LA_06 = "5001800US2206"
238
+ ME_01 = "5001800US2301"
239
+ ME_02 = "5001800US2302"
240
+ MD_01 = "5001800US2401"
241
+ MD_02 = "5001800US2402"
242
+ MD_03 = "5001800US2403"
243
+ MD_04 = "5001800US2404"
244
+ MD_05 = "5001800US2405"
245
+ MD_06 = "5001800US2406"
246
+ MD_07 = "5001800US2407"
247
+ MD_08 = "5001800US2408"
248
+ MA_01 = "5001800US2501"
249
+ MA_02 = "5001800US2502"
250
+ MA_03 = "5001800US2503"
251
+ MA_04 = "5001800US2504"
252
+ MA_05 = "5001800US2505"
253
+ MA_06 = "5001800US2506"
254
+ MA_07 = "5001800US2507"
255
+ MA_08 = "5001800US2508"
256
+ MA_09 = "5001800US2509"
257
+ MI_01 = "5001800US2601"
258
+ MI_02 = "5001800US2602"
259
+ MI_03 = "5001800US2603"
260
+ MI_04 = "5001800US2604"
261
+ MI_05 = "5001800US2605"
262
+ MI_06 = "5001800US2606"
263
+ MI_07 = "5001800US2607"
264
+ MI_08 = "5001800US2608"
265
+ MI_09 = "5001800US2609"
266
+ MI_10 = "5001800US2610"
267
+ MI_11 = "5001800US2611"
268
+ MI_12 = "5001800US2612"
269
+ MI_13 = "5001800US2613"
270
+ MN_01 = "5001800US2701"
271
+ MN_02 = "5001800US2702"
272
+ MN_03 = "5001800US2703"
273
+ MN_04 = "5001800US2704"
274
+ MN_05 = "5001800US2705"
275
+ MN_06 = "5001800US2706"
276
+ MN_07 = "5001800US2707"
277
+ MN_08 = "5001800US2708"
278
+ MS_01 = "5001800US2801"
279
+ MS_02 = "5001800US2802"
280
+ MS_03 = "5001800US2803"
281
+ MS_04 = "5001800US2804"
282
+ MO_01 = "5001800US2901"
283
+ MO_02 = "5001800US2902"
284
+ MO_03 = "5001800US2903"
285
+ MO_04 = "5001800US2904"
286
+ MO_05 = "5001800US2905"
287
+ MO_06 = "5001800US2906"
288
+ MO_07 = "5001800US2907"
289
+ MO_08 = "5001800US2908"
290
+ MT_01 = "5001800US3001"
291
+ MT_02 = "5001800US3002"
292
+ NE_01 = "5001800US3101"
293
+ NE_02 = "5001800US3102"
294
+ NE_03 = "5001800US3103"
295
+ NV_01 = "5001800US3201"
296
+ NV_02 = "5001800US3202"
297
+ NV_03 = "5001800US3203"
298
+ NV_04 = "5001800US3204"
299
+ NH_01 = "5001800US3301"
300
+ NH_02 = "5001800US3302"
301
+ NJ_01 = "5001800US3401"
302
+ NJ_02 = "5001800US3402"
303
+ NJ_03 = "5001800US3403"
304
+ NJ_04 = "5001800US3404"
305
+ NJ_05 = "5001800US3405"
306
+ NJ_06 = "5001800US3406"
307
+ NJ_07 = "5001800US3407"
308
+ NJ_08 = "5001800US3408"
309
+ NJ_09 = "5001800US3409"
310
+ NJ_10 = "5001800US3410"
311
+ NJ_11 = "5001800US3411"
312
+ NJ_12 = "5001800US3412"
313
+ NM_01 = "5001800US3501"
314
+ NM_02 = "5001800US3502"
315
+ NM_03 = "5001800US3503"
316
+ NY_01 = "5001800US3601"
317
+ NY_02 = "5001800US3602"
318
+ NY_03 = "5001800US3603"
319
+ NY_04 = "5001800US3604"
320
+ NY_05 = "5001800US3605"
321
+ NY_06 = "5001800US3606"
322
+ NY_07 = "5001800US3607"
323
+ NY_08 = "5001800US3608"
324
+ NY_09 = "5001800US3609"
325
+ NY_10 = "5001800US3610"
326
+ NY_11 = "5001800US3611"
327
+ NY_12 = "5001800US3612"
328
+ NY_13 = "5001800US3613"
329
+ NY_14 = "5001800US3614"
330
+ NY_15 = "5001800US3615"
331
+ NY_16 = "5001800US3616"
332
+ NY_17 = "5001800US3617"
333
+ NY_18 = "5001800US3618"
334
+ NY_19 = "5001800US3619"
335
+ NY_20 = "5001800US3620"
336
+ NY_21 = "5001800US3621"
337
+ NY_22 = "5001800US3622"
338
+ NY_23 = "5001800US3623"
339
+ NY_24 = "5001800US3624"
340
+ NY_25 = "5001800US3625"
341
+ NY_26 = "5001800US3626"
342
+ NC_01 = "5001800US3701"
343
+ NC_02 = "5001800US3702"
344
+ NC_03 = "5001800US3703"
345
+ NC_04 = "5001800US3704"
346
+ NC_05 = "5001800US3705"
347
+ NC_06 = "5001800US3706"
348
+ NC_07 = "5001800US3707"
349
+ NC_08 = "5001800US3708"
350
+ NC_09 = "5001800US3709"
351
+ NC_10 = "5001800US3710"
352
+ NC_11 = "5001800US3711"
353
+ NC_12 = "5001800US3712"
354
+ NC_13 = "5001800US3713"
355
+ NC_14 = "5001800US3714"
356
+ ND_01 = "5001800US3800"
357
+ OH_01 = "5001800US3901"
358
+ OH_02 = "5001800US3902"
359
+ OH_03 = "5001800US3903"
360
+ OH_04 = "5001800US3904"
361
+ OH_05 = "5001800US3905"
362
+ OH_06 = "5001800US3906"
363
+ OH_07 = "5001800US3907"
364
+ OH_08 = "5001800US3908"
365
+ OH_09 = "5001800US3909"
366
+ OH_10 = "5001800US3910"
367
+ OH_11 = "5001800US3911"
368
+ OH_12 = "5001800US3912"
369
+ OH_13 = "5001800US3913"
370
+ OH_14 = "5001800US3914"
371
+ OH_15 = "5001800US3915"
372
+ OK_01 = "5001800US4001"
373
+ OK_02 = "5001800US4002"
374
+ OK_03 = "5001800US4003"
375
+ OK_04 = "5001800US4004"
376
+ OK_05 = "5001800US4005"
377
+ OR_01 = "5001800US4101"
378
+ OR_02 = "5001800US4102"
379
+ OR_03 = "5001800US4103"
380
+ OR_04 = "5001800US4104"
381
+ OR_05 = "5001800US4105"
382
+ OR_06 = "5001800US4106"
383
+ PA_01 = "5001800US4201"
384
+ PA_02 = "5001800US4202"
385
+ PA_03 = "5001800US4203"
386
+ PA_04 = "5001800US4204"
387
+ PA_05 = "5001800US4205"
388
+ PA_06 = "5001800US4206"
389
+ PA_07 = "5001800US4207"
390
+ PA_08 = "5001800US4208"
391
+ PA_09 = "5001800US4209"
392
+ PA_10 = "5001800US4210"
393
+ PA_11 = "5001800US4211"
394
+ PA_12 = "5001800US4212"
395
+ PA_13 = "5001800US4213"
396
+ PA_14 = "5001800US4214"
397
+ PA_15 = "5001800US4215"
398
+ PA_16 = "5001800US4216"
399
+ PA_17 = "5001800US4217"
400
+ RI_01 = "5001800US4401"
401
+ RI_02 = "5001800US4402"
402
+ SC_01 = "5001800US4501"
403
+ SC_02 = "5001800US4502"
404
+ SC_03 = "5001800US4503"
405
+ SC_04 = "5001800US4504"
406
+ SC_05 = "5001800US4505"
407
+ SC_06 = "5001800US4506"
408
+ SC_07 = "5001800US4507"
409
+ SD_01 = "5001800US4600"
410
+ TN_01 = "5001800US4701"
411
+ TN_02 = "5001800US4702"
412
+ TN_03 = "5001800US4703"
413
+ TN_04 = "5001800US4704"
414
+ TN_05 = "5001800US4705"
415
+ TN_06 = "5001800US4706"
416
+ TN_07 = "5001800US4707"
417
+ TN_08 = "5001800US4708"
418
+ TN_09 = "5001800US4709"
419
+ TX_01 = "5001800US4801"
420
+ TX_02 = "5001800US4802"
421
+ TX_03 = "5001800US4803"
422
+ TX_04 = "5001800US4804"
423
+ TX_05 = "5001800US4805"
424
+ TX_06 = "5001800US4806"
425
+ TX_07 = "5001800US4807"
426
+ TX_08 = "5001800US4808"
427
+ TX_09 = "5001800US4809"
428
+ TX_10 = "5001800US4810"
429
+ TX_11 = "5001800US4811"
430
+ TX_12 = "5001800US4812"
431
+ TX_13 = "5001800US4813"
432
+ TX_14 = "5001800US4814"
433
+ TX_15 = "5001800US4815"
434
+ TX_16 = "5001800US4816"
435
+ TX_17 = "5001800US4817"
436
+ TX_18 = "5001800US4818"
437
+ TX_19 = "5001800US4819"
438
+ TX_20 = "5001800US4820"
439
+ TX_21 = "5001800US4821"
440
+ TX_22 = "5001800US4822"
441
+ TX_23 = "5001800US4823"
442
+ TX_24 = "5001800US4824"
443
+ TX_25 = "5001800US4825"
444
+ TX_26 = "5001800US4826"
445
+ TX_27 = "5001800US4827"
446
+ TX_28 = "5001800US4828"
447
+ TX_29 = "5001800US4829"
448
+ TX_30 = "5001800US4830"
449
+ TX_31 = "5001800US4831"
450
+ TX_32 = "5001800US4832"
451
+ TX_33 = "5001800US4833"
452
+ TX_34 = "5001800US4834"
453
+ TX_35 = "5001800US4835"
454
+ TX_36 = "5001800US4836"
455
+ TX_37 = "5001800US4837"
456
+ TX_38 = "5001800US4838"
457
+ UT_01 = "5001800US4901"
458
+ UT_02 = "5001800US4902"
459
+ UT_03 = "5001800US4903"
460
+ UT_04 = "5001800US4904"
461
+ VT_01 = "5001800US5000"
462
+ VA_01 = "5001800US5101"
463
+ VA_02 = "5001800US5102"
464
+ VA_03 = "5001800US5103"
465
+ VA_04 = "5001800US5104"
466
+ VA_05 = "5001800US5105"
467
+ VA_06 = "5001800US5106"
468
+ VA_07 = "5001800US5107"
469
+ VA_08 = "5001800US5108"
470
+ VA_09 = "5001800US5109"
471
+ VA_10 = "5001800US5110"
472
+ VA_11 = "5001800US5111"
473
+ WA_01 = "5001800US5301"
474
+ WA_02 = "5001800US5302"
475
+ WA_03 = "5001800US5303"
476
+ WA_04 = "5001800US5304"
477
+ WA_05 = "5001800US5305"
478
+ WA_06 = "5001800US5306"
479
+ WA_07 = "5001800US5307"
480
+ WA_08 = "5001800US5308"
481
+ WA_09 = "5001800US5309"
482
+ WA_10 = "5001800US5310"
483
+ WV_01 = "5001800US5401"
484
+ WV_02 = "5001800US5402"
485
+ WI_01 = "5001800US5501"
486
+ WI_02 = "5001800US5502"
487
+ WI_03 = "5001800US5503"
488
+ WI_04 = "5001800US5504"
489
+ WI_05 = "5001800US5505"
490
+ WI_06 = "5001800US5506"
491
+ WI_07 = "5001800US5507"
492
+ WI_08 = "5001800US5508"
493
+ WY_01 = "5001800US5600"
494
+
495
+ def get_hierarchical_codes(self) -> List[str]:
496
+ """
497
+ Returns all applicable UCGID codes for this enum value in hierarchical order.
498
+
499
+ Returns:
500
+ List of UCGID codes from most specific to least specific
501
+
502
+ Examples:
503
+ UCGID.CA_23.get_hierarchical_codes() -> ["5001800US0623", "0400000US06", "0100000US"]
504
+ UCGID.CA.get_hierarchical_codes() -> ["0400000US06", "0100000US"]
505
+ UCGID.US.get_hierarchical_codes() -> ["0100000US"]
506
+ """
507
+ code = self.value
508
+ codes_list = [code]
509
+
510
+ # If it's a district code (Congressional District format: 5001800US + state + district)
511
+ if code.startswith("5001800US"):
512
+ # Extract state code from district code
513
+ state_code_num = code[9:11] # Extract 2-digit state code
514
+ state_code = f"0400000US{state_code_num}"
515
+
516
+ # Add state code if it exists in the enum
517
+ for state_enum in UCGID:
518
+ if state_enum.value == state_code:
519
+ codes_list.append(state_code)
520
+ break
521
+
522
+ # Add US code
523
+ codes_list.append("0100000US")
524
+
525
+ # If it's a state code (State format: 0400000US + state code)
526
+ elif code.startswith("0400000US"):
527
+ # Add US code
528
+ codes_list.append("0100000US")
529
+
530
+ # If it's already the US code, return as-is
531
+ # (US code: "0100000US")
532
+
533
+ return codes_list
534
+
535
+ def matches_hierarchy(self, target_code: str) -> bool:
536
+ """
537
+ Check if this UCGID code matches a target code in the hierarchy.
538
+
539
+ Args:
540
+ target_code: The target code to match against
541
+
542
+ Returns:
543
+ True if this code belongs to the target code's hierarchy
544
+
545
+ Examples:
546
+ UCGID.CA_23.matches_hierarchy("0400000US06") -> True (CA_23 is in CA)
547
+ UCGID.CA_23.matches_hierarchy("0100000US") -> True (CA_23 is in US)
548
+ UCGID.CA.matches_hierarchy("5001800US0623") -> False (CA is not CA_23)
549
+ """
550
+ hierarchical_codes = self.get_hierarchical_codes()
551
+ return target_code in hierarchical_codes
@@ -0,0 +1,12 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class ucgid_str(Variable):
5
+ value_type = str
6
+ entity = Household
7
+ label = "UCGID (string)"
8
+ documentation = "UCGID variable, stored as a string"
9
+ definition_period = YEAR
10
+
11
+ def formula(household, period, parameters):
12
+ return household("ucgid", period).decode_to_str()
@@ -0,0 +1,9 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class household_count(Variable):
5
+ value_type = float
6
+ entity = Household
7
+ label = "Households represented"
8
+ definition_period = YEAR
9
+ default_value = 1.0
@@ -0,0 +1,9 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class spm_unit_count(Variable):
5
+ value_type = float
6
+ entity = SPMUnit
7
+ label = "SPM units represented"
8
+ definition_period = YEAR
9
+ default_value = 1.0
@@ -0,0 +1,9 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class tax_unit_count(Variable):
5
+ value_type = float
6
+ entity = TaxUnit
7
+ label = "Tax units represented"
8
+ definition_period = YEAR
9
+ default_value = 1.0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: policyengine-us
3
- Version: 1.351.4
3
+ Version: 1.352.0
4
4
  Summary: Add your description here.
5
5
  Author-email: PolicyEngine <hello@policyengine.org>
6
6
  License-File: LICENSE
@@ -3014,7 +3014,7 @@ policyengine_us/params_on_demand/gov/hhs/medicaid/geography/medicaid_rating_area
3014
3014
  policyengine_us/reforms/__init__.py,sha256=FPV8k2633kzUhbKUK8jC6yJONbnZ5n9zLAq2UL57KH4,113
3015
3015
  policyengine_us/reforms/dc_kccatc.py,sha256=LyGMfEKe-0TgQ-2vCYGOD8W-EGEW8_DgIqCQP89qDyg,4283
3016
3016
  policyengine_us/reforms/dc_tax_threshold_joint_ratio.py,sha256=G-5E1EJFGZ3VeUl_fuyj82nMIttHRNRdlT-x98koJrk,1633
3017
- policyengine_us/reforms/reforms.py,sha256=GqiKd7dRYZS4vF-S9sra72FY_XWDZHTh7xOjjK5RY-Q,11932
3017
+ policyengine_us/reforms/reforms.py,sha256=9DUPk18pt7__WmlGSOLHU12Ym7XDdKCuaeqnEEidVyQ,11733
3018
3018
  policyengine_us/reforms/taxsim.py,sha256=bXNFWfjBX5USld1C7fziT6BBmRy-avz00QtL8WmCHy0,5276
3019
3019
  policyengine_us/reforms/winship.py,sha256=_q74Af1nkmoh0-M6PZJ2FcJAn6v5zf5sAEgvxjwHwyA,3069
3020
3020
  policyengine_us/reforms/additional_tax_bracket/__init__.py,sha256=087GDzojnzkbARUgGTQDMNVWJzjtNZvBGr46jfu1kXc,89
@@ -3083,8 +3083,6 @@ policyengine_us/reforms/reconciliation/reconciliation_charitable_deduction.py,sh
3083
3083
  policyengine_us/reforms/reconciliation/reconciliation_qbid_with_floor.py,sha256=EQWZ6d550cvFa1OTT9H2c6-076k0ooP1JKJqA77sjBU,2596
3084
3084
  policyengine_us/reforms/salt_phase_out/__init__.py,sha256=hrFYpSJFxELcG5l2xg38-3lT5oAqBpTGAxG8U5Jcd7E,73
3085
3085
  policyengine_us/reforms/salt_phase_out/salt_phase_out_reform.py,sha256=OfNb_kkd8ohfjchIStNaGtaphK-3eBPufWA2QTLzGlo,1823
3086
- policyengine_us/reforms/second_earner/__init__.py,sha256=pTtUV6BuWBPjUyp_Bj6YDbN0pyygzFw4aiMwYSlYggI,79
3087
- policyengine_us/reforms/second_earner/second_earner_tax_reform.py,sha256=iv33aMPnTModp0A3yRrI5ITrQUDLD5GuXEtPX_t7Quk,32572
3088
3086
  policyengine_us/reforms/snap/__init__.py,sha256=p98y33zLWFe0CMvINQzRAa6av-yHuejyBFYbciOEC4c,178
3089
3087
  policyengine_us/reforms/snap/abolish_snap_deductions.py,sha256=Ad4J4_qiCXa-ORIxWRCD372ITJiCRzdvqRedHOXX5dw,1032
3090
3088
  policyengine_us/reforms/snap/abolish_snap_net_income_test.py,sha256=KoWaDtPkYr5mLt-xcMT6UkmVcCo0UDRYaMVRfiCm9Rs,1166
@@ -5052,7 +5050,6 @@ policyengine_us/tests/policy/contrib/reconciliation/reconciliation_cdcc.yaml,sha
5052
5050
  policyengine_us/tests/policy/contrib/reconciliation/reconciliation_charitable_deduction.yaml,sha256=FeuKCLKePa4G-bWVcCGiK5CFmxK3nwppH3xEqKCRZ50,2336
5053
5051
  policyengine_us/tests/policy/contrib/reconciliation/reconciliation_qbid_with_floor.yaml,sha256=GrZzqHljo8pYanbg3HQ0UapuVEgXkteq9gazH13wmxY,1386
5054
5052
  policyengine_us/tests/policy/contrib/salt_phase_out/salt_phase_out_reform.yaml,sha256=xOwKAjQm-c191Ig2JoosB541CrQ8Xl4SSfXqUvvZmps,3602
5055
- policyengine_us/tests/policy/contrib/second_earner/second_earner_tax_reform.yaml,sha256=FAEAJplFE6y93Yo2y6ikOCjn6afbKzE168cU32_PcV0,10836
5056
5053
  policyengine_us/tests/policy/contrib/snap/abolish_snap_deductions.yaml,sha256=5pgcUuafSNIF2dWsBHMebB7YSrRq9svD0SkzJcvy6po,467
5057
5054
  policyengine_us/tests/policy/contrib/snap/abolish_snap_net_income_test.yaml,sha256=8zy1seb0mfTruajlBK01Vl1vajlABDQak0P-lWmwG98,427
5058
5055
  policyengine_us/tests/policy/contrib/snap_ea/mid_year_snap_ea_reform.py,sha256=ABpm6JVBoziFM3hKvil1xLkWOiz60c9UmcTl8rz_40E,410
@@ -5078,6 +5075,7 @@ policyengine_us/tests/policy/contrib/ubi_center/flat_tax.yaml,sha256=O6krfJ2rovW
5078
5075
  policyengine_us/tests/policy/reform/ctc_expansion.yaml,sha256=soq-LqWwbb7fNQJFphx_1gSc8uDGOhtr-5P93oY2Mpg,1596
5079
5076
  policyengine_us/tests/policy/reform/winship.yaml,sha256=OPfsoZ0NrlPU25hJadZXycrYLaM0wPUGXjBrn6_8gR4,1706
5080
5077
  policyengine_us/tests/utilities/test_load_county_fips_dataset.py,sha256=QAURDL6IMN5gafUOcTri1PUet6khLNZ_Bov6NdW_pMM,4397
5078
+ policyengine_us/tests/utilities/test_ucgid_hierarchical.py,sha256=_QBrBgX072aY-G1z7UwwNe_1pIUT9SfDMrNUhkPU-B4,2166
5081
5079
  policyengine_us/tools/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
5082
5080
  policyengine_us/tools/add_plotly_to_book.py,sha256=8V8jI6ob-FkNamfo7dZfiBsyT9N1uuUl2IFbo3SuG5E,935
5083
5081
  policyengine_us/tools/branched_simulation.py,sha256=oRIM-uiyilcwdFIQfE6-DIRND9bJlf5L-RrGNWzsrnc,1220
@@ -7678,9 +7676,13 @@ policyengine_us/variables/household/demographic/geographic/county/county_enum.py
7678
7676
  policyengine_us/variables/household/demographic/geographic/county/county_str.py,sha256=UDWJ8YqH4Ef_JTscy8LMwLAMQ_o-Zan13hziZBY3XPs,339
7679
7677
  policyengine_us/variables/household/demographic/geographic/state/average_home_energy_use_in_state.py,sha256=aaGYAXLU7tsx-A9NW4nyLij5J5mp0WTRXsyObngekvY,319
7680
7678
  policyengine_us/variables/household/demographic/geographic/state/in_state.py,sha256=o3ksZCOHtlJ1JGHIXAPlqcs5-rVbTgOCcDdN1-fYqmA,551
7679
+ policyengine_us/variables/household/demographic/geographic/ucgid/ucgid.py,sha256=RX4zSK6mqUoI10Jhe8XSDhrG-H0qOv3zmKMHeSl-TQY,3270
7680
+ policyengine_us/variables/household/demographic/geographic/ucgid/ucgid_enum.py,sha256=dkeusTBI1j4xAGmRFkfSsyT3Hq5gHZwRUkSeISeNbx0,15636
7681
+ policyengine_us/variables/household/demographic/geographic/ucgid/ucgid_str.py,sha256=ngH3tnYb6m96he1_Cj2dPtyc8nFDOsqlbjGOmh4c79A,335
7681
7682
  policyengine_us/variables/household/demographic/geographic/zip_code/three_digit_zip_code.py,sha256=7q0FQRahTOINiK2vlAyHEa5xIKowM5Kgl60-kR3ZuWU,426
7682
7683
  policyengine_us/variables/household/demographic/geographic/zip_code/zip_code.py,sha256=PZiLb84BgKQ_Suvd6iUiEnzySu3Vtiv8FOlfB4rnagQ,1691
7683
7684
  policyengine_us/variables/household/demographic/household/bedrooms.py,sha256=4ltdIRLdmeuTKAskn4pdgxZuxEE-4rz0ffPnIKobc-o,164
7685
+ policyengine_us/variables/household/demographic/household/household_count.py,sha256=f6dIPWyCtWlZ-qTSCPDrzCfINSzoJOE5Tw1ynBKYfGA,211
7684
7686
  policyengine_us/variables/household/demographic/household/household_size.py,sha256=DR5PS9bylHlPphL3-Y0ySR4E0cavAf6qyMpNJG2N3ig,263
7685
7687
  policyengine_us/variables/household/demographic/household/household_vehicle_value.py,sha256=2iIkkdx0bddROen2yC5HVPzLZq7FswPYfQLQdSOiYBM,197
7686
7688
  policyengine_us/variables/household/demographic/household/household_vehicles_owned.py,sha256=TcoVryjJbojB6BQNBauYNAPaWCoOgtyNo-QIwc7tW7g,186
@@ -7772,6 +7774,7 @@ policyengine_us/variables/household/demographic/person/years_in_military.py,sha2
7772
7774
  policyengine_us/variables/household/demographic/person/postpartum/count_days_postpartum.py,sha256=d8oTm11yv8MxuGk7pYTkmYAmUc0fGYY2znnKeTtMIVE,634
7773
7775
  policyengine_us/variables/household/demographic/person/postpartum/under_12_months_postpartum.py,sha256=olSjQDrPSoF2ReoOJdvQGxrQtC_ssXOlqjEWcUr5jLE,198
7774
7776
  policyengine_us/variables/household/demographic/person/postpartum/under_60_days_postpartum.py,sha256=CnyxJaqQlpeFH210qye9ZOtLci39f9Tao-KTZILmHfQ,209
7777
+ policyengine_us/variables/household/demographic/spm_unit/spm_unit_count.py,sha256=7EG_PisVfHK0SZu7FdfR7o5eU6Y_sq5zc3cWepVHTEE,207
7775
7778
  policyengine_us/variables/household/demographic/spm_unit/spm_unit_count_adults.py,sha256=mZ6kIBg5O5bW4ZTmRHCVaVMBLXy-q8z_yKN2vy4FWUg,299
7776
7779
  policyengine_us/variables/household/demographic/spm_unit/spm_unit_count_children.py,sha256=6MRJfySnAcwSf9BpMp3CtAeEBGCiVi4MxFNMlhN6Tso,213
7777
7780
  policyengine_us/variables/household/demographic/spm_unit/spm_unit_id.py,sha256=DV_RH3Mm84fGK-ZFmpH6vDeBA2WJxd-tTvgNXg1i0BE,302
@@ -7805,6 +7808,7 @@ policyengine_us/variables/household/demographic/tax_unit/spouse_separate_tax_uni
7805
7808
  policyengine_us/variables/household/demographic/tax_unit/surviving_spouse_eligible.py,sha256=7BKjhsg3GkEQ4ZtYofXdR2RQ3EArcytBMxAS97uhPCs,942
7806
7809
  policyengine_us/variables/household/demographic/tax_unit/tax_unit_child_dependents.py,sha256=m2xdtEuxi_hPTyRINC3ePcHxnHPLNgGQkY6JUUVbjCw,248
7807
7810
  policyengine_us/variables/household/demographic/tax_unit/tax_unit_children.py,sha256=717HdVz20j9lz2G71TMqjLbkeocpv13-oPHV2KdlarA,309
7811
+ policyengine_us/variables/household/demographic/tax_unit/tax_unit_count.py,sha256=GILRn5wc981vvLysMN-H6NCpA3lCYn6LpMUz_I_FEng,207
7808
7812
  policyengine_us/variables/household/demographic/tax_unit/tax_unit_dependents.py,sha256=Z3nskCJGmT55MHqscvSaPiGMQsVeW6J2ebqtAAI6avY,239
7809
7813
  policyengine_us/variables/household/demographic/tax_unit/tax_unit_grandparents.py,sha256=XXi3tXRm0ba4q2JmCrnKc5SnrAJaRXBeYiPQyWxoyGI,255
7810
7814
  policyengine_us/variables/household/demographic/tax_unit/tax_unit_household_id.py,sha256=1bth3yo2dbgyqWHQ01AQVZDlDcbLhMQ6TGdd3lTaoIU,384
@@ -8122,8 +8126,8 @@ policyengine_us/variables/input/farm_income.py,sha256=BEKxYmHNNnWJAAvULl5qZJigy5
8122
8126
  policyengine_us/variables/input/geography.py,sha256=XmBlgXhzBoLRKk6R8taVZHqUw1eU8MbNeGS9iJ7_l44,4506
8123
8127
  policyengine_us/variables/input/self_employment_income.py,sha256=PwsGz8R4lRikKWUYOhsC0qosNNLXq4f5SQmfw4S3mk8,511
8124
8128
  policyengine_us/variables/input/self_employment_income_before_lsr.py,sha256=E8fcX9Nlyqz8dziHhQv_euutdmoIwFMMWePUwbbwv_w,379
8125
- policyengine_us-1.351.4.dist-info/METADATA,sha256=H-OjdFUuH7HXuVduLxQWmB99M4sZmsUA4mhdJIM3u5s,1693
8126
- policyengine_us-1.351.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
8127
- policyengine_us-1.351.4.dist-info/entry_points.txt,sha256=MLaqNyNTbReALyKNkde85VkuFFpdPWAcy8VRG1mjczc,57
8128
- policyengine_us-1.351.4.dist-info/licenses/LICENSE,sha256=2N5ReRelkdqkR9a-KP-y-shmcD5P62XoYiG-miLTAzo,34519
8129
- policyengine_us-1.351.4.dist-info/RECORD,,
8129
+ policyengine_us-1.352.0.dist-info/METADATA,sha256=kvcpBQJ7IVyRd7h3IZNShSDb-FJl8Pzs93zNYBrJj8Q,1693
8130
+ policyengine_us-1.352.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
8131
+ policyengine_us-1.352.0.dist-info/entry_points.txt,sha256=MLaqNyNTbReALyKNkde85VkuFFpdPWAcy8VRG1mjczc,57
8132
+ policyengine_us-1.352.0.dist-info/licenses/LICENSE,sha256=2N5ReRelkdqkR9a-KP-y-shmcD5P62XoYiG-miLTAzo,34519
8133
+ policyengine_us-1.352.0.dist-info/RECORD,,