US Census

Maps that look at the US Census at the macro-perspective of all counties in the United States.

Show Only ...
Maps - Photos - Videos

US Counties – Square Miles

Which counties are the largest counties in an area? This interactive map, which pulls data from the Census TIGER files is colored using Natural Breaks Jenks coloring to compare the size various counties in America. Blue counties are smaller, red counties are larger.

Data Source: Population estimates, shown in the based on the 2016 US Census Population estimates. American Fact Finder. https://factfinder.census.gov/faces/tableservices/jsf/pages/productview.xhtml?src=bkmk

Households That Make Less then $20k in America πŸ’΅

If Puerto Rico was a state, it would be by far the poorest in America. Significant poverty continues to exist in the south, indeed the most impoverished states are Mississippi, West Virginia, Louisiana, New Mexico and Alabama according to the 2020 American Community Survey 5 year averages.

State Households Making Under 20k
Puerto Rico 48.2
Mississippi 22.6
West Virginia 20.6
Louisiana 20.1
New Mexico 19.6
Alabama 19.3
Arkansas 18.9
Kentucky 18.8
South Carolina 17.0
Tennessee 16.6
Oklahoma 16.2
North Carolina 15.8
Ohio 15.6
Georgia 15.2
Missouri 15.2
District of Columbia 15.2
Montana 15.1
New York 15.0
Maine 15.0
Michigan 14.9
Florida 14.9
Rhode Island 14.6
Indiana 14.6
Pennsylvania 14.2
Texas 13.9
Arizona 13.7
Vermont 13.7
Illinois 13.7
Kansas 13.6
North Dakota 13.5
South Dakota 13.5
Iowa 13.4
Nevada 13.4
Idaho 13.3
Oregon 13.1
Wyoming 13.0
Wisconsin 12.9
Nebraska 12.7
Massachusetts 12.5
California 11.9
Delaware 11.7
Connecticut 11.6
Virginia 11.3
New Jersey 11.0
Minnesota 10.9
Colorado 10.8
Washington 10.6
Hawaii 10.0
Maryland 10.0
New Hampshire 9.9
Alaska 9.9
Utah 9.2

Here is the R code for making these statistics:

library(tidycensus)
income <- get_acs(
  geography = “state”,
  table = ‘B19001’,
  year = 2020,
  output = ‘wide’,
  survey = “acs5”,
  geometry = F);
perincome <- income  %>% select(ends_with(‘E’), -ends_with(‘001E’)) %>%
  rowwise() %>% mutate(total = sum(across(matches(‘dE’)))) %>%
  mutate(across(matches(‘dE’), ~(./total)*100 )) %>% select(-total)
perincome %>% rowwise %>% mutate(under20k = sum(across(c(B19001_002E, B19001_003E, B19001_004E)))) %>% select(NAME, under20k) %>% arrange(-under20k) %>% write_csv(‘/tmp/hhunder20k.csv’)

Median Home Value

The Eastern Seaboard from Washington DC to Boston MA has some of the United States' highest home values, along with Southern California from San Francisco down to Los Angeles. Seattle, Colorado, and parts of Southern Florida are also expensive places to live. Surprisingly, Chicago IL is relatively inexpensive place to buy a home. Areas that are blue and green are less expensive to buy a home, yellows are about average, while oranges and reds are the most expensive places to own a home.

Data Source: Median Home Value, 2011-2015 American Community Survey 5-Year Estimates. https://factfinder.census.gov/faces/nav/jsf/pages/searchresults.xhtml?refresh=t

Working PANDAS and American Community Survey Summary File

Want to be able to work with American Community Survey data offline using your own local copy of the ACS 5-year Summary File? It’s pretty easy to do with PANDAS. If you are planning a lot of Census queries, this can be a very fast way to extract data.

Before you can use this script, you will need to download some data:

import pandas as pd

path = '/home/andy/Desktop/acs-summary-file/'

# list of geography
geo = pd.read_excel(path+'5_year_Mini_Geo.xlsx', sheet_name='ny',index_col='Logical Record Number')

# load headers
header = pd.read_excel(path+'ACS_5yr_Seq_Table_Number_Lookup.xlsx')

# create a column with census variable headers
header['COL_NAME'] = header['Table ID'] + '_' + header['Line Number'].apply(lambda a: "{0:.0f}".format(a).zfill(3))

# segment id, along with ACS year and state
segId = 135
year = 2019
state = 'ny'

# create a list of headers for segment file
segHead = ['FILEID','FILETYPE','STUSAB','CHARITER','SEQUENCE','LOGRECNO'] \
    + header.query('`Sequence Number` == '+str(segId)).dropna(subset=['Line Number'])['COL_NAME'].to_list()

# read the segment file, including column names above    
seg = pd.read_csv(path+'e'+str(year)+'5'+state+(str(segId).zfill(4))+'000.txt',header=None, names=segHead, index_col=5)

# join the segment file to geography using Logical Record number
seg = geo.join(seg)

