Skip to contents

Display boundary information in a table

Usage

rict_boundary(map, plan, seam, columns, adj_col = "adj", as_gt = TRUE)

Arguments

map

A redist_map or sf object.

plan

Column in map or vector of district assignments.

seam

Pair of districts in plan to focus on.

columns

columns in map to display in the output

adj_col

Name of column in map that contains adjacency information.

as_gt

Logical. Should output be a gt table? Default: TRUE.

Value

a gt_tbl if as_gt = TRUE, otherwise a tibble::tibble

Examples

rict_boundary(map = wv, plan = wv$cd_2020, seam = c(1, 2), columns = pop)
GEOID NAME pop pop_white pop_black pop_hisp pop_aian pop_asian pop_nhpi pop_other pop_two vap vap_white vap_black vap_hisp vap_aian vap_asian vap_nhpi vap_other vap_two state county cd_2010 cd_2020 pre_20_rep_tru pre_20_dem_bid ndv adv_20 nrv arv_20 geometry sample_1 sample_2 sample_3 sample_4 sample_5 sample_6 sample_7 sample_8 sample_9 sample_10 sample_11 sample_12 .rn
c(20, 22, 25, 33, 34, 48, 50) - 2
54083 Randolph County, West Virginia 27932 26033 424 312 56 96 1 85 925 22746 21358 352 200 48 76 1 67 644 WV 083 2 2 8673 3362 3362 3362 8673 8673 list(c(549280.6573766, 565683.9073032, 568570.8720246, 571885.2912613, 574105.2719378, 576179.059196, 575265.0386948, 599277.6182654, 607915.3996679, 612336.3709178, 613013.6099217, 611449.9722092, 603861.40975, 604669.9626565, 601512.3375957, 596607.6696052, 599316.3067327, 599124.935963, 594699.6006597, 588965.6785175, 586263.3319474, 582838.0201638, 579500.3249582, 575960.6708553, 568936.0714746, 568305.1801457, 553873.634302, 546158.0847493, 534856.0623112, 540353.2264175, 532133.2782312, 535965.1733464, 545566.8314868, 548046.6273612, 547147.6192035, 548568.2283368, 549280.6573766, 49815.354349, 52630.8854455, 63642.5070939, 68414.6103951, 67540.9687339, 64048.5445952, 59700.7943997, 52730.1363621, 52607.1245627, 51577.5423663, 50801.5347976, 47168.9746864, 47727.6979981, 44331.0582921, 42897.7014601, 37902.6822887, 33405.81272, 31163.4077008, 24119.7958967, 18237.8515092, 21028.4616013, 18426.417767, 23574.4808613, 26659.6496847, 9343.6037314, 5686.4584484, -4398.6199437, -2707.7327138, -12114.2340521, 3044.5674951, 21927.7420897, 27324.559308, 27481.2186601, 37979.2760103, 44326.9176945, 45733.3393627, 49815.354349)) 2 2 2 2 2 2 2 2 2 2 2 2 6
c(12, 21, 40, 51) - 2
54107 Wood County, West Virginia 84296 77718 1016 1174 148 564 17 209 3450 66918 62411 772 795 135 458 14 137 2196 WV 107 1 2 27202 10926 10926 10926 27202 27202 list(c(438701.4857686, 439309.6622848, 442544.9541495, 442744.5651015, 448084.8614954, 449901.808502, 447422.9962421, 444376.2147634, 444667.2273443, 436393.1983506, 433588.0731968, 422249.5166479, 419775.481658, 405613.9863923, 405988.6972082, 405063.8872635, 407926.3012627, 410808.5000125, 410452.3079935, 412054.6366633, 418092.4027193, 421362.8384142, 422639.2651053, 431549.301832, 435757.4168269, 436611.8869947, 438701.4857686, 95162.0177868, 92755.3774224, 92672.3840441, 90566.4644776, 89456.6808384, 86749.6076383, 85870.953093, 79444.442764, 77663.6689868, 72937.9369483, 72353.1775453, 63010.2001393, 60502.0119154, 68527.6375996, 74407.8142312, 77636.2344431, 81921.5622913, 83121.0087588, 86359.9049268, 88177.6238486, 88287.6226143, 87282.3143002, 95148.2255237, 102777.8115953, 100334.991642, 96703.9336073, 95162.0177868)) 1 2 1 1 1 1 1 1 2 2 1 1 8
c(7, 12, 23, 35, 40, 46, 47) - 2
54085 Ritchie County, West Virginia 8444 8116 16 80 6 19 7 8 192 6813 6570 16 44 6 16 7 8 146 WV 085 1 2 3649 586 586 586 3649 3649 list(c(444667.2273443, 444376.2147634, 447422.9962421, 449901.808502, 451551.4079481, 455967.6824215, 460413.1013076, 470041.8457813, 473897.2093919, 476175.1505801, 480831.9294965, 480208.2036475, 478006.3161087, 486443.951237, 486617.5207382, 477222.6808343, 473102.9151282, 470232.668714, 467171.8699275, 463586.654127, 458929.5864522, 456058.8792415, 452167.9528863, 448518.441786, 447674.6625715, 442321.8420468, 444667.2273443, 77663.6689868, 79444.442764, 85870.953093, 86749.6076383, 91120.1098868, 90785.2445931, 91778.7960456, 95556.4675684, 94231.1726967, 99413.3215904, 96277.4386849, 89105.428372, 86769.1797672, 68482.8476883, 67377.7009844, 61322.7033714, 60462.1813661, 57841.9153339, 57705.5944963, 57812.2658976, 61803.2583998, 60237.6527164, 61869.9079897, 60833.3361443, 68437.7342124, 72935.8710451, 77663.6689868)) 2 2 1 2 1 1 2 2 2 2 2 2 22
c(5, 25, 26, 27, 34, 42) - 2
54023 Grant County, West Virginia 10976 10463 83 91 21 24 0 20 274 8922 8522 61 66 13 24 0 16 220 WV 023 1 2 4871 607 607 607 4871 4871 list(c(601134.0575492, 602609.3722117, 606526.7694322, 610457.8817177, 615976.5492278, 618093.7463523, 619678.3012905, 631524.7607368, 644901.8366206, 640102.0545123, 640035.3361682, 637553.2229237, 635527.4602825, 636231.4680401, 639368.5839276, 636381.6223582, 631764.1363315, 613013.6099217, 612336.3709178, 613730.8313704, 616431.01469, 616035.5930948, 613132.3753895, 614588.9100133, 614543.0208205, 617816.6568724, 614408.2735353, 605609.3420411, 602810.676815, 601108.1484266, 601134.0575492, 78372.7674641, 78125.8911242, 80841.0918894, 85690.9167174, 89315.357292, 88758.4893342, 91981.8015945, 90264.4762948, 82017.7556183, 72263.9027049, 68855.7811657, 65268.7588641, 59830.6362747, 55603.8169879, 47702.98928, 41916.8032976, 34850.2569703, 50801.5347976, 51577.5423663, 52057.2441017, 58888.1642792, 63323.1911928, 65925.7231196, 68714.4802628, 71930.2969867, 76899.4177104, 79367.9975781, 76803.3946398, 75358.6726611, 77145.4845822, 78372.7674641)) 2 2 2 2 2 2 2 2 2 2 2 2 23
c(21, 31, 45, 46, 47) - 1
54021 Gilmer County, West Virginia 7408 6026 923 244 11 30 0 1 173 6276 4957 922 218 11 28 0 1 139 WV 021 1 1 2012 599 599 599 2012 2012 list(c(467171.8699275, 470232.668714, 473102.9151282, 477222.6808343, 486617.5207382, 486443.951237, 493743.351605, 494607.8652678, 504080.349737, 501069.1463492, 498491.1279303, 495740.2617647, 482649.7362937, 470852.6174846, 469822.9649674, 465639.0515947, 465141.1598499, 468689.4806039, 469539.0583813, 468742.4704812, 469692.4727366, 467301.8904515, 467171.8699275, 57705.5944963, 57841.9153339, 60462.1813661, 61322.7033714, 67377.7009844, 68482.8476883, 66856.0927209, 57157.4460656, 45459.2069649, 43903.9829238, 44257.2191901, 42777.1435299, 33326.0376071, 25257.3254776, 28545.6563742, 31209.0390978, 33452.6126595, 36867.8556481, 39682.8014956, 48054.0763588, 52267.5259243, 54880.2861133, 57705.5944963)) 2 2 2 2 2 1 2 2 1 1 2 2 24
c(5, 22, 27, 33) - 1
54071 Pendleton County, West Virginia 6143 5835 81 57 7 0 2 13 148 5102 4864 69 42 7 0 0 13 107 WV 071 2 1 2782 820 820 820 2782 2782 list(c(588965.6785175, 594699.6006597, 599124.935963, 599316.3067327, 596607.6696052, 601512.3375957, 604669.9626565, 603861.40975, 611449.9722092, 613013.6099217, 631764.1363315, 638484.2065132, 635428.10517, 635432.2342541, 632118.4674644, 629326.975499, 625653.4094189, 625252.0196467, 619242.7103752, 616398.5272346, 602039.687984, 596785.8766912, 587011.1790697, 589611.5017763, 588965.6785175, 18237.8515092, 24119.7958967, 31163.4077008, 33405.81272, 37902.6822887, 42897.7014601, 44331.0582921, 47727.6979981, 47168.9746864, 50801.5347976, 34850.2569703, 29115.6760978, 22540.2519316, 17788.8831555, 17075.1509723, 9281.9462432, 2763.4824687, -746.9735573, -8395.6629502, -9767.3660184, -4749.1689522, 5652.6280356, 10169.9093273, 13631.0368258, 18237.8515092)) 2 2 2 2 2 2 2 1 2 2 2 2 26
c(11, 22, 25) - 2
54031 Hardy County, West Virginia 14299 12685 403 659 16 53 0 31 452 11275 10174 312 421 16 44 0 15 293 WV 031 2 2 4859 1381 1381 1381 4859 4859 list(c(644901.8366206, 651868.609241, 666302.2958404, 669898.9723533, 675793.9629195, 677604.9909368, 681162.4868174, 685811.8183565, 680359.9923503, 682232.1383146, 677858.6322158, 676209.9253852, 673960.6538828, 671069.0419285, 667992.1075838, 665997.3777979, 661775.9784821, 654821.872075, 643926.9622063, 641073.8744747, 638670.6718531, 638484.2065132, 631764.1363315, 636381.6223582, 639368.5839276, 636231.4680401, 635527.4602825, 637553.2229237, 640035.3361682, 640102.0545123, 644901.8366206, 82017.7556183, 77781.5729291, 72434.5217064, 72101.1408683, 69033.8684082, 71478.446054, 70524.7187277, 65820.8317696, 59474.8562138, 57947.8919017, 51967.4874201, 53949.3280113, 52321.9411132, 47540.5669737, 45239.0824693, 47714.6591092, 42999.4668606, 29388.4744906, 38990.4926412, 32537.1287875, 31814.3374069, 29115.6760978, 34850.2569703, 41916.8032976, 47702.98928, 55603.8169879, 59830.6362747, 65268.7588641, 68855.7811657, 72263.9027049, 82017.7556183)) 2 2 2 2 2 2 2 2 2 2 2 2 28
c(17, 23, 45, 47, 49, 50) - 1
54007 Braxton County, West Virginia 12447 11939 50 85 19 23 11 15 305 10087 9722 46 54 19 23 11 14 198 WV 007 2 1 4120 1457 1457 1457 4120 4120 list(c(470852.6174846, 482649.7362937, 495740.2617647, 498491.1279303, 501069.1463492, 504080.349737, 505675.940677, 511123.8722232, 515442.2547007, 514386.0389224, 516890.6128234, 516763.0482274, 512184.1606517, 499641.3310529, 493939.3326277, 491588.2439675, 487960.9237125, 479512.4517791, 476837.9815621, 473005.3798139, 471283.5482625, 466694.3630879, 470852.6174846, 25257.3254776, 33326.0376071, 42777.1435299, 44257.2191901, 43903.9829238, 45459.2069649, 40760.2880398, 40785.8810585, 36993.2798205, 33808.0020492, 30981.1515057, 26994.8896362, 16651.3442427, 3593.9801308, 4809.1584087, 3751.4689784, 7193.9538394, 1707.5551607, 7984.8974165, 11830.7099998, 15091.1436303, 19768.932094, 25257.3254776)) 2 1 2 2 2 1 2 2 1 1 2 2 32
c(5, 9, 25, 50) - 1
54075 Pocahontas County, West Virginia 7869 7455 51 107 23 9 0 25 199 6523 6235 42 68 16 9 0 17 136 WV 075 3 1 2895 1047 1047 1047 2895 2895 list(c(524675.7536986, 525491.4562088, 527396.7286538, 534856.0623112, 546158.0847493, 553873.634302, 568305.1801457, 568936.0714746, 575960.6708553, 579500.3249582, 582838.0201638, 586263.3319474, 588965.6785175, 589611.5017763, 587011.1790697, 585804.5238892, 584266.0324596, 582632.0223754, 583436.1377665, 581951.1174577, 578659.4637155, 572869.831602, 574833.3454677, 569663.6706268, 565088.8412226, 560987.8716517, 562598.560381, 559633.724634, 546719.767634, 541236.0013084, 532861.0237905, 524272.408147, 524675.7536986, -30077.9489129, -16818.4765454, -17899.8630765, -12114.2340521, -2707.7327138, -4398.6199437, 5686.4584484, 9343.6037314, 26659.6496847, 23574.4808613, 18426.417767, 21028.4616013, 18237.8515092, 13631.0368258, 10169.9093273, 7829.6067878, 1193.6565371, -2740.6962341, -7595.0859405, -9335.8610162, -16184.6250586, -21599.3196315, -25129.7011635, -28808.0968233, -34002.7912632, -40807.4477757, -43528.1985556, -48338.3826392, -49133.5492857, -51285.772446, -50052.5029518, -42455.8888007, -30077.9489129)) 2 2 2 2 2 2 2 1 2 1 2 2 34
c(7, 15, 21, 47, 51) - 1
54105 Wirt County, West Virginia 5194 4999 6 22 4 0 4 8 151 4111 3977 0 13 2 0 4 8 107 WV 105 2 1 2134 466 466 466 2134 2134 list(c(444667.2273443, 442321.8420468, 447674.6625715, 448518.441786, 452167.9528863, 456058.8792415, 446309.0408811, 445765.8285619, 440042.3272037, 433928.2432052, 431111.9845688, 426331.0890213, 423027.2161817, 423983.5762046, 419775.481658, 422249.5166479, 433588.0731968, 436393.1983506, 444667.2273443, 77663.6689868, 72935.8710451, 68437.7342124, 60833.3361443, 61869.9079897, 60237.6527164, 49956.7369637, 47583.3908676, 45563.0834719, 48477.2332415, 50860.7805341, 48331.6607614, 52056.938232, 58144.6718743, 60502.0119154, 63010.2001393, 72353.1775453, 72937.9369483, 77663.6689868)) 1 1 1 1 2 1 1 2 2 2 2 1 41
c(16, 23, 31, 46, 48, 50) - 2
54041 Lewis County, West Virginia 17033 16088 66 191 19 58 7 23 581 13500 12837 53 118 19 48 7 15 403 WV 041 2 2 5782 1538 1538 1538 5782 5782 list(c(493743.351605, 496112.0080646, 499961.6103284, 501677.2776756, 505275.4687141, 509548.5762938, 516376.2481194, 517761.5629381, 530784.6536764, 529155.9937427, 527709.4389104, 528984.6851103, 526449.0327264, 523027.6301733, 520953.0741796, 522338.0587904, 517763.9408812, 516763.0482274, 516890.6128234, 514386.0389224, 515442.2547007, 511123.8722232, 505675.940677, 504080.349737, 494607.8652678, 493743.351605, 66856.0927209, 66236.6304793, 71796.8661823, 71405.3548169, 74632.9510995, 72870.8991862, 72130.5668401, 71316.0830391, 67345.8156274, 57322.5072067, 55464.5670174, 51493.0706638, 46493.3724971, 41989.538742, 30174.0156915, 25649.8275542, 25645.6794733, 26994.8896362, 30981.1515057, 33808.0020492, 36993.2798205, 40785.8810585, 40760.2880398, 45459.2069649, 57157.4460656, 66856.0927209)) 2 2 2 2 2 2 2 2 1 1 2 2 46
c(8, 16, 21, 23, 35, 45) - 2
54017 Doddridge County, West Virginia 7808 7290 174 77 15 15 0 15 222 6424 6006 168 49 15 13 0 6 167 WV 017 1 2 2619 435 435 435 2619 2619 list(c(480208.2036475, 485403.2931616, 493767.0460736, 495407.7245712, 500248.0911432, 503722.5265801, 506950.5770256, 510073.0926066, 510562.050048, 509952.5610714, 504731.3962722, 508240.2810695, 507951.7741019, 511133.5771401, 505275.4687141, 501677.2776756, 499961.6103284, 496112.0080646, 493743.351605, 486443.951237, 478006.3161087, 480208.2036475, 89105.428372, 94459.4905584, 100139.9730869, 103869.0246624, 104222.4295004, 106106.1477825, 106086.8315667, 103669.8321816, 98952.5988301, 95090.238866, 87849.0558586, 83482.2232441, 80557.5022399, 77743.0458732, 74632.9510995, 71405.3548169, 71796.8661823, 66236.6304793, 66856.0927209, 68482.8476883, 86769.1797672, 89105.428372)) 2 2 2 2 2 2 2 2 2 1 2 2 47
c(15, 21, 23, 31, 40, 49) - 1
54013 Calhoun County, West Virginia 6229 5976 13 48 12 12 2 2 164 5009 4829 8 31 12 12 0 0 117 WV 013 2 1 2364 568 568 568 2364 2364 list(c(445765.8285619, 446309.0408811, 456058.8792415, 458929.5864522, 463586.654127, 467171.8699275, 467301.8904515, 469692.4727366, 468742.4704812, 469539.0583813, 468689.4806039, 465141.1598499, 465639.0515947, 469822.9649674, 470852.6174846, 466694.3630879, 462056.9428937, 454972.2397195, 454647.4552857, 451608.2452044, 449961.0042311, 450933.7905555, 448409.1376718, 448704.2888511, 445765.8285619, 47583.3908676, 49956.7369637, 60237.6527164, 61803.2583998, 57812.2658976, 57705.5944963, 54880.2861133, 52267.5259243, 48054.0763588, 39682.8014956, 36867.8556481, 33452.6126595, 31209.0390978, 28545.6563742, 25257.3254776, 19768.932094, 13647.26638, 19192.2329166, 27974.4976267, 33037.530807, 33879.2616934, 37832.6238085, 40676.9753925, 43993.0228642, 47583.3908676)) 2 1 1 2 2 1 1 2 1 1 2 2 48
c(5, 16, 20, 45, 50) - 2
54097 Upshur County, West Virginia 23816 22349 211 316 37 87 5 28 783 18849 17760 182 217 33 79 5 28 545 WV 097 2 2 7771 2256 2256 2256 7771 7771 list(c(530784.6536764, 535230.9545562, 537109.9254625, 542221.2785908, 545626.8349632, 550898.035154, 552109.4343431, 549280.6573766, 548568.2283368, 547147.6192035, 548046.6273612, 545566.8314868, 535965.1733464, 532133.2782312, 529947.1291209, 525815.9201474, 522338.0587904, 520953.0741796, 523027.6301733, 526449.0327264, 528984.6851103, 527709.4389104, 529155.9937427, 530784.6536764, 67345.8156274, 66969.0952805, 68284.0029934, 65445.6448984, 59893.2599286, 59885.5067224, 52897.8356605, 49815.354349, 45733.3393627, 44326.9176945, 37979.2760103, 27481.2186601, 27324.559308, 21927.7420897, 20809.8311647, 25948.4280208, 25649.8275542, 30174.0156915, 41989.538742, 46493.3724971, 51493.0706638, 55464.5670174, 57322.5072067, 67345.8156274)) 2 1 2 2 2 2 2 2 2 2 2 2 49
c(5, 9, 17, 31, 33, 45, 48) - 1
54101 Webster County, West Virginia 8378 8086 10 50 14 4 2 7 205 6714 6516 10 23 10 4 0 5 146 WV 101 3 1 2759 610 610 610 2759 2759 list(c(499641.3310529, 512184.1606517, 516763.0482274, 517763.9408812, 522338.0587904, 525815.9201474, 529947.1291209, 532133.2782312, 540353.2264175, 534856.0623112, 527396.7286538, 525491.4562088, 524675.7536986, 518026.9798326, 503008.5976542, 501605.1284268, 498528.60703, 500374.3190789, 497209.1502045, 499641.3310529, 3593.9801308, 16651.3442427, 26994.8896362, 25645.6794733, 25649.8275542, 25948.4280208, 20809.8311647, 21927.7420897, 3044.5674951, -12114.2340521, -17899.8630765, -16818.4765454, -30077.9489129, -25404.8622198, -15080.6391727, -15550.1670659, -9058.0448917, -7786.7390921, 1060.9469482, 3593.9801308)) 2 1 2 2 2 2 2 2 1 1 1 2 51
c(7, 15, 28, 32, 40, 54) - 1
54035 Jackson County, West Virginia 27791 26411 100 230 43 91 2 62 852 21854 20949 65 145 34 68 1 24 568 WV 035 2 1 10093 3207 3207 3207 10093 10093 list(c(391011.3209467, 392682.8844732, 396281.9889995, 396722.5426284, 399394.6772477, 401815.8292685, 404395.0632468, 402256.820918, 403919.7095967, 399942.2026795, 405613.9863923, 419775.481658, 423983.5762046, 423027.2161817, 426331.0890213, 423971.7944137, 424465.9343287, 423599.8871026, 421894.8376688, 423874.484467, 418903.1232152, 414083.3108693, 408743.685445, 404434.6601816, 402236.7700051, 398796.8773228, 400782.1491361, 391468.9860103, 391011.3209467, 44816.771416, 44307.8015272, 47225.5599307, 50250.1450026, 52115.6094121, 49835.3469728, 50586.5837353, 54126.4912016, 59675.1611787, 64695.9483112, 68527.6375996, 60502.0119154, 58144.6718743, 52056.938232, 48331.6607614, 45495.6957503, 37945.5351695, 29540.533685, 21166.2631221, 14498.4860865, 10649.9911098, 8242.3625045, 16373.0657561, 22888.1479943, 22577.9824818, 26432.5285202, 28418.6966464, 43123.5720629, 44816.771416)) 1 1 1 1 1 1 1 1 1 1 1 1 52