In my previous job, I built a big database of zipcodes and geolocations, and distances between those zip codes. The server that this database lived on is getting shut down sometime in the next 24 hours. A couple days ago, I suddenly realized I could use that database to answer a few questions I’ve had about where the A’s should be moving.
So I’ve been scrambling to try to get some queries done, before the server goes away. I managed to get the work done once, but I didn’t get a chance to double-check anything, so take all this with a gigantic grain of “this is a first draft” kind of salt.
* * *
The raw data I had was from the 2000 census and included:
- every 5-digit zip code in the United States (about 40,000 of them)
- the latitude and longitude of each of those zip codes, and
- population and median household income for about 30,000 of those zip codes
I’m not sure why 10,000 zip codes don’t have population and income data. Probably some of them represent entities (like governments and such) that aren’t geographic locations with residents. But not all of them. For example, the zip code that includes Safeco Field in Seattle was among the zip codes missing data. Baltimore looks like it’s missing a big chunk of data. Plus, there’s no Canadian data either, so the Blue Jays are unrepresented, as are probably some additional Tigers and Mariners fans. So I’m sure the data needs a real good scrubbing, so I’ll repeat my warning about the rough nature of this data.
From the geodata, I calculated the distance between any two zipcodes that were less than 150 miles apart.
* * *
If you’re going to build a ballpark somewhere, you’d want to put it somewhere:
- with as many people as possible
- who have as much money as possible
- who live as near to the ballpark as possible
So I came up with a formula to reflect this. For this exercise, I don’t really need to know the exact amount of money a ballpark can generate, I just need a number I can use to compare with. So median household income will do just fine, even though it’s not at all an accurate representation of how much money is available to spend on baseball.
So here’s what I did: For each zip code within 75 miles of a MLB ballpark, I took the population and multiplied it with the median household income of that zipcode, to give that zipcode a total amount of money for that zipcode. (I should probably have divided by average household size, but we’re after relative comparisons here, so it doesn’t matter too much.) Then for each mile that zipcode was from the ballpark, I subtracted 1/75th of that total from the score for that zipcode.
So the closer the zipcode is to the ballpark, the more money from that zipcode is assigned to the team.
Then I repeated the exercise for five potential A’s homes: the Coliseum, Victory Court, Fremont, San Jose, and Sacramento.
Once I had done that, I did it for every minor league park that was more than 75 miles from any existing MLB park, plus Portland, Honolulu, and Anchorage.
* * *
The (rough) results, for your viewing pleasure:
zip | team | city | state | relative market size |
---|---|---|---|---|
10451 | Yankees | Bronx | NY | $ 752,743,595,112 |
11368 | Mets | Corona | NY | $ 748,642,916,914 |
90012 | Dodgers | Los Angeles | CA | $ 510,586,706,490 |
92806 | Angels | Anaheim | CA | $ 429,295,980,560 |
60616 | White Sox | Chicago | IL | $ 353,523,094,940 |
60613 | Cubs | Chicago | IL | $ 351,956,542,055 |
19148 | Phillies | Philadelphia | PA | $ 313,899,514,792 |
20003 | Nationals | Washington | DC | $ 313,043,794,378 |
94107 | Giants | San Francisco | CA | $ 276,531,798,517 |
02215 | Red Sox | Boston | MA | $ 258,052,953,191 |
48201 | Tigers | Detroit | MI | $ 194,991,345,880 |
76011 | Rangers | Arlington | TX | $ 184,979,524,329 |
77002 | Astros | Houston | TX | $ 184,030,914,939 |
30315 | Braves | Atlanta | GA | $ 166,992,030,231 |
55403 | Twins | Minneapolis | MN | $ 138,398,423,288 |
33125 | Marlins | Miami | FL | $ 134,237,186,849 |
85004 | Diamondbacks | Phoenix | AZ | $ 126,863,473,073 |
98134 | Mariners | Seattle | WA | $ 123,032,784,722 |
80205 | Rockies | Denver | CO | $ 120,203,857,817 |
92101 | Padres | San Diego | CA | $ 119,511,331,778 |
44115 | Indians | Cleveland | OH | $ 114,814,235,603 |
53214 | Brewers | Milwaukee | WI | $ 114,411,126,303 |
63102 | Cardinals | St. Louis | MO | $ 95,088,871,967 |
45202 | Reds | Cincinnati | OH | $ 93,961,385,672 |
15212 | Pirates | Pittsburgh | PA | $ 91,812,365,763 |
33705 | Rays | St. Petersburg | FL | $ 86,162,065,166 |
64129 | Royals | Kansas City | MO | $ 75,617,221,577 |
21201 | Orioles | Baltimore | MD | $ 51,550,959,511 |
94621 | Coliseum | Oakland | CA | $ 302,835,904,135 |
94538 | Fremont | Fremont | CA | $ 301,356,267,461 |
94607 | Victory Ct | Oakland | CA | $ 288,464,089,740 |
95110 | San Jose | San Jose | CA | $ 244,281,690,385 |
95691 | Sacramento | West Sacramento | CA | $ 122,189,968,456 |
97205 | Portland | Portland | OR | $ 86,934,977,194 |
43223 | Columbus | Columbus | OH | $ 82,466,829,644 |
48912 | Lansing | Lansing | MI | $ 80,674,718,903 |
46225 | Indianapolis | Indianapolis | IN | $ 76,724,547,759 |
29715 | Charlotte | Fort Mill | SC | $ 66,474,729,100 |
27401 | Greensboro | Greensboro | NC | $ 61,196,329,994 |
23510 | Norfolk | Norfolk | VA | $ 58,754,813,183 |
14020 | Batavia | Batavia | NY | $ 58,698,864,009 |
78664 | Round Rock | Round Rock | TX | $ 57,730,378,193 |
78227 | San Antonio | San Antonio | TX | $ 57,705,434,009 |
27597 | Carolina | Zebulon | NC | $ 56,677,487,954 |
49017 | Southwest MI | Battle Creek | MI | $ 54,991,532,182 |
27105 | Winston-Salem | Winston Salem | NC | $ 54,919,270,523 |
14608 | Rochester | Rochester | NY | $ 54,337,641,491 |
89101 | Las Vegas | Las Vegas | NV | $ 53,809,399,974 |
37203 | Nashville | Nashville | TN | $ 53,707,382,854 |
49321 | West Michigan | Comstock Park | MI | $ 53,532,262,868 |
84058 | Orem | Orem | UT | $ 52,659,523,005 |
70003 | New Orleans | Metairie | LA | $ 51,061,101,559 |
40202 | Louisville | Louisville | KY | $ 50,940,204,646 |
14203 | Buffalo | Buffalo | NY | $ 50,893,985,379 |
32114 | Daytona | Daytona Beach | FL | $ 48,253,823,630 |
18505 | Scranton-Wilkes | Scranton | PA | $ 47,728,598,665 |
23230 | Richmond | Richmond | VA | $ 47,551,291,211 |
32940 | Brevard County | Melbourne | FL | $ 47,518,011,693 |
84401 | Ogden | Ogden | UT | $ 46,138,307,179 |
38103 | Memphis | Memphis | TN | $ 44,483,924,752 |
13021 | Auburn | Auburn | NY | $ 43,555,185,837 |
29607 | Greenville | Greenville | SC | $ 43,508,445,289 |
91730 | Rancho Cucamonga | Rancho Cucamonga | CA | $ 39,638,600,052 |
* * *
These results, outside of Baltimore, smell more or less right to me.
Next, though, I tried to put some measure on what happens to a market when it is shared between teams. This is where the results surprised me, enough so, that I think I probably screwed up somewhere.
I’ll address that in an upcoming blog post.