Module:US elections imagemap/data
Appearance
This module is rated as beta, and is ready for widespread use. It is still new and should be used with some caution to ensure the results are as expected. |
Usage
This module provides data for Module:US elections imagemap.
Cycles
Name | Description |
---|---|
None | None |
SenateClass1 | Class 1 United States Senate seats |
SenateClass2 | Class 2 United States Senate seats |
SenateClass3 | Class 3 United States Senate seats |
SenateClass1pre1960 | Same as above, excluding Alaska and Hawaii |
SenateClass2pre1960 | |
SenateClass3pre1960 | |
Gov0 | State governors elections in year modulo 4 |
Gov1 | |
Gov2 | |
Gov3 | |
StateLegLower0 | State legislative elections in year modulo 4 |
StateLegLower1 | |
StateLegLower2 | |
StateLegLower3 | |
StateLegUpper0 | |
StateLegUpper1 | |
StateLegUpper2 | |
StateLegUpper3 | |
StateLegUpper2Redist | Same as StateLegUpper2 , but also including Minnesota, which holds a Senate election in the x2 year following redistricting (and otherwise only in cycle 0).
|
StateLegUpper3Redist | Same as StateLegUpper2 , but also including New Jersey, which holds a Senate election in the x3 year following redistricting (and otherwise only in cycle 1).
|
Gov0WithTerritories | Same as Gov0 , but with Puerto Rico and American Samoa
|
Gov2WithTerritories | Same as Gov2 , but with Guam, United States Virgin Islands, and Northern Mariana Islands
|
AllStates | All 50 states |
AllRegular | All states, plus territories (PR, AS, GU, MP, and VI) |
All | All of the above, plus insets for special elections (currently exist for AL, CA, GA, KS, MN, MS, NC, ND, NY, OK, SC, TN, and WY). Not recommended! |
local p = {}
-- shapes
p.stateshapes = {
-- states
AL = "poly 666 361 622 365 622 438 626 466 629 467 631 463 631 459 635 460 638 467 637 468 636 468 636 469 638 469 642 467 642 460 638 456 638 451 659 448 686 446 686 445 684 443 683 433 683 424 685 421 685 419 683 418 683 414 679 411 670 376 667 369",
AK = "poly 160 539 160 454 154 450 152 449 149 451 145 449 142 448 140 449 134 445 128 445 125 443 125 439 122 439 119 440 119 438 115 434 113 434 111 437 104 437 99 439 96 438 92 440 92 443 88 447 78 447 77 447 76 449 78 453 82 458 82 462 83 465 85 465 85 468 87 472 87 475 83 475 78 473 77 470 79 469 78 467 74 467 72 468 72 469 70 468 61 468 61 469 62 471 65 474 65 477 64 478 64 481 68 485 74 485 77 487 80 487 80 486 84 486 85 488 83 489 83 495 80 499 76 498 76 497 71 499 68 497 65 496 63 498 63 501 55 506 54 512 57 513 56 516 54 517 55 520 57 522 58 526 64 527 65 526 67 527 67 533 64 533 65 537 64 539 66 540 67 539 72 539 72 541 74 540 75 541 75 546 76 546 77 543 78 542 80 542 80 545 85 543 85 545 81 550 80 555 75 557 74 559 74 561 68 561 63 563 62 565 58 564 53 565 49 567 45 569 42 568 39 568 37 569 37 571 38 572 40 571 43 570 45 571 47 571 50 570 53 569 55 568 58 568 58 569 62 568 65 567 66 568 67 568 68 567 72 567 73 568 75 566 73 565 74 564 78 561 83 560 94 555 103 548 100 545 100 543 104 539 106 539 108 537 108 536 114 530 116 529 117 527 122 527 122 529 123 531 120 532 119 531 116 532 114 535 112 538 112 539 111 541 114 541 114 543 110 543 110 545 115 545 122 539 124 539 125 541 126 541 127 540 129 540 129 543 130 543 134 538 134 537 131 540 130 539 132 536 131 535 129 537 129 533 132 531 136 531 138 535 139 536 141 538 143 538 146 541 156 541 162 544 166 543 167 541 168 542 168 545 167 546 167 547 170 548 176 552 178 554 181 556 184 556 184 557 183 559 183 561 185 563 186 568 188 569 193 575 193 569 195 571 195 575 196 576 197 573 199 574 199 578 201 580 200 581 199 581 200 583 201 582 202 585 205 590 205 589 204 586 204 585 207 586 208 587 208 582 207 581 207 579 209 580 212 582 214 585 216 586 218 582 218 578 217 574 209 571 206 570 206 568 202 562 198 556 197 554 192 551 192 549 189 549 189 545 186 544 182 546 182 549 177 552 177 549 170 543 170 540 169 539 167 539 166 540 162 540",
AZ = "poly 235 434 197 429 135 391 135 390 137 388 143 387 144 383 143 381 140 380 140 374 146 370 146 364 147 360 154 356 154 353 152 351 152 345 149 342 149 339 151 337 152 316 154 313 157 315 160 318 163 318 165 314 167 296 206 303 224 307 252 311 244 374",
AR = "poly 569 412 517 412 517 404 514 401 511 402 509 402 508 401 508 361 507 356 507 342 505 338 505 337 538 336 584 335 585 338 584 340 581 342 580 344 580 346 590 346 590 348 589 349 589 353 584 356 584 359 585 360 584 365 582 366 582 369 578 372 578 374 577 376 577 378 574 382 571 385 571 387 572 387 572 389 568 391 568 395 567 397 567 399 568 401 567 402 567 404 569 406",
CA = "poly 28 148 51 155 71 161 92 166 76 231 148 338 147 341 150 347 151 351 153 354 152 356 149 358 146 360 145 363 144 366 144 368 139 373 139 381 142 384 140 386 123 386 92 381 93 367 82 351 76 351 74 357 76 359 76 360 74 360 73 359 71 367 72 370 73 371 71 371 70 370 70 366 71 367 73 359 71 356 72 355 74 357 76 351 77 349 76 344 73 343 70 343 69 342 66 341 65 340 53 340 47 340 45 338 46 337 48 337 51 340 53 340 51 338 51 337 53 337 55 339 57 339 57 340 65 340 66 341 66 339 63 335 62 333 60 331 56 330 53 329 50 327 45 326 42 324 42 321 44 315 45 313 45 310 43 308 43 306 39 300 37 296 35 290 34 285 30 281 31 273 33 273 35 271 35 266 33 265 31 265 28 260 27 254 28 249 29 246 29 244 23 238 24 231 17 217 16 212 18 204 19 203 19 195 17 189 16 185 14 185 14 183 16 177 22 172 26 161 27 152",
CO = "poly 254 309 261 259 265 223 324 230 380 235 374 321 316 316",
CT = "poly 869 166 861 168 845 171 845 176 847 180 847 195 857 186 861 184 868 182 872 180 871 172",
DE = "poly 822 227 819 229 819 232 820 234 821 238 823 240 823 245 824 247 825 252 826 256 836 254 836 251 835 250 834 248 830 246 826 238 823 236 822 231",
FL = "poly 639 452 674 448 686 448 691 454 740 451 741 454 746 455 746 448 745 447 745 445 755 446 761 462 768 475 774 483 780 489 779 491 779 494 781 501 785 504 787 510 792 518 795 523 797 547 795 548 795 556 797 555 797 553 798 553 797 556 796 558 795 562 792 566 785 572 782 574 778 574 775 573 772 576 769 577 768 579 769 579 771 577 773 577 774 576 777 576 778 574 782 574 782 572 788 569 792 564 794 561 796 557 796 555 795 556 795 557 792 560 789 561 786 561 783 564 781 563 780 563 780 559 779 559 779 557 777 554 776 551 773 550 772 548 768 548 766 549 764 547 764 542 762 540 760 537 758 537 757 538 755 538 754 534 750 529 749 526 745 521 742 519 742 517 747 511 747 508 742 507 740 507 740 509 742 509 742 511 742 514 740 512 740 511 739 509 738 507 738 501 739 499 739 488 736 485 736 483 734 481 729 481 727 479 725 476 722 475 722 472 719 472 717 468 714 467 713 466 711 465 709 464 705 464 704 465 702 465 702 468 703 469 699 469 697 471 694 473 688 474 686 475 685 473 682 470 671 465 665 463 659 463 651 464 644 467 643 459 639 456",
GA = "poly 710 356 668 361 668 367 673 377 681 411 684 413 684 417 686 417 686 421 685 425 684 431 686 435 686 440 685 441 685 443 687 444 688 448 691 452 742 450 742 453 743 453 744 448 743 445 743 444 745 443 748 444 756 444 754 440 754 437 758 425 758 421 761 416 760 414 758 415 755 413 755 409 752 406 748 403 747 399 744 394 740 392 737 388 733 384 730 381 723 378 717 367 712 367 707 363 707 359",
HI = "poly 215 493 215 550 250 592 354 592 354 546 301 493",
ID = "poly 175 28 188 30 184 48 184 53 186 58 187 59 186 62 186 66 187 68 191 71 193 77 196 83 198 85 199 86 201 86 202 90 195 105 195 109 198 112 202 112 205 109 208 125 214 132 214 138 216 140 218 138 221 138 223 139 227 139 228 138 233 139 235 140 237 140 239 137 241 137 242 141 244 141 235 194 188 186 141 177 152 135 154 131 153 129 150 129 150 125 152 122 155 118 158 117 158 114 164 106 167 103 167 98 163 96 163 83 166 67 170 47",
IL = "poly 568 201 590 201 613 199 613 204 617 209 618 216 623 265 622 267 622 273 624 276 625 282 622 284 622 287 617 293 617 304 614 306 615 307 617 309 614 311 612 311 610 313 611 316 612 317 610 319 609 317 606 317 605 316 600 319 598 321 595 319 594 315 595 314 595 310 592 308 592 305 590 304 585 304 578 295 578 292 580 287 582 284 582 281 578 280 572 281 571 278 571 274 558 263 558 259 556 257 556 251 559 248 559 245 562 243 562 239 565 237 565 233 562 230 562 229 564 226 570 225 573 222 573 219 576 216 576 211 568 202",
IN = "poly 662 210 631 213 626 216 624 217 620 216 623 243 624 274 626 276 626 283 623 288 623 289 620 294 619 300 620 300 626 298 632 298 633 300 634 300 635 297 638 296 640 296 641 298 642 298 642 295 647 292 650 294 653 294 653 289 661 281 661 277 665 277 670 274 669 272 666 240",
IA = "poly 486 245 484 243 483 236 483 233 481 231 481 225 479 222 478 216 475 210 475 205 473 202 472 201 472 197 473 195 474 189 471 186 471 182 503 182 556 181 556 183 559 186 557 188 557 194 560 198 565 199 566 201 566 203 570 205 570 207 575 211 574 217 572 219 572 221 570 223 564 224 561 227 561 232 563 233 563 236 561 237 561 242 557 244 557 247 556 248 553 245 553 243 515 244",
KS = "poly 376 321 380 257 420 259 491 260 493 263 497 263 498 265 496 267 496 271 502 279 504 292 503 325 436 324",
KY = "poly 700 319 709 314 709 311 721 299 712 290 712 288 708 285 708 277 704 276 704 274 703 273 698 277 696 277 696 275 692 275 691 276 687 276 687 274 682 274 680 273 679 270 677 268 675 268 675 269 670 269 670 271 671 272 671 275 665 279 662 279 662 283 654 290 654 295 649 295 647 294 644 296 644 299 641 300 640 298 637 298 634 302 633 302 630 300 622 300 619 302 617 306 617 308 618 309 618 310 612 313 612 316 613 316 613 319 613 320 609 320 606 318 604 318 600 320 601 322 602 324 602 326 601 327 601 329 597 332 620 330 620 327",
LA = "poly 522 488 523 483 524 481 524 473 525 472 525 471 524 470 524 468 526 465 527 455 526 454 526 451 521 446 521 441 518 435 517 414 541 414 568 413 568 419 569 420 570 425 571 426 571 429 570 430 570 433 568 437 567 441 565 442 565 444 562 447 562 457 565 458 597 457 596 464 600 468 602 474 600 475 599 478 600 480 603 480 603 479 605 475 606 475 607 477 607 479 608 480 608 481 606 482 604 482 603 484 602 484 602 487 604 490 608 490 615 493 615 495 613 496 608 495 605 493 601 493 599 489 595 490 595 493 596 494 594 497 591 498 590 499 590 498 592 497 591 494 589 494 586 495 585 497 582 499 578 499 571 495 573 492 571 489 567 490 565 485 560 485 558 484 556 484 555 486 555 488 560 488 562 489 562 490 559 490 558 489 554 489 553 490 547 490 542 487 535 485 530 485 524 486",
ME = "poly 868 92 865 92 869 106 875 125 877 132 879 132 881 134 881 136 883 137 883 133 884 133 884 126 886 125 886 124 885 123 885 121 886 120 887 118 889 118 890 120 891 120 894 117 896 116 897 113 900 113 901 111 901 104 900 102 901 100 903 102 905 103 905 105 905 106 903 106 903 107 903 109 904 110 906 110 906 109 904 107 904 106 905 106 907 106 908 104 908 102 907 102 907 100 910 97 913 97 914 99 911 99 909 100 909 102 910 103 911 103 912 101 913 100 913 99 915 99 919 94 923 91 924 90 926 89 927 85 927 82 924 78 924 77 922 77 921 79 919 79 917 77 916 71 909 71 901 41 892 37 886 42 885 44 882 43 880 40 879 39 878 39 876 44 874 52 872 56 872 65 870 68 870 73 872 74 872 77 870 80 868 84",
MD = "poly 758 242 759 252 764 247 766 247 770 242 774 242 778 239 781 239 784 240 789 244 791 245 793 247 796 247 800 239 804 247 811 247 811 248 807 253 808 261 801 258 800 259 800 263 803 264 810 265 814 267 816 267 815 264 811 257 810 251 811 249 811 247 810 244 811 240 815 236 816 237 816 239 813 241 813 243 816 245 816 250 814 251 814 255 816 253 817 255 815 256 815 260 819 263 821 263 821 265 822 270 823 270 823 266 821 264 821 263 822 262 824 263 826 266 828 266 830 265 835 264 836 262 837 256 834 256 832 257 824 257 822 245 819 236 817 230",
MA = "poly 844 169 844 155 857 153 876 148 877 146 879 144 881 144 883 146 883 149 881 150 881 154 883 158 884 156 886 156 893 165 896 165 900 163 900 161 899 158 895 158 895 157 898 157 900 159 902 163 902 164 901 165 897 166 894 168 893 169 892 171 892 172 894 172 895 173 902 173 903 172 904 172 904 174 902 174 902 173 896 173 895 174 893 174 893 175 891 175 891 174 892 172 889 174 889 173 891 171 891 168 890 167 887 168 887 173 885 173 882 167 877 162 859 166",
MI = "poly 632 211 685 206 686 203 690 200 690 194 692 193 693 188 694 186 696 187 698 187 698 177 692 160 688 155 682 158 682 161 679 164 678 167 675 167 672 165 672 161 674 159 677 156 676 153 679 151 679 140 676 137 675 135 678 134 674 129 670 129 662 124 658 125 654 122 654 118 655 116 664 115 666 116 671 117 673 114 670 112 667 113 667 114 669 114 668 116 666 116 661 112 661 106 660 104 659 105 651 107 647 107 647 101 646 100 639 104 632 104 629 105 624 110 621 111 619 110 618 109 617 109 616 110 611 110 609 107 609 105 606 103 601 102 600 101 599 101 596 104 594 104 594 102 597 98 597 96 600 94 601 92 603 91 605 91 605 90 604 89 602 89 598 90 595 92 591 97 589 98 588 100 588 101 585 102 583 103 582 105 579 106 575 106 574 108 569 110 569 112 570 114 572 116 575 116 588 119 591 120 595 121 597 122 600 122 602 123 603 123 604 125 607 126 609 127 609 133 610 137 612 138 613 136 615 131 615 128 617 126 618 124 620 124 621 125 622 124 624 123 626 123 627 124 628 124 629 122 630 119 639 118 641 116 648 116 652 117 654 117 654 122 652 123 649 125 649 128 652 129 653 130 653 131 650 132 646 133 647 137 647 142 645 144 642 145 642 140 644 137 644 135 642 135 641 137 641 140 636 142 636 147 634 148 634 156 632 159 632 166 633 167 633 169 632 169 632 173 636 180 639 188 639 195 638 198 638 201 635 205 635 209",
MN = "poly 475 180 475 141 469 137 469 135 472 132 472 118 470 113 469 106 469 101 468 99 468 88 464 82 464 68 465 65 463 63 463 61 493 61 494 53 498 55 498 62 501 67 505 67 507 69 512 69 513 71 517 71 521 68 528 71 535 74 538 74 539 73 540 76 544 78 546 80 551 80 556 76 557 76 559 79 561 79 561 78 570 78 571 81 575 79 577 80 573 83 569 84 563 87 559 89 552 95 552 98 549 100 537 110 536 123 528 130 528 134 531 138 531 141 529 143 529 155 533 158 536 158 539 161 541 161 549 169 551 170 555 174 555 179 512 180",
MS = "poly 603 473 607 468 610 469 614 468 614 466 617 466 619 468 624 468 624 459 619 435 621 365 602 367 584 367 584 369 579 374 579 381 577 382 573 386 573 390 570 392 569 398 570 400 570 402 569 404 571 406 571 410 570 412 570 420 572 421 572 425 574 426 574 428 572 429 573 434 570 437 568 442 564 447 564 457 598 455 599 456 599 460 598 461 598 464 602 467",
MO = "poly 505 335 505 284 504 281 504 277 497 270 497 268 499 266 499 264 498 262 493 261 487 252 486 247 551 245 555 249 555 257 557 261 557 264 566 272 570 275 570 280 572 281 578 281 580 283 580 286 578 288 576 296 585 305 589 305 591 307 591 310 593 312 593 314 593 316 594 320 596 322 599 323 600 327 593 333 593 339 591 340 592 343 588 345 584 344 583 342 587 339 586 335 584 333 541 335",
MT = "poly 189 31 252 43 304 50 361 56 358 102 354 142 302 137 246 129 245 140 243 139 242 134 239 134 236 138 234 138 232 137 226 137 225 137 223 137 221 136 217 137 215 137 215 131 210 124 207 108 205 107 202 110 199 110 197 109 197 105 204 87 203 85 200 85 196 79 195 75 193 72 191 69 187 67 187 62 188 58 185 53",
NE = "poly 489 257 486 253 485 249 482 244 482 234 480 231 480 225 477 222 475 212 473 205 470 204 469 201 458 196 451 197 448 199 440 192 418 192 352 188 349 231 382 234 380 256 438 257 445 258",
NV = "poly 148 336 77 231 94 167 136 177 187 187 163 313 161 316 159 313 153 311 151 313 150 335",
NH = "poly 863 93 860 93 859 94 860 105 862 108 862 112 855 118 855 119 856 119 856 151 876 146 877 143 882 141 882 139 880 137 880 134 877 133 875 133 873 123",
NJ = "poly 842 195 832 192 828 190 826 192 826 197 824 198 824 200 825 201 825 204 823 206 824 208 826 209 827 211 833 215 833 218 830 220 826 226 824 227 824 232 829 236 833 238 836 238 836 244 839 240 839 235 841 235 846 224 845 211 843 207 840 208 840 206 842 204",
NM = "poly 237 433 249 350 254 311 331 320 357 322 356 331 355 332 348 429 320 427 281 424 281 430 264 428 253 426 252 435",
NY = "poly 830 107 818 111 811 112 806 114 797 126 794 131 790 134 790 138 794 138 794 141 793 142 793 144 795 145 795 148 793 150 790 150 789 153 786 156 779 158 776 160 772 160 771 158 763 158 751 163 751 165 752 165 753 168 755 169 756 172 756 175 753 177 753 179 745 186 745 192 816 177 817 180 821 180 822 182 822 185 825 188 828 188 833 190 841 193 844 194 844 204 850 203 857 200 865 194 871 189 868 187 864 191 857 195 854 195 851 194 847 198 845 200 845 198 846 196 846 194 844 193 844 191 845 190 845 181 842 168 843 151 840 140 839 138 836 137 836 136 837 135 837 133 834 128 834 122 834 117",
NC = "poly 732 316 741 315 771 312 831 299 836 308 839 312 842 314 844 317 844 326 844 327 842 327 838 331 836 331 841 327 843 326 843 318 841 314 841 313 840 313 840 314 838 314 838 320 835 321 833 326 830 327 825 326 825 328 826 328 827 329 827 331 826 333 826 335 827 336 829 336 831 337 833 334 834 335 833 338 830 340 830 342 825 342 819 344 812 350 809 354 807 360 807 364 802 364 796 365 787 357 773 349 766 349 754 351 751 346 731 346 726 347 715 352 710 354 694 357 690 357 690 354 692 352 695 351 695 347 701 344 703 344 710 338 713 337 713 335 716 332 721 332 723 328 727 328 728 326 729 323 732 321",
ND = "poly 357 121 361 88 363 57 385 59 424 61 460 61 463 65 462 82 463 84 464 88 466 91 467 104 468 107 468 114 470 118 471 127 417 126",
OH = "poly 670 267 664 211 688 208 690 211 697 210 699 213 704 213 707 211 714 210 722 201 731 196 736 224 734 225 734 230 735 230 734 246 728 253 724 253 720 258 720 263 719 264 718 263 716 263 714 266 714 273 713 274 713 277 709 277 705 274 705 272 703 271 700 272 698 274 697 274 696 273 691 273 690 274 689 274 687 272 683 273 682 272 681 269 677 266",
OK = "poly 358 332 359 322 404 324 446 326 503 326 503 334 504 341 506 363 507 400 505 399 500 397 497 394 495 394 492 396 490 395 488 394 486 394 484 396 481 395 479 395 479 397 476 399 473 398 469 396 465 396 465 394 463 394 463 396 461 398 459 398 455 397 454 394 449 393 448 395 445 395 444 392 442 391 442 389 437 389 437 390 435 390 433 389 432 388 428 388 427 387 423 387 423 384 421 382 419 383 417 383 417 382 414 383 410 378 410 359 411 343 412 334",
OR = "poly 29 146 26 142 27 139 28 128 34 120 38 114 44 102 49 88 53 80 58 64 61 61 66 61 67 64 70 64 73 67 73 77 78 81 86 81 87 80 89 80 90 81 93 81 93 82 96 82 99 84 104 85 104 84 106 84 107 86 113 86 114 85 117 85 118 86 133 85 161 92 161 96 165 99 165 102 163 104 162 107 159 110 157 112 157 115 155 117 153 117 149 122 148 125 148 129 149 130 151 130 152 132 151 133 140 176 89 164 56 155",
PA = "poly 743 186 738 192 733 194 734 201 742 242 772 237 819 228 822 225 825 224 828 220 832 216 826 212 825 210 821 210 821 206 824 203 824 201 822 200 823 197 824 196 824 192 827 189 823 189 821 187 820 182 815 181 814 179 773 188 744 193",
RI = "poly 877 164 872 165 873 170 874 180 877 179 880 175 883 175 884 173",
SC = "poly 708 361 708 359 711 357 711 355 716 354 728 348 750 347 754 352 770 350 784 357 795 366 791 371 788 377 788 383 785 387 782 388 782 390 777 395 777 397 772 402 767 402 767 404 768 405 768 406 763 412 760 413 757 413 756 410 756 407 753 405 750 403 749 399 747 396 747 394 744 392 742 391 739 387 727 377 724 376 721 372 720 369 718 367 717 365 712 365",
SD = "poly 353 187 357 124 411 127 471 128 471 132 467 134 467 138 473 142 473 180 470 182 470 187 473 190 472 193 469 199 466 197 461 196 458 195 452 195 449 196 441 190 423 191 384 188",
TN = "poly 586 366 587 360 586 359 586 357 590 355 595 334 621 332 621 328 727 318 729 316 730 316 730 320 727 323 726 327 724 326 721 327 720 330 718 330 716 329 711 334 711 336 708 337 701 343 699 343 697 345 694 346 694 349 689 352 688 357 637 362",
TX = "poly 350 431 353 376 357 334 410 336 408 365 408 379 414 385 418 384 422 384 421 387 424 388 428 390 432 390 436 392 437 391 440 390 445 397 448 397 450 395 452 395 455 398 460 400 464 396 469 398 475 400 477 400 479 398 482 397 485 398 487 396 489 397 493 397 495 396 503 400 506 401 510 404 512 403 515 403 516 432 516 433 517 438 519 441 520 446 524 451 525 458 525 463 522 467 522 468 523 472 523 475 522 481 521 483 521 487 514 489 509 492 505 493 503 497 499 499 486 510 477 513 467 520 463 521 458 527 454 527 453 529 455 531 451 545 451 551 453 559 454 566 455 569 457 567 456 559 454 554 454 552 453 550 453 544 455 535 460 527 464 522 465 522 465 523 461 528 458 532 455 535 453 545 454 545 454 550 455 551 455 556 457 558 458 561 458 567 457 567 453 571 450 571 446 568 442 567 436 567 432 563 426 562 419 559 417 554 417 551 415 547 413 546 413 540 412 539 412 536 413 535 410 532 407 530 402 521 396 517 396 514 391 502 391 499 389 497 389 495 380 488 380 486 378 483 372 483 371 482 362 482 361 481 358 480 355 481 350 485 349 490 345 493 345 495 342 498 340 498 338 496 332 494 329 490 325 489 317 480 315 476 315 466 312 463 312 460 308 455 304 454 295 444 294 440 288 438 288 435 285 432 283 430 283 426 316 429",
UT = "poly 168 295 189 188 235 196 231 220 264 224 262 245 253 309",
VT = "poly 854 152 855 144 854 142 854 132 855 130 855 120 854 119 854 116 856 116 860 112 860 107 858 105 858 99 844 104 832 107 833 113 835 116 836 124 835 125 835 128 838 131 838 134 839 137 841 137 843 146 844 148 844 154",
VA = "poly 704 319 711 314 711 311 722 299 727 304 732 304 734 302 737 303 742 302 743 297 745 299 748 296 753 294 753 288 756 281 759 275 759 269 763 272 767 271 768 269 768 263 772 262 772 260 777 256 777 254 778 253 778 247 789 251 789 248 794 254 794 262 798 260 798 264 803 266 809 268 811 268 814 270 817 270 818 271 818 277 820 278 820 280 820 281 817 281 817 284 820 285 822 287 822 289 820 291 820 293 824 293 827 292 827 286 826 282 826 277 828 273 829 267 834 265 834 268 831 271 831 283 829 286 827 285 827 292 831 298 770 310 728 315 728 316",
WA = "poly 161 91 161 82 174 28 116 13 93 7 92 8 93 10 94 13 90 12 88 12 86 13 85 12 84 12 85 15 87 16 87 15 88 15 88 18 89 18 90 16 91 12 94 13 95 16 94 18 94 26 94 28 95 30 94 31 93 31 92 28 90 26 90 23 92 22 92 20 91 20 89 21 88 23 88 25 85 24 80 22 74 21 72 19 69 18 64 12 62 12 61 13 61 17 60 18 60 21 61 23 61 37 61 38 62 39 62 42 65 44 65 45 61 45 60 46 60 48 62 49 63 51 62 52 61 54 59 55 59 58 60 59 60 60 61 60 61 59 65 59 65 60 68 60 68 63 72 63 73 65 75 67 75 77 80 80 84 80 87 78 92 80 98 81 99 83 106 83 109 84 114 84 115 83 119 83 119 84 136 84",
WV = "poly 741 244 737 226 736 226 736 246 731 252 728 255 726 255 722 260 721 262 722 263 722 265 720 266 718 265 716 267 716 274 714 275 714 278 710 279 710 285 713 286 714 288 714 290 721 297 723 297 726 302 732 302 734 300 737 301 741 300 742 295 745 296 747 294 751 294 752 292 752 290 751 288 757 274 758 267 761 267 763 269 765 269 767 261 770 260 770 258 775 254 777 251 777 245 779 245 787 249 787 245 784 242 781 240 780 240 775 244 770 244 767 248 765 248 760 254 758 254 756 242",
WI = "poly 538 123 538 111 541 109 544 111 545 111 551 109 557 105 559 104 561 105 559 107 558 111 558 112 560 112 561 111 563 111 564 113 567 113 571 118 574 118 599 124 601 124 604 127 607 128 608 137 612 140 607 146 606 152 607 154 611 150 611 148 620 136 620 137 620 140 614 152 613 158 614 159 614 162 612 163 612 168 613 169 613 174 612 175 611 179 610 180 610 182 611 184 611 189 613 193 613 197 598 198 566 200 565 198 562 197 559 194 559 188 561 186 557 183 557 174 553 169 550 168 544 161 542 160 540 160 538 156 534 156 532 154 531 143 533 140 533 138 530 134 530 130 535 126",
WY = "poly 233 218 248 131 298 138 354 144 350 194 346 230",
-- territories
PR = "rect 636 557 561 515", -- Puerto Rico
AS = "rect 682 557 636 591",-- American Samoa
DC = "poly 795 260 800 257 807 260 806 253 810 248 803 248 800 241 797 248 790 248 796 254",-- Washington, D.C.
GU = "rect 599 556 561 591", -- Guam
MP = "rect 634 591 599 557", -- Northern Mariana Islands
VI = "rect 681 516 636 555", -- United States Virgin Islands
-- special elections (rectangular insets)
ALS = "rect 635 385 660 420",
AKS = "rect 95 470 145 520",
CAS = "rect 50 250 77 290",
COS = "rect 300 250 340 290",
CTS = "rect 850 173 868 181",
FLS = "rect 750 490 770 515",
GAS = "rect 702 391 725 423",
IDS = "rect 175 130 200 165",
KYS = "rect 660 290 700 315",
KSS = "rect 425 275 450 310",
LAS = "rect 533 435 558 470",
MNS = "rect 492 115 516 149",
MSS = "rect 583 396 607 430",
MTS = "rect 250 70 300 100",
NCS = "rect 760 317 800 342",
NDS = "rect 400 75 425 110",
NES = "rect 400 200 430 245",
NMS = "rect 280 350 320 390",
NHS = "rect 859 120 871 140",
NYS = "rect 800 136 825 171",
OKS = "rect 444 346 471 375",
ORS = "rect 70 100 110 140",
SCS = "rect 740 360 770 385",
TNS = "rect 640 330 670 355",
VAS = "rect 770 270 800 295",
VTS = "rect 842 120 853 140",
WVS = "rect 725 265 745 290",
WYS = "rect 281 164 306 199"
}
-- various election cycles
p.cycles = {
None = {}, -- none, use with individually added states
-- senate classes
SenateClass1 = {"AZ", "CA", "CT", "DE", "FL", "HI", "IN", "ME", "MD", "MA", "MI", "MN", "MS", "MO", "MT", "NE", "NV", "NJ", "NM", "NY", "ND", "OH", "PA", "RI", "TN", "TX", "UT", "VT", "VA", "WA", "WV", "WI", "WY"}, -- has 33 members
SenateClass2 = {"AL", "AK", "AR", "CO", "DE", "GA", "ID", "IL", "IA", "KS", "KY", "LA", "ME", "MA", "MI", "MN", "MS", "MT", "NE", "NH", "NJ", "NM", "NC", "OK", "OR", "RI", "SC", "SD", "TN", "TX", "VA", "WV", "WY"}, -- has 33 members
SenateClass3 = {"AL", "AK", "AZ", "AR", "CA", "CO", "CT", "FL", "GA", "HI", "ID", "IL", "IN", "IA", "KS", "KY", "LA", "MD", "MO", "NV", "NH", "NY", "NC", "ND", "OH", "OK", "OR", "PA", "SC", "SD", "UT", "VT", "WA", "WI"}, -- has 34 members
-- pre-1960 (no Alaska or Hawaii)
SenateClass1pre1960 = {"AZ", "CA", "CT", "DE", "FL", "IN", "ME", "MD", "MA", "MI", "MN", "MS", "MO", "MT", "NE", "NV", "NJ", "NM", "NY", "ND", "OH", "PA", "RI", "TN", "TX", "UT", "VT", "VA", "WA", "WV", "WI", "WY"}, -- has 32 members
SenateClass2pre1960 = {"AL", "AR", "CO", "DE", "GA", "ID", "IL", "IA", "KS", "KY", "LA", "ME", "MA", "MI", "MN", "MS", "MT", "NE", "NH", "NJ", "NM", "NC", "OK", "OR", "RI", "SC", "SD", "TN", "TX", "VA", "WV", "WY"}, -- has 32 members
SenateClass3pre1960 = {"AL", "AZ", "AR", "CA", "CO", "CT", "FL", "GA", "ID", "IL", "IN", "IA", "KS", "KY", "LA", "MD", "MO", "NV", "NH", "NY", "NC", "ND", "OH", "OK", "OR", "PA", "SC", "SD", "UT", "VT", "WA", "WI"}, -- has 32 members
-- election year % 4 (2000 -> 0, 2001 -> 1, 2002 -> 2, 2003 -> 3)
Gov0 = {"DE", "IN", "MO", "MT", "NH", "NC", "ND", "UT", "VT", "WA", "WV"}, -- has 11 members
Gov1 = {"NJ", "VA"}, -- has 2 members
Gov2 = {"AL", "AK", "AZ", "AR", "CA", "CO", "CT", "FL", "GA", "HI", "ID", "IL", "IA", "KS", "ME", "MD", "MA", "MI", "MN", "NE", "NV", "NH", "NM", "NY", "OH", "OK", "OR", "PA", "RI", "SC", "SD", "TN", "TX", "VT", "WI", "WY"}, -- has 36 members
Gov3 = {"KY", "LA", "MS"}, -- has 3 members
Gov0WithTerritories = {"DE", "IN", "MO", "MT", "NH", "NC", "ND", "UT", "VT", "WA", "WV", "PR", "AS"}, -- has 13 members (same as above + Puerto Rico and American Samoa)
Gov2WithTerritories = {"AL", "AK", "AZ", "AR", "CA", "CO", "CT", "FL", "GA", "HI", "ID", "IL", "IA", "KS", "ME", "MD", "MA", "MI", "MN", "NE", "NV", "NH", "NM", "NY", "OH", "OK", "OR", "PA", "RI", "SC", "SD", "TN", "TX", "VT", "WI", "WY", "GU", "MP", "VI"}, -- has 39 members (same as above + Guam, United States Virgin Islands, and Northern Mariana Islands)
-- lower house (same formula as gov)
StateLegLower0 = {"CA", "NV", "WA", "OR", "AK", "HI", "AZ", "UT", "ID", "MT", "WY", "CO", "NM", "TX", "OK", "KS", "NE", "ND", "SD", "MN", "IA", "MO", "AR", "WI", "IL", "MI", "IN", "KY", "TN", "FL", "GA", "SC", "NC", "WV", "OH", "PA", "DE", "NY", "CT", "RI", "MA", "VT", "NH", "ME"},
StateLegLower1 = {"NJ", "VA"},
StateLegLower2 = {"CA", "NV", "WA", "OR", "AK", "HI", "AZ", "UT", "ID", "MT", "WY", "CO", "NM", "TX", "OK", "KS", "NE", "ND", "SD", "MN", "IA", "MO", "AR", "WI", "IL", "MI", "IN", "KY", "TN", "FL", "GA", "SC", "NC", "WV", "OH", "PA", "DE", "NY", "CT", "RI", "MA", "VT", "NH", "ME", "MD", "AL"},
StateLegLower3 = {"LA", "MS", "NJ", "VA"},
-- upper house (same formula as above)
StateLegUpper0 = {"CA", "NV", "WA", "OR", "AK", "HI", "AZ", "UT", "ID", "MT", "WY", "CO", "NM", "TX", "OK", "KS", "NE", "ND", "SD", "MN", "IA", "MO", "AR", "WI", "IL", "IN", "KY", "TN", "FL", "GA", "SC", "NC", "WV", "OH", "PA", "DE", "NY", "CT", "RI", "MA", "VT", "NH", "ME"}, -- same as lower house, except for the lack of Michigan
StateLegUpper1 = {"NJ"},
StateLegUpper2 = {"CA", "NV", "WA", "OR", "AK", "HI", "AZ", "UT", "ID", "MT", "WY", "CO", "TX", "OK", "NE", "ND", "SD", "IA", "MO", "AR", "WI", "IL", "IN", "KY", "TN", "FL", "GA", "NC", "WV", "OH", "PA", "DE", "NY", "CT", "RI", "MA", "VT", "NH", "ME", "MI", "AL", "MD"}, -- same as StateLegUpper0, +Michigan +Alabama +Maryland -Minnesota -NewMexico -Kansas -SouthCarolina
StateLegUpper2Redist = {"CA", "NV", "WA", "OR", "AK", "HI", "AZ", "UT", "ID", "MT", "WY", "CO", "TX", "OK", "NE", "ND", "SD", "IA", "MO", "AR", "WI", "IL", "IN", "KY", "TN", "FL", "GA", "NC", "WV", "OH", "PA", "DE", "NY", "CT", "RI", "MA", "VT", "NH", "ME", "MI", "AL", "MD", "MN"}, -- same as StateLegUpper2, but also with Minnesota (which has elections for all seats in the x2 year following redistricting)
StateLegUpper3 = {"LA", "MS", "VA"},
StateLegUpper3Redist = {"LA", "MS", "VA", "NJ"}, -- same as StateLegUpper2, but also with New Jersey (which has elections for all seats in the x2 year following redistricting)
-- all
AllStates = {"AL", "AK", "AZ", "AR", "CA", "CO", "CT", "DE", "FL", "GA", "HI", "ID", "IL", "IN", "IA", "KS", "KY", "LA", "ME", "MD", "MA", "MI", "MN", "MS", "MO", "MT", "NE", "NV", "NH", "NJ", "NM", "NY", "NC", "ND", "OH", "OK", "OR", "PA", "RI", "SC", "SD", "TN", "TX", "UT", "VT", "VA", "WA", "WV", "WI", "WY"}, -- has 50 members
AllRegular = {"AL", "AK", "AZ", "AR", "CA", "CO", "CT", "DE", "FL", "GA", "HI", "ID", "IL", "IN", "IA", "KS", "KY", "LA", "ME", "MD", "MA", "MI", "MN", "MS", "MO", "MT", "NE", "NV", "NH", "NJ", "NM", "NY", "NC", "ND", "OH", "OK", "OR", "PA", "RI", "SC", "SD", "TN", "TX", "UT", "VT", "VA", "WA", "WV", "WI", "WY", "PR", "AS", "DC", "MP", "GU", "VI"}, -- has 56 members (all states + territories)
All = {"ALS", "AKS", "CAS", "COS", "CTS", "FLS", "GAS", "IDS", "KYS", "KSS", "LAS", "MNS", "MSS", "MTS", "NCS", "NDS", "NES", "NHS", "NMS", "NYS", "OKS", "ORS", "SCS", "TNS", "VAS", "VTS", "WVS", "WYS", "AL", "AK", "AZ", "AR", "CA", "CO", "CT", "DE", "FL", "GA", "HI", "ID", "IL", "IN", "IA", "KS", "KY", "LA", "ME", "MD", "MA", "MI", "MN", "MS", "MO", "MT", "NE", "NV", "NH", "NJ", "NM", "NY", "NC", "ND", "OH", "OK", "OR", "PA", "RI", "SC", "SD", "TN", "TX", "UT", "VT", "VA", "WA", "WV", "WI", "WY", "PR", "AS", "DC", "MP", "GU", "VI"} -- has 83 members (all states + territories + insets)
}
-- state abbreviations to names
p.statenames = {ALS = "Alabama", AKS = "Alaska", CAS = "California", COS = "Colorado", CTS = "Connecticut", FLS = "Florida", GAS = "Georgia", IDS = "Idaho", KYS = "Kentucky", KSS = "Kansas", LAS = "Louisiana", MNS = "Minnesota", MSS = "Mississippi", MTS = "Montana", NCS = "North Carolina", NDS = "North Dakota", NES = "Nebraska", NHS = "New Hampshire", NMS = "New Mexico", NYS = "New York", OKS = "Oklahoma", ORS = "Oregon", SCS = "South Carolina", TNS = "Tennessee", VAS = "Virginia", VTS = "Vermont", WVS = "West Virginia", WYS = "Wyoming", AL = "Alabama", AK = "Alaska", AZ = "Arizona", AR = "Arkansas", CA = "California", CO = "Colorado", CT = "Connecticut", DE = "Delaware", FL = "Florida", GA = "Georgia", HI = "Hawaii", IA = "Iowa", ID = "Idaho", IL ="Illinois", IN = "Indiana", KS = "Kansas", KY = "Kentucky", LA = "Louisiana", ME = "Maine", MD = "Maryland", MA = "Massachusetts", MI = "Michigan", MN = "Minnesota", MS = "Mississippi", MO = "Missouri", MT = "Montana", NE = "Nebraska", NV = "Nevada", NH = "New Hampshire", NJ = "New Jersey", NM = "New Mexico", NY = "New York", NC = "North Carolina", ND = "North Dakota", OH = "Ohio", OK = "Oklahoma", OR = "Oregon", PA = "Pennsylvania", RI = "Rhode Island", SC = "South Carolina", SD = "South Dakota", TN = "Tennessee", TX = "Texas", UT = "Utah", VT = "Vermont", VA = "Virginia", WA = "Washington", WV = "West Virginia", WI = "Wisconsin", WY = "Wyoming", PR = "Puerto Rico", AS = "American Samoa", DC = "Washington, D.C.", MP = "Northern Mariana Islands", GU = "Guam", VI = "United States Virgin Islands"} -- special elections are here but should always be overridden
return p