Following the release of apportionment population data in April 2021, each state was allocated a particular number of Congressional representatives. Apportionment populations are slightly different from the standard census population counts, as they consist of “the resident population of the 50 states including overseas federal employees (military and civilian) and their dependents living with them.”
Interestingly enough, there are multiple different ways that seats could be apportioned based on population data, each with various tradeoffs in terms of privileging larger or smaller states. Since 1941, apportionment values have been calculated using the Huntington-Hill method. Generally speaking, the Huntington-Hill method calculates a priority number for each state and a particular seat number (for example Delaware having a 2nd Congressional District and Texas having an 88th Congressional district). These priority numbers are then ranked, and with slight modifications in order depending on the minimum seats required for each state, the remaining number of seats are selected in order.
Because the Huntington-Hill method is somewhat tricky to implement, and calculators employing it appear hard to find, I created a Congressional Apportionment Calculator in Google Sheets that allows you to enter population values for every state, and then to calculate how many Congressional seats would be allocated to every state based off of those figures.
The notebook has been written where cells in blue are editable by any viewer of the document.
The calculator also includes fields to include DC as a state, and to change the minimum and maximum of seats per state, as well as the total number of states. The second tab in the spreadsheet includes two maps, which plot the total number of seats for each state under the modified populations, as well as the difference in seats per state compared with the seats that were actually allocated.
Using the calculator, you can see things like: – How apportionment would have changed if New York’s apportionment population was just 89 people larger – How apportionment would change if DC were counted as a state – How apportionment, and a state’s percentage of all seats would change if Congress was expanded.
Please note: – Unfortunately, Google Sheets does not support including Washington, DC among its state maps. – Changing the minimum seats per state to 0 may result in whacky outputs, particularly because the definition of the method begins with each state being allocated one seat.
Technically speaking, the spreadsheet utilizes a function I wrote in Google Apps script, and was a good chance to practice some Javascript. With some additional time, I could try to add an option for Puerto Rico, and link the results of this analysis with those discussed in an earlier post Counties and Cities with the Most Influence on US Federal Elections.
If you’ve ever looked at a box score for a basketball game, one interesting statistic that is recorded is the plus / minus. Plus / minus denotes a team’s net points while the player is on the court.
As an example, if a player enters the game with the scored tied, and leaves with his or her team leading by 5, the player would have a plus / minus of +5. If that player re-entered the game when his or her team was up by 10 and subbed out with the team down by 2, his or her net plus / minus would be -7 (+5 + (-12) ). One small caveat is that minor adjustments are made so players don’t “receive” or “lose” points from being subbed in or out part way through free throw attempts.
Below you can see examples of the plus / minus from Game 1 of the Eastern Conference semifinals between the Philadelphia 76ers and the Boston Celtics, which the 76ers won 119 – 115.
The plus / minus data is pretty interesting, especially when combined with data about how many minutes each player played. For Philadelphia, in the 42 minutes (out of 48 total for the game) that Tobias Harris played, the 76ers had a net even margin with the Boston Celtics. On the other hand, in the 36 minutes that Tyrese Maxey played, the 76ers outscored the Celtics by 12 points. Lastly, in the 25 minutes De’Anthony Melton played, the 76ers were outscored by 8 points.
Clearly there were some minutes in which Harris was out of the game and Maxey was playing where the 76ers did very well and a good chunk of minutes where the 76ers played quite poorly when Melton was in, when Harris and Maxey were in the game.
The Celtics’ boxscore is arguably more interesting with Malcolm Brogdon logging a +14 in his 34 minutes and Al Hereford logging -17 in his 30 minutes. In a game the Celtics lost by only 4 points, that’s a large differential.
In order to better visualize how this discrepancies exist, I put together a visualization of plus / minus data for the entire game using play-by-play and score data from ESPN and then Python and the matplotlib library for analysis.
With the visualization, you can better see how all the plus / minus extremes for each team played out. For example, Maxey picked up points relative to Harris from subbing out a bit earlier in the 1st quarter and playing in the late second quarter. Comparing across teams also allows you to guess some of the matchups at play, with Maxey appearing to take advantage of the time Brogdon sat around halftime.
Here’s Game 4 of the Warriors – Lakers as a comparison:
If you’re interested in visualizing other games or seeing the code to generate the graphics, let me know!
Note: The analysis discussed in this article can be played with interactively here.
Most Populous American Cities in 2020
According to the 2020 Census, the largest cities in the United States were as follows:
New York, NY – 8.80 million people
Los Angeles, CA – 3.90 million people
Chicago, IL – 2.75 million people
Houston, TX – 2.30 million people
Phoenix, AZ – 1.60 million people
Philadelphia, PA – 1.60 million people
San Antonio, TX – 1.43 million people
San Diego, CA – 1.39 million people
Dallas, TX – 1.30 million people
San Jose, CA – 1.30 million people
Something that is perhaps counterintuitive is that even though these are the ten largest cities in the country, they do not necessarily have the most influence on our nation’s federal elections.
Influence on Federal Elections
The question of influence is essentially if you could be a party boss in a particular city, what city would generally get you the farthest nationally?
This is because “influence” depends up what state a city is in, what percentage of that state’s population is in the city, and how the state fared in congressional reapportionment in terms of people per representative. In a perfectly democratic system, “influence” would be equal to a cities’ percent of nationwide population, but our system is not intended to be perfectly democratic.
Calculating Influence
Calculating “influence” is done by equally-weighting the share of reps across Senatorial, Congressional and Presidential elections. As an example, a state with 2 Senators (out of 100 total), 3 Congressional representatives (out of 435 total) and 5 electoral college electors (out of 538 total) would have an influence of 1.2%. This should make sense as the state has 2% of Senators, .6% of Congressional Representatives, and .9% of electoral college electorates.
(1/3)((2/100) + (3/435) + (5/538)) = ~1.2%
To calculate this for a city, you take the city’s percentage population of the entire state and re-run the calculation using fractional representatives. Intuitively, this says that a city that constitutes 75% of a states’ population “has” 1.5 Senators, whereas a city that is only 10% of a states’ population “has” .2 Senators.
This method is admittedly imperfect, as a city that constituted 75% of a states’ population could probably elect any 2 Senators it wanted to if it voted as a block, and redistricting could in theory keep a city with two representatives from being the majority voting block for any representative , but we’re going with it 🙂
Most Influential American Cities in 2020
When you re-run the numbers on cities (in this case 2020 Census Places), the numbers turn out quite differently.
New York, NY – 1.91% influence (8.80 million people)
Los Angeles, CA – .79% influence (3.90 million people)
Chicago, IL – .67% influence (2.75 million people)
Houston, TX – .48% influence (2.30 million people)
Phoenix, AZ – .46% influence (1.60 million people)
Philadelphia, PA – .39% influence (1.60 million people)
Anchorage Municipality, AK – .37% influence (291k people)
Albuquerque, NM – .32% influence (565k people)
Omaha, NE – .32% influence (486k people)
San Antonio, TX – .30% (1.43 million people)
While the top 6 cities stay the same, Anchorage, Albuquerque and Omaha make the list, primarily due to their relatively large share of the population in AK, NM, and NE, as you can see in the image below.
If you’d like to play around with the numbers and sort by the various columns: check out the spreadsheet here.
DC – Taxation without Representation?
DC is particularly interesting, in that its influence of .19% isn’t all that much lower than its nationwide population percentage and there are similarly sized cities roughly as influential.
In fact, on a per-person basis, voters in DC are actually more “influential” per capita than voters in 11 states. This is because DC having 3 electoral college electors as a city of only 689,545 (.55% of electors despite being only .21% of the total population) is disproportionate enough to make up for the lack of Senators or voting Congressional representative. Although DC is still under the average ratio of influence to nationwide population pct (which is 1), there are 11 states with an even lower ratio.
Most Populous Counties in 2020
Per the 2020 Census, the most populous counties were as follows:
Los Angeles County, CA – 10.01 million people
Cook County, IL – 5.28 million people
Harris County, TX – 4.73 million people
Maricopa County, AZ – 4.42 million people
San Diego County, CA – 3.30 million people
Orange County, CA – 3.19 million people
Kings County, NY – 2.74 million people
Miami-Dade County, FL – 2.70 million people
Dallas County, TX – 2.61 million people
Riverside County, CA – 2.42 million people
Most Influential Counties in 2020
Crunching the “influence” numbers gives you:
Los Angeles County, CA – 2.03% influence (10.01 million people)
While the method is definitely imperfect, it does flag the importance of New Castle County to American politics, where Joe Biden began his political career many years ago.
Imperfectly Democratic
In the Senate, the 643,077 people living in Vermont, per the 2020 Census, elect and are represented by 2 Senators, whereas in California, any group of 643,077 people will only comprise a small fraction of the 39,538,223 people who elect and represented by the state’s 2 Senators, per the 2020 Census.
The disparity is somewhat smaller for Congressional races. In terms of apportionment population, the lowest ratio of people to representative is in Montana, where there are 542,704 people for each of its 2 House Representatives. The highest ratio is in Delaware, where there are 990,837 people for Delaware’s lone representative. The apportionment population used to determine the number of representatives in a state is slightly different from a state’s total population, as it includes count of U.S. military and federal civilian employees (and their dependents) living overseas allocated to their home state.
For the Presidency, state’s vote for the number of electors equal to their number of Senators plus their number of representatives. DC, which elects neither a voting member of Congress nor a Senator, votes for 3 electors.
Notes
To be perhaps more accurate, this analysis could incorporate a city’s percentage of voting eligible or participating voter population and the subtle nuances for electoral college electors in NE and ME.
Data from the 2020 Census via Redistricting Data Hub
A border portmanteau is a region or town near a mutual border that combines the names of two, or occasionally three, adjacent states. The most famous example is probably “Texarkana” which is a combination of Texas, Arkansas and Louisiana. There is a Texarkana, TX and a Texarkana, AR. Having seen “Pen Mar, MD” on the map, I was curious as to which state borders have a border portmanteau.
I generated the border geometries using a slightly modified version of the adjacency code described here. The data came from the “Border portmanteaus” section of the List of geographic portmanteaus Wikipedia article. Some border portmanteaus no longer exist (ex. Nosodak, ND) or have no current population (Oklarado, CO) but are included anyway.
The 5 maps above show data relating to how the counties of the lower 48 states (and DC) have voted across the last six presidential elections. I decided not to include Alaska and Hawaii data, primarily because Alaska has had a number of county boundary changes since 2000. If I had wanted to include Alaska and Hawaii, I could have followed the instructions in this post.
The bulk of the election data comes from MEDSL, with additional 2020 data from VEST used to fill in some of the gaps in MEDSL’s file. For each county, I retrieved vote totals for the following six Presidential elections: – 2000: Bush vs. Gore – 2004: Bush vs. Kerry – 2008: McCain vs. Obama – 2012: Romney vs. Obama – 2016: Trump vs. Clinton – 2020: Trump vs. Biden
The first four maps group counties into categories I found interesting: – Counties that supported for a candidate of the same party in every election – Counties that began the 2000s voting Democratic and have voted Republican since (only flipping once) – Counties that began the 2000s voting Republican and have voted Democratic since (only flipping once) – Counties that supported Republicans in every election, except for Obama at least once
The above four categories do not encompass every county (3,108) in the contiguous United States + DC, but only 2,954. Information on the counties not included is shown below.
The number of counties with a specific Presidential voting pattern not included in those 4 maps is included below. Counties included above contain a strikethrough. Broomfield, CO is excluded from the data as it did not exist in 2000. For simplicity, I did not try to modify the 2000 election results for the counties that previously contained the area of Broomfield.
'Republican': 2064,
'Democratic': 343,
"Rep. except Obama '08": 120, 'Democratic until 2016': 90,
'Democratic until 2004': 88,
'Republican until 2004': 68,
'Rep. except Obama twice': 49,
'Democratic until 2008': 39,
'Republican until 2020': 31,
'Rep: Bush (second), Romney, 2 x Trump': 26,
'Republican except for Kerry, 2 x Obama ': 23,
'Republican until 2016': 22,
'Rep: Bush (second), 2 x Trump': 20,
'Democratic until 2012': 19,
'Republican except for Obama (first), Biden': 13,
'Democratic except Trump first term': 12,
'Republican except for Obama (first), Clinton, Biden': 10,
'Democratic except Bush second term': 10,
'Democratic until 2020': 10,
'Republican except for 2 x Obama, Biden': 9,
'Republican until 2012': 6,
'Rep: Bush (second), McCain, 2 x Trump': 6,
'Republican except Kerry, Obama (first)': 5,
"Rep. except Obama '12": 5,
'Republican except for Kerry, 2 x Obama, Biden': 4,
'Republican except for 2 x Obama, Clinton': 3,
'Rep Bush (second), Trump (second)': 3,
'Republican except for Obama (second), Biden': 3,
'Republican except for Kerry': 3,
'County Boundaries Changed': 1,
'Democratic except Romney first term': 1,
'Rep Bush (second), Trump (first)': 1,
'Rep: McCain, 2 x Trump': 1
The fifth map looks at how many times each county had majority support for the winning Presidential candidate in these 6 elections. Interestingly, no county voted for the losing candidate in every Presidential election from 2000-2020 and 9 counties have supported the winning candidate in every one. Broomfield County is not included here, so there are only 3,107 counties.
Python code to dissolve geopandas GeoDataFrames on adjacent geometries, with parameters to include or exclude point adjacencies.
Find the most up-to-date version of the code here.
import geopandas as gp
from itertools import combinations, starmap
def adjacency_dissolve(gdf, include_point_adjacency = True):
'''
Code that takes in a geodataframe and returns the geodataframe with adjacencies dissolved
Includes a "include_point_adjacency" parameter, with a default value set to "True"
Currently the code is not fine-tuned to handle non-geometric data during the dissolve
'''
# Make sure that the index column is unique
if "index" in gdf.columns:
raise ValueError("Column already named 'index'")
gdf.reset_index(inplace = True, drop = False)
if not gdf.index.is_unique:
raise ValueError ("Non-unique index column")
adj_groups = calculate_adjacency(gdf, include_point_adjacency)
if "Dissolve_Assignment" in gdf.columns:
raise ValueError("Existing 'Dissolve_Assignment' column")
gdf["Dissolve_Assignment"] = ""
for i in range(0,len(adj_groups)):
if type(adj_groups[i])==gdf.dtypes["index"]:
gdf.loc[gdf["index"]== adj_groups[i],"Dissolve_Assignment"] = i
elif type(adj_groups[i])==set:
gdf.loc[gdf["index"].isin(adj_groups[i]) ,"Dissolve_Assignment"] = i
dissolved = gdf.dissolve("Dissolve_Assignment")
dissolved.reset_index(drop = False, inplace = True)
dissolved.drop(["index","Dissolve_Assignment"], axis = 1, inplace = True)
return dissolved
def calculate_adjacency(gdf, include_point_adjacency = True):
'''
Code that takes a geodataframe and returns a dictionary of adjacencies
'''
# Intersected the GeoDataFrame with the buffer with the original GeoDataFrame
test_intersection = gp.overlay(gdf, gdf, how = "intersection", keep_geom_type = False)
# If the include_point_adjacency is False
if (include_point_adjacency == False):
# Filter out the intersections that are just points
test_intersection = test_intersection[test_intersection.geom_type != "Point"]
# Get value counts after the intersections
ser = test_intersection["index_1"].value_counts()
# Filter out self-intersections
test_intersection = test_intersection[test_intersection["index_1"]!=test_intersection["index_2"]]
# Define a tuple of zips of the unique_col pairs present in the intersection
test_intersection_tuples = list(list(zip(test_intersection["index_1"], test_intersection["index_2"])))
return subadjacencies_faster_3([set(i) for i in test_intersection_tuples]) + list(ser[ser==1].index)
def subadjacencies_faster_3(dup_list):
all_intersections = starmap(set.intersection, combinations(dup_list, 2))
finished = True
for val in all_intersections:
if val != set():
finished = False
if finished:
return [sorted(list(i)) for i in dup_list]
else:
final_holder = []
for val in dup_list:
added = False
added_indices = []
for idx, x in enumerate(final_holder):
if len(x.intersection(val)) > 0:
final_holder[idx] = x.union(val)
added_indices.append(idx)
added = True
if len(added_indices) > 1:
for i in range(1, len(added_indices)):
final_holder[added_indices[0]] = final_holder[added_indices[0]].union(final_holder[added_indices[i]])
for i in range(len(added_indices)-1,0,-1):
final_holder.pop(added_indices[i])
if not added:
final_holder.append(val)
return final_holder
The 2020 U.S. census made available a large number of racial and ethnic categories. These options helped capture the diversity of the United States’ people. However, analyzing population data across these categories is somewhat difficult, given the sheer number of different categories. Simplifying the data by combining various categories helps make analysis easier.
One such simplification is the Office of Management and Budget’s (OMB) racial and ethnic categorization that place every person in the United States into one of 8 categories:
Non-Hispanic (NH) white
NH Black plus NH Black and white
NH Asian plus NH Asian and white
NH American Indian plus NH American Indian and white
NH Pacific Islander plus NH Pacific Islander and white
NH Some Other Races Alone plus NH Some Other Race Alone and white
NH Other Multiple Race (where more than one minority race listed)
Hispanic
2020 Census Data by OMB Category
According to the 2020 census data, 57.9% of the United States population falls into the first OMB category, Non-Hispanic white. The totals for the different categories are shown below:
Non-Hispanic (NH) White Alone
NH Black Alone plus NH Black and White
NH Asian Alone + NH Asian and White
NH American Indian Alone + NH American Indian and White
NH Pacific Islander Alone + NH Pacific Islander and White
NH Some Other Race Alone + NH Some Other Race and White
NH Other Multiple-Race (where more than one minority race listed)
Hispanic
U.S. Population
57.9%
12.8%
6.7%
1.8%
0.2%
1.2%
0.7%
18.7%
Electoral “Representation” by OMB Category
One interesting question to consider, in light of these number, is how “well-represented” these groups are in American electoral politics. In particular, I was curious to know, for a given OMB category and electoral level, what percentage of seats or districts have that group as the largest (plurality) population.
As an example, people who identify as either Non-Hispanic American Indian or Non-Hispanic American Indian and white may encompass 1.8% of the population, but in how many congressional districts are they the largest OMB group?
Please note: For my analyses “largest” refers to the plurality OMB group of the total population in that district, and does not capture variations in population age, citizenship status or voting-registration.)
If you blindly took ~1.8% (this group’s percentage of the total U.S. population) and multiplied it by 435 (the total number of U.S. Congressional seats), you might expect there to be ~10 such Congressional Districts. While this is a reasonable enough estimate, in fact, there are actually 0 2022 Congressional Districts where people who identify as either Non-Hispanic American Indian or Non-Hispanic American Indian and white comprise the largest of the 8 OMB groups.
One important consideration in the gap between the “expected” seats and the actual seats is how population is spread across the United States. While Non-Hispanic whites comprise 57.9% of the U.S.’ population, they are spread throughout the country in sufficient concentrations to encompass the largest OMB group in 80.2% of U.S. Congressional Districts. Other considerations might include gerrymandering, legislative district sizes, and other state redistricting requirements.
Values in this table may be interesting to consider in light of the anticipated “majority-minority” demographics of the United States.
Values for other OMB groups at other electoral levels are shown in the table below. Please note that there are three rows each for the State Legislative Lower (SLL) district and State Legislative Upper (SLU) district levels.
The first row for each level “SL(L/U) Districts as Largest Group (%)” does not consider multi-member districts and simply tracks the percentage of districts where a particular OMB group is the largest.
The second row for each level “SL(L/U) Rep.’s Districts* as Largest Group (%)” considers multi-member districts and tracks the percentage of representatives for whom’s district a particular OMB group is the largest.
An example differentiating between the first and second rows would be a 2-member district whose largest OMB group is Non-Hispanic white alone. In the first row, this would be counted as just one district, in the second two.
Finally, the third row “SL(L/U) Rep.’s Districts (Norm.) as Largest Group (%)” considers multi-member districts similar to the second row, but also normalizes by the size of the state’s particular legislature. For example, the Alaska State House has only 40 members, whereas the New Hampshire State House has 400 members. In this row, totals in Alaska State House would be divided by 40 and totals in the New Hampshire State House by 400.
Data Table
Non-Hispanic (NH) White Alone
NH Black Alone plus NH Black and White
NH Asian Alone + NH Asian and White
NH American Indian Alone + NH American Indian and White
NH Pacific Islander Alone + NH Pacific Islander and White
NH Some Other Race Alone + NH Some Other Race and White
NH Other Multiple-Race (where more than one minority race listed)
Hispanic
U.S. Population
57.9%
12.8%
6.7%
1.8%
0.2%
1.2%
0.7%
18.7%
Cong. Districts as Largest Group (%)
80.2%
6.0%
1.6%
0.0%
0.0%
0.0%
0.0%
12.2%
SLL Districts as Largest Group (%)
83.8%
8.4%
1.1%
0.5%
0.0%
0.0%
0.0%
6.2%
SLL Rep.’s Districts* as Largest Group (%)
84.6%
8.0%
1.0%
0.5%
0.0%
0.0%
0.0%
5.9%
SLL Rep.’s Districts* (Norm.) as Largest Group (%)
83.3%
7.2%
1.8%
0.8%
0.1%
0.0%
0.0%
6.8%
SLU Districts as Largest Group (%)
84.6%
7.2%
1.2%
0.7%
0.1%
0.0%
0.0%
6.3%
SLU Rep.’s Districts as Largest Group (%)
84.8%
7.0%
1.2%
0.7%
0.1%
0.0%
0.0%
6.2%
SLU Rep.’s Districts (Norm.) as Largest Group (%)
84.8%
6.4%
1.6%
0.7%
0.1%
0.0%
0.0%
6.4%
Senate Seats as Largest Group (%)
94.0%
0.0%
2.0%
0.0%
0.0%
0.0%
0.0%
4.0%
Sources
National Block Assignment File + 2020 PL Census Data from the Redistricting Data Hub.
Using election results data from MEDSL, I was able to make maps showing county-level presidential election results for the 2000, 2004, 2008, 2012, and 2016 presidential elections.
Interesting Findings
– No third-party candidate won any county in these 5 elections – No county had a tie between the top two vote getters – No county voted for the losing candidate in every election: (00-D, 04-D, 08-R, 12-R, 16-D) – 39 counties voted: (00-D, 04-D, 08-R, 12-R, 16-R), only getting their first winner in 2016
Maps
(Please note: the maps are fairly high resolution, which means they may take a second to load. If you are struggling to view the counties, you can open the image in a new tab and enlarge the image)
How Counties Voted in Presidential Elections from 200o to 2016
Given the large number of different outcomes, it’s a bit easier to view the data by splitting the map into counties that voted Democratic in 2000 and counties that voted Republican:
Notes
– “INCOMPLETE” refers to Broomfield County, which became a new county in 2001. The boundaries in surrounding counties changed slightly as a result of this change. – Election data from MEDSL and county shapes from the Census – My apologies to Hawaii and Alaska, which will be included in future versions of this post