# calculate percentage of households with internet subscriptions -- codes from ACS_5yr_Seq_Table_Number_Lookup.xlsx
seg['Internet Subscription']=seg['B28011_002']/seg['B28011_001']*100

# output the percentage of households by county with internet subscriptions
seg[seg['Geography ID'].str.startswith('050')][['Geography Name','Internet Subscription']]

Geography NameInternet Subscription
Logical Record Number
13Albany County, New York83.888889
14Allegany County, New York76.248050
15Bronx County, New York75.917821
16Broome County, New York82.222562
17Cattaraugus County, New York72.431480
70Washington County, New York80.224036
71Wayne County, New York81.508715
72Westchester County, New York86.371288
73Wyoming County, New York78.387887
74Yates County, New York75.916583
# alternatively you can display human readable columns automatically
seg.rename(dict(zip(header['COL_NAME'],header['Table Title'])),axis=1)
StateGeography IDGeography NameFILEIDFILETYPESTUSABCHARITERSEQUENCETotal:Has one or more types of computing devices:
Logical Record Number
1NY04000US36New YorkACSSF201900000.0ny0.0135.07343234.06581493.0
2NY04001US36New York — UrbanACSSF201900000.0ny0.0135.06433524.05771681.0
3NY04043US36New York — RuralACSSF201900000.0ny0.0135.0909710.0809812.0
4NY040A0US36New York — In metropolitan or micropolitan st…ACSSF201900000.0ny0.0135.07189902.06449723.0
5NY040C0US36New York — In metropolitan statistical areaACSSF201900000.0ny0.0135.06796057.06109882.0
28400NY97000US3631920Yonkers City School District, New YorkACSSF201900000.0ny0.0135.074897.065767.0
28401NY97000US3631950York Central School District, New YorkACSSF201900000.0ny0.0135.02116.01964.0
28402NY97000US3631980Yorktown Central School District, New YorkACSSF201900000.0ny0.0135.07068.06751.0
28403NY97000US3632010Cuba-Rushford Central School District, New YorkACSSF201900000.0ny0.0135.02629.02186.0
28404NY97000US3699999Remainder of New York, New YorkACSSF201900000.0ny0.0135.079779.075425.0

Too much work or don’t want to download the summary file yourself? You can query the Census API directly using PyPI’s censusdata library from PIP. For infrequent queries where you are online, for those with Internet at home, you would be much better off just querying the API directly.

import pandas as pd
import censusdata as cd

# attributes to load
cdcol=['B28011_001','B28011_002']

cdf = cd.download('acs5', 2019,
           cd.censusgeo([('state', '36'),
                         ('county','*')]),
          cdcol)


# seperate out the geoid and geography name
geoid=[]
geoname=[]

for index in cdf.index.tolist():
    geopart=''
    for part in index.geo:
        geopart = geopart + part[1]
    geoid.append(geopart)
    geoname.append(index.name)

cdf['geoid']=geoid
cdf['geoname']=geoname

# calculate percentage with internet subscriptions
cdf['Internet Subscription']=cdf['B28011_002']/cdf['B28011_001']*100

# output a similar table as above
cdf

Learn how to load into PANDAS the PL 94-171 2020 Redistricting Data, a process that is similar but different then ACS data.

Also, calculate the population of an area and it’s average demographics, including areas that don’t have Census demographics such as Election Districts or County Legislative districts.

Population Change, July 2020-2022

