Skip to content

Commit

Permalink
Merge pull request #326 from PSLmodels/pr-nearly-complete-state-exami…
Browse files Browse the repository at this point in the history
…nation

PR nearly complete state examination
  • Loading branch information
donboyd5 authored Dec 23, 2024
2 parents b9c929b + 1234354 commit d64cc28
Show file tree
Hide file tree
Showing 74 changed files with 6,298 additions and 85 deletions.
11 changes: 11 additions & 0 deletions tmd/areas/targets/prepare/prepare_cds/cds/raw_data/agilabels.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
agistub,agilo,agihi,agilabel
0,-9e99,9e99,Total
1,-9e99,1,Under $1
2,1,10000,"$1 under $10,000"
3,10000,25000,"$10,000 under $25,000"
4,25000,50000,"$25,000 under $50,000"
5,50000,75000,"$50,000 under $75,000"
6,75000,100000,"$75,000 under $100,000"
7,100000,200000,"$100,000 under $200,000"
8,200000,500000,"$200,000 under $500,000"
9,500000,9e99,"$500,000 or more"
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ mappings
#| label: get-data
#| output: false
agilabels <- read_csv(fs::path(DINTERMEDIATE, "agilabels.csv"))
agilabels <- read_csv(fs::path(DRAW, "agilabels.csv"))
agilabels
STAGICUTS <- c(agilabels$agilo, agilabels$agihi) |> unique() |> sort()
# agistub=cut(c00100, STAGICUTS, right = FALSE, ordered_result = TRUE) |> as.integer()
Expand Down Expand Up @@ -173,11 +173,13 @@ soivname_targets <- soivname_shares |>
left_join(tmdsums |>
select(tmdvar, basesoivname, agistub, scope, fstatus, count, tmdsum),
by = join_by(basesoivname, scope, fstatus, count, agistub)) |>
mutate(target=tmdsum * soi_share,
mutate(target=ifelse(agistub !=0, tmdsum * soi_share, NA_real_),
basesoivname=paste0("tmd", str_sub(tmdvar, 2, -1), "_shared_by_soi", basesoivname),
soivname=paste0(str_sub(soivname, 1, 1), basesoivname))
soivname=paste0(str_sub(soivname, 1, 1), basesoivname)) |>
mutate(target=if_else(agistub==0, sum(target[agistub != 0]), target),
.by=c(stabbr, tmdvar, basesoivname, scope, fstatus, count))
check <- soivname_targets |> filter(stabbr=="NY")
check <- soivname_targets |> filter(stabbr=="MN")
count(soivname_targets, tmdvar, basesoivname, soivname)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
!*.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
!*.csv
100 changes: 100 additions & 0 deletions tmd/areas/targets/prepare/target_file_library/states/ak_targets.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
varname,count,scope,agilo,agihi,fstatus,target
XTOT,0,0,-9e99,9e99,0,734923
c00100,0,1,1,10000,0,177471000
c00100,0,1,10000,25000,0,874782000
c00100,0,1,25000,50000,0,2855458000
c00100,0,1,50000,75000,0,3199366000
c00100,0,1,75000,100000,0,3105485000
c00100,0,1,100000,200000,0,8735919000
c00100,0,1,200000,500000,0,5702679000
c00100,0,1,500000,1000000,0,1786850000
c00100,1,1,-9e99,1,0,6450
c00100,1,1,1,10000,0,40520
c00100,1,1,10000,25000,0,50090
c00100,1,1,25000,50000,0,77590
c00100,1,1,50000,75000,0,51910
c00100,1,1,75000,100000,0,35820
c00100,1,1,100000,200000,0,63340
c00100,1,1,200000,500000,0,20240
c00100,1,1,500000,1000000,0,2670
c00100,1,1,-9e99,1,1,4460
c00100,1,1,1,10000,1,34420
c00100,1,1,10000,25000,1,37290
c00100,1,1,25000,50000,1,49320
c00100,1,1,50000,75000,1,26960
c00100,1,1,75000,100000,1,13560
c00100,1,1,100000,200000,1,12740
c00100,1,1,200000,500000,1,2690
c00100,1,1,500000,1000000,1,380
c00100,1,1,-9e99,1,2,1180
c00100,1,1,1,10000,2,2240
c00100,1,1,10000,25000,2,4440
c00100,1,1,25000,50000,2,12910
c00100,1,1,50000,75000,2,16140
c00100,1,1,75000,100000,2,17760
c00100,1,1,100000,200000,2,46660
c00100,1,1,200000,500000,2,16890
c00100,1,1,500000,1000000,2,2180
c00100,1,1,-9e99,1,4,580
c00100,1,1,1,10000,4,3020
c00100,1,1,10000,25000,4,6890
c00100,1,1,25000,50000,4,12160
c00100,1,1,50000,75000,4,6730
c00100,1,1,75000,100000,4,3420
c00100,1,1,100000,200000,4,2890
c00100,1,1,200000,500000,4,480
c00100,1,1,500000,1000000,4,70
e00200,0,1,-9e99,1,0,49153000
e00200,0,1,1,10000,0,117171000
e00200,0,1,10000,25000,0,620028000
e00200,0,1,25000,50000,0,2307108000
e00200,0,1,50000,75000,0,2463690000
e00200,0,1,75000,100000,0,2274758000
e00200,0,1,100000,200000,0,6119623000
e00200,0,1,200000,500000,0,3314353000
e00200,0,1,500000,1000000,0,747523000
e00300,0,1,-9e99,1,0,4399000
e00300,0,1,1,10000,0,1663000
e00300,0,1,10000,25000,0,3573000
e00300,0,1,25000,50000,0,6889000
e00300,0,1,50000,75000,0,9792000
e00300,0,1,75000,100000,0,10387000
e00300,0,1,100000,200000,0,32688000
e00300,0,1,200000,500000,0,34088000
e00300,0,1,500000,1000000,0,18386000
e01500,0,1,-9e99,1,0,22759361.06376764
e01500,0,1,1,10000,0,19774014.200674955
e01500,0,1,10000,25000,0,75625712.10945766
e01500,0,1,25000,50000,0,237843939.47933373
e01500,0,1,50000,75000,0,408793828.37465686
e01500,0,1,75000,100000,0,526964777.3371406
e01500,0,1,100000,200000,0,1749301286.8165658
e01500,0,1,200000,500000,0,1187662911.0498068
e01500,0,1,500000,1000000,0,200706098.56180203
e02400,0,1,1,10000,0,167241548.85320172
e02400,0,1,10000,25000,0,142210405.6643498
e02400,0,1,25000,50000,0,182992203.34839907
e02400,0,1,50000,75000,0,171631682.60310838
e02400,0,1,75000,100000,0,167722161.38670084
e02400,0,1,100000,200000,0,363417854.33653986
e02400,0,1,200000,500000,0,142079419.24080473
e02400,0,1,500000,1000000,0,21582921.780859116
e18400,0,1,10000,25000,0,388345.0165697672
e18400,0,1,25000,50000,0,1792111.3251061104
e18400,0,1,50000,75000,0,3378159.3786518993
e18400,0,1,75000,100000,0,4106972.586477614
e18400,0,1,100000,200000,0,14958615.171105493
e18400,0,1,200000,500000,0,13147938.195255997
e18400,0,1,500000,1000000,0,3702982.910013336
e18500,0,1,10000,25000,0,5441007.988954351
e18500,0,1,25000,50000,0,16319379.0287261
e18500,0,1,50000,75000,0,23994124.561735224
e18500,0,1,75000,100000,0,29143455.230350222
e18500,0,1,100000,200000,0,99967611.72634736
e18500,0,1,200000,500000,0,77890353.75955041
e18500,0,1,500000,1000000,0,18598795.65017968
e26270,0,1,50000,75000,0,14419000
e26270,0,1,75000,100000,0,23274000
e26270,0,1,100000,200000,0,132290000
e26270,0,1,200000,500000,0,418590000
e26270,0,1,500000,1000000,0,386552000
102 changes: 102 additions & 0 deletions tmd/areas/targets/prepare/target_file_library/states/al_targets.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
varname,count,scope,agilo,agihi,fstatus,target
XTOT,0,0,-9e99,9e99,0,5050380
c00100,0,1,1,10000,0,1361947000
c00100,0,1,10000,25000,0,7963560000
c00100,0,1,25000,50000,0,18960369000
c00100,0,1,50000,75000,0,17908229000
c00100,0,1,75000,100000,0,15993545000
c00100,0,1,100000,200000,0,38926303000
c00100,0,1,200000,500000,0,23284622000
c00100,0,1,500000,1000000,0,8713234000
c00100,1,1,-9e99,1,0,52970
c00100,1,1,1,10000,0,255340
c00100,1,1,10000,25000,0,465170
c00100,1,1,25000,50000,0,524220
c00100,1,1,50000,75000,0,291640
c00100,1,1,75000,100000,0,184500
c00100,1,1,100000,200000,0,286600
c00100,1,1,200000,500000,0,82290
c00100,1,1,500000,1000000,0,12910
c00100,1,1,-9e99,1,1,34070
c00100,1,1,1,10000,1,193600
c00100,1,1,10000,25000,1,273370
c00100,1,1,25000,50000,1,264330
c00100,1,1,50000,75000,1,119250
c00100,1,1,75000,100000,1,47980
c00100,1,1,100000,200000,1,38880
c00100,1,1,200000,500000,1,8040
c00100,1,1,500000,1000000,1,1270
c00100,1,1,-9e99,1,2,10030
c00100,1,1,1,10000,2,22010
c00100,1,1,10000,25000,2,54060
c00100,1,1,25000,50000,2,109290
c00100,1,1,50000,75000,2,115950
c00100,1,1,75000,100000,2,116080
c00100,1,1,100000,200000,2,232770
c00100,1,1,200000,500000,2,71880
c00100,1,1,500000,1000000,2,11260
c00100,1,1,-9e99,1,4,7520
c00100,1,1,1,10000,4,35860
c00100,1,1,10000,25000,4,129410
c00100,1,1,25000,50000,4,133620
c00100,1,1,50000,75000,4,45520
c00100,1,1,75000,100000,4,16130
c00100,1,1,100000,200000,4,10990
c00100,1,1,200000,500000,4,1590
c00100,1,1,500000,1000000,4,210
e00200,0,1,-9e99,1,0,212651000
e00200,0,1,1,10000,0,1030744000
e00200,0,1,10000,25000,0,6024268000
e00200,0,1,25000,50000,0,15565947000
e00200,0,1,50000,75000,0,13784268000
e00200,0,1,75000,100000,0,11791842000
e00200,0,1,100000,200000,0,28195533000
e00200,0,1,200000,500000,0,14070346000
e00200,0,1,500000,1000000,0,3918293000
e00300,0,1,-9e99,1,0,20662000
e00300,0,1,1,10000,0,13895000
e00300,0,1,10000,25000,0,31590000
e00300,0,1,25000,50000,0,51626000
e00300,0,1,50000,75000,0,55615000
e00300,0,1,75000,100000,0,54489000
e00300,0,1,100000,200000,0,151622000
e00300,0,1,200000,500000,0,140342000
e00300,0,1,500000,1000000,0,71755000
e01500,0,1,-9e99,1,0,128060913.63511772
e01500,0,1,1,10000,0,226531258.1354106
e01500,0,1,10000,25000,0,973883413.6536642
e01500,0,1,25000,50000,0,2327333808.1351776
e01500,0,1,50000,75000,0,2580965839.0113945
e01500,0,1,75000,100000,0,2697317990.348714
e01500,0,1,100000,200000,0,6780470225.772297
e01500,0,1,200000,500000,0,3906403719.622845
e01500,0,1,500000,1000000,0,759565724.279979
e02400,0,1,-9e99,1,0,428530059.6416034
e02400,0,1,1,10000,0,1055994779.752142
e02400,0,1,10000,25000,0,1785277253.866064
e02400,0,1,25000,50000,0,2071275137.929531
e02400,0,1,50000,75000,0,1582065835.9625442
e02400,0,1,75000,100000,0,1315218533.865211
e02400,0,1,100000,200000,0,2273984262.698532
e02400,0,1,200000,500000,0,733255813.574718
e02400,0,1,500000,1000000,0,120873421.64291602
e18400,0,1,10000,25000,0,17243636.275313694
e18400,0,1,25000,50000,0,81097854.96461362
e18400,0,1,50000,75000,0,137926577.40263173
e18400,0,1,75000,100000,0,166097986.32720947
e18400,0,1,100000,200000,0,764753433.1122922
e18400,0,1,200000,500000,0,806384303.782975
e18400,0,1,500000,1000000,0,289198817.4734942
e18500,0,1,10000,25000,0,13256217.285015505
e18500,0,1,25000,50000,0,34651080.8696945
e18500,0,1,50000,75000,0,51770217.084914915
e18500,0,1,75000,100000,0,54782823.17567619
e18500,0,1,100000,200000,0,230547180.73151723
e18500,0,1,200000,500000,0,217923706.4624672
e18500,0,1,500000,1000000,0,67704775.94418363
e26270,0,1,25000,50000,0,13660000
e26270,0,1,50000,75000,0,75209000
e26270,0,1,75000,100000,0,106808000
e26270,0,1,100000,200000,0,649753000
e26270,0,1,200000,500000,0,1872095000
e26270,0,1,500000,1000000,0,1886917000
102 changes: 102 additions & 0 deletions tmd/areas/targets/prepare/target_file_library/states/ar_targets.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
varname,count,scope,agilo,agihi,fstatus,target
XTOT,0,0,-9e99,9e99,0,3028443
c00100,0,1,1,10000,0,838082000
c00100,0,1,10000,25000,0,4844171000
c00100,0,1,25000,50000,0,11951542000
c00100,0,1,50000,75000,0,10889011000
c00100,0,1,75000,100000,0,9546530000
c00100,0,1,100000,200000,0,21014002000
c00100,0,1,200000,500000,0,13085140000
c00100,0,1,500000,1000000,0,4946525000
c00100,1,1,-9e99,1,0,37700
c00100,1,1,1,10000,0,157110
c00100,1,1,10000,25000,0,280900
c00100,1,1,25000,50000,0,331430
c00100,1,1,50000,75000,0,177260
c00100,1,1,75000,100000,0,110260
c00100,1,1,100000,200000,0,155920
c00100,1,1,200000,500000,0,45440
c00100,1,1,500000,1000000,0,7370
c00100,1,1,-9e99,1,1,22900
c00100,1,1,1,10000,1,115500
c00100,1,1,10000,25000,1,168430
c00100,1,1,25000,50000,1,162510
c00100,1,1,50000,75000,1,65990
c00100,1,1,75000,100000,1,25200
c00100,1,1,100000,200000,1,20660
c00100,1,1,200000,500000,1,4810
c00100,1,1,500000,1000000,1,760
c00100,1,1,-9e99,1,2,8660
c00100,1,1,1,10000,2,17210
c00100,1,1,10000,25000,2,39930
c00100,1,1,25000,50000,2,81720
c00100,1,1,50000,75000,2,83510
c00100,1,1,75000,100000,2,75850
c00100,1,1,100000,200000,2,128750
c00100,1,1,200000,500000,2,39280
c00100,1,1,500000,1000000,2,6410
c00100,1,1,-9e99,1,4,5180
c00100,1,1,1,10000,4,21620
c00100,1,1,10000,25000,4,66640
c00100,1,1,25000,50000,4,75760
c00100,1,1,50000,75000,4,21850
c00100,1,1,75000,100000,4,7250
c00100,1,1,100000,200000,4,4740
c00100,1,1,200000,500000,4,940
c00100,1,1,500000,1000000,4,140
e00200,0,1,-9e99,1,0,153252000
e00200,0,1,1,10000,0,628172000
e00200,0,1,10000,25000,0,3644097000
e00200,0,1,25000,50000,0,9876718000
e00200,0,1,50000,75000,0,8300111000
e00200,0,1,75000,100000,0,6952199000
e00200,0,1,100000,200000,0,14795895000
e00200,0,1,200000,500000,0,8120832000
e00200,0,1,500000,1000000,0,2439346000
e00300,0,1,-9e99,1,0,12552000
e00300,0,1,1,10000,0,8672000
e00300,0,1,10000,25000,0,20978000
e00300,0,1,25000,50000,0,30667000
e00300,0,1,50000,75000,0,33380000
e00300,0,1,75000,100000,0,34278000
e00300,0,1,100000,200000,0,88351000
e00300,0,1,200000,500000,0,81934000
e00300,0,1,500000,1000000,0,40625000
e01500,0,1,-9e99,1,0,90189691.28618006
e01500,0,1,1,10000,0,142827259.67982012
e01500,0,1,10000,25000,0,504628769.7437956
e01500,0,1,25000,50000,0,1164080255.0430355
e01500,0,1,50000,75000,0,1451214371.6539268
e01500,0,1,75000,100000,0,1507731796.601425
e01500,0,1,100000,200000,0,3387696470.2103343
e01500,0,1,200000,500000,0,1580126517.2269697
e01500,0,1,500000,1000000,0,377685427.4784277
e02400,0,1,-9e99,1,0,420482546.78448415
e02400,0,1,1,10000,0,703996519.8347614
e02400,0,1,10000,25000,0,990263130.8067788
e02400,0,1,25000,50000,0,1201034913.1099908
e02400,0,1,50000,75000,0,975808059.2493362
e02400,0,1,75000,100000,0,798276137.2725163
e02400,0,1,100000,200000,0,1278394993.8777795
e02400,0,1,200000,500000,0,375254756.2291313
e02400,0,1,500000,1000000,0,58398865.795921616
e18400,0,1,10000,25000,0,10370767.636740835
e18400,0,1,25000,50000,0,37521929.410779014
e18400,0,1,50000,75000,0,65647259.7132893
e18400,0,1,75000,100000,0,90858697.69920333
e18400,0,1,100000,200000,0,467503633.1822532
e18400,0,1,200000,500000,0,543082588.1754701
e18400,0,1,500000,1000000,0,205602083.16508964
e18500,0,1,10000,25000,0,9718314.15458303
e18500,0,1,25000,50000,0,21780599.54972812
e18500,0,1,50000,75000,0,30975642.417858414
e18500,0,1,75000,100000,0,34515743.74744543
e18500,0,1,100000,200000,0,146309543.75071782
e18500,0,1,200000,500000,0,130486518.84560518
e18500,0,1,500000,1000000,0,37043427.215633184
e26270,0,1,25000,50000,0,40224000
e26270,0,1,50000,75000,0,80947000
e26270,0,1,75000,100000,0,105414000
e26270,0,1,100000,200000,0,529190000
e26270,0,1,200000,500000,0,1273768000
e26270,0,1,500000,1000000,0,1008579000
Loading

0 comments on commit d64cc28

Please sign in to comment.