US Population, July 2020 – 2022
New York State once again leads the nation in population loss with Idaho leading the nation in population gain.
State April 2020 July 2020 July 2021 July 2022 Change Percent
New York 20,201,230 20,108,296 19,857,492 19,677,151 βˆ’431,145 βˆ’2.14%
Puerto Rico 3,285,874 3,281,557 3,262,693 3,221,789 βˆ’59,768 βˆ’1.82%
Illinois 12,812,545 12,786,580 12,686,469 12,582,032 βˆ’204,548 βˆ’1.60%
Louisiana 4,657,749 4,651,664 4,627,098 4,590,241 βˆ’61,423 βˆ’1.32%
California 39,538,245 39,501,653 39,142,991 39,029,342 βˆ’472,311 βˆ’1.20%
West Virginia 1,793,755 1,791,420 1,785,526 1,775,156 βˆ’16,264 βˆ’0.91%
Hawaii 1,455,273 1,451,043 1,447,154 1,440,196 βˆ’10,847 βˆ’0.75%
Mississippi 2,961,288 2,958,141 2,949,586 2,940,057 βˆ’18,084 βˆ’0.61%
Michigan 10,077,325 10,069,577 10,037,504 10,034,113 βˆ’35,464 βˆ’0.35%
Ohio 11,799,374 11,797,517 11,764,342 11,756,058 βˆ’41,459 βˆ’0.35%
New Mexico 2,117,527 2,118,390 2,116,677 2,113,344 βˆ’5,046 βˆ’0.24%
Rhode Island 1,097,371 1,096,345 1,096,985 1,093,734 βˆ’2,611 βˆ’0.24%
Massachusetts 7,029,949 6,995,729 6,989,690 6,981,974 βˆ’13,755 βˆ’0.20%
Pennsylvania 13,002,689 12,994,440 13,012,059 12,972,008 βˆ’22,432 βˆ’0.17%
Maryland 6,177,213 6,173,205 6,174,610 6,164,660 βˆ’8,545 βˆ’0.14%
Oregon 4,237,291 4,244,795 4,256,301 4,240,137 βˆ’4,658 βˆ’0.11%
New Jersey 9,289,031 9,271,689 9,267,961 9,261,699 βˆ’9,990 βˆ’0.11%
Wisconsin 5,893,725 5,896,271 5,880,101 5,892,539 βˆ’3,732 βˆ’0.06%
North Dakota 779,091 779,518 777,934 779,261 βˆ’257 βˆ’0.03%
Kansas 2,937,847 2,937,919 2,937,922 2,937,150 βˆ’769 βˆ’0.03%
Alaska 733,378 732,923 734,182 733,583 660 0.09%
Kentucky 4,505,893 4,507,445 4,506,589 4,512,310 4,865 0.11%
Minnesota 5,706,504 5,709,852 5,711,471 5,717,184 7,332 0.13%
District of Columbia 689,546 670,868 668,791 671,803 935 0.14%
Nebraska 1,961,489 1,962,642 1,963,554 1,967,923 5,281 0.27%
Iowa 3,190,372 3,190,571 3,197,689 3,200,517 9,946 0.31%
Missouri 6,154,920 6,153,998 6,169,823 6,177,957 23,959 0.39%
United States 331,449,520 331,511,512 332,031,554 333,287,557 1,776,045 0.54%
Virginia 8,631,384 8,636,471 8,657,365 8,683,619 47,148 0.55%
Vermont 643,085 642,893 646,972 647,064 4,171 0.65%
Indiana 6,785,668 6,788,799 6,813,532 6,833,037 44,238 0.65%
Wyoming 576,837 577,605 579,483 581,381 3,776 0.65%
Washington 7,705,247 7,724,031 7,740,745 7,785,786 61,755 0.80%
Connecticut 3,605,942 3,597,362 3,623,355 3,626,205 28,843 0.80%
Alabama 5,024,356 5,031,362 5,049,846 5,074,296 42,934 0.85%
Colorado 5,773,733 5,784,865 5,811,297 5,839,926 55,061 0.95%
Arkansas 3,011,555 3,014,195 3,028,122 3,045,637 31,442 1.04%
New Hampshire 1,377,518 1,378,587 1,387,505 1,395,231 16,644 1.21%
Oklahoma 3,959,346 3,964,912 3,991,225 4,019,800 54,888 1.38%
Maine 1,362,341 1,363,557 1,377,238 1,385,340 21,783 1.60%
Georgia 10,711,937 10,729,828 10,788,029 10,912,876 183,048 1.71%
Tennessee 6,910,786 6,925,619 6,968,351 7,051,339 125,720 1.82%
Nevada 3,104,624 3,115,648 3,146,402 3,177,772 62,124 1.99%
North Carolina 10,439,414 10,449,445 10,565,885 10,698,973 249,528 2.39%
South Dakota 886,677 887,799 896,164 909,824 22,025 2.48%
Arizona 7,151,507 7,179,943 7,264,877 7,359,197 179,254 2.50%
Delaware 989,957 992,114 1,004,807 1,018,396 26,282 2.65%
Texas 29,145,428 29,232,474 29,558,864 30,029,572 797,098 2.73%
South Carolina 5,118,429 5,131,848 5,193,266 5,282,634 150,786 2.94%
Utah 3,271,614 3,283,785 3,339,113 3,380,800 97,015 2.95%
Florida 21,538,226 21,589,602 21,828,069 22,244,823 655,221 3.03%
Montana 1,084,197 1,087,075 1,106,227 1,122,867 35,792 3.29%
Idaho 1,839,092 1,849,202 1,904,314 1,939,033 89,831 4.86%
Andy Arthur, 3/29/23
Source: census.gov/programs-surveys/popest/tables/2020-2022/national/totals/NA-EST2022-POP.xlsx

Where do New Yorkers move to when they leave the state? 🚚

Where do New Yorkers move to when they leave the state? 🚚

According to the 2019 Migration Flows, for out of state migration.

Top 10 States

  1. New Jersey 67,084
  2.  California 48,898
  3. Florida 48,576
  4.  Pennsylvania 46,080
  5.  Massachusetts 32,960
  6.  Connecticut 29,474
  7. Texas 23,816
  8. Virginia 20,010
  9.  North Carolina 19,044
  10. Georgia 15,024

Top 10 Counties

  1. Los Angeles County, California 15,624
  2. Fairfield County, Connecticut 15,584
  3. Hudson County, New Jersey 13,174
  4. Bergen County, New Jersey 12,662
  5. Middlesex County, Massachusetts 10,710
  6. Philadelphia County, Pennsylvania 9,636
  7. Cook County, Illinois 8,614
  8. Essex County, New Jersey 8,120
  9. District of Columbia, District of Columbia 7,684
  10. Suffolk County, Massachusetts 6,834