Dataset Preview
Duplicate
The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
The dataset generation failed because of a cast error
Error code:   DatasetGenerationCastError
Exception:    DatasetGenerationCastError
Message:      An error occurred while generating the dataset

All the data files must have the same columns, but at some point there are 1 new columns ({'code'}) and 2 missing columns ({'city', 'population'}).

This happened while the csv dataset builder was generating data using

hf://datasets/crawlora-net/housing-affordability/data/by-state.csv (at revision d77f4f4087d13893faf2795cf5f81357872bcfa8), ['hf://datasets/crawlora-net/housing-affordability@d77f4f4087d13893faf2795cf5f81357872bcfa8/data/by-city.csv', 'hf://datasets/crawlora-net/housing-affordability@d77f4f4087d13893faf2795cf5f81357872bcfa8/data/by-state.csv']

Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)
Traceback:    Traceback (most recent call last):
                File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1837, in _prepare_split_single
                  writer.write_table(table)
                  ~~~~~~~~~~~~~~~~~~^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/arrow_writer.py", line 765, in write_table
                  self._write_table(pa_table, writer_batch_size=writer_batch_size)
                  ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/arrow_writer.py", line 773, in _write_table
                  pa_table = table_cast(pa_table, self._schema)
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2369, in table_cast
                  return cast_table_to_schema(table, schema)
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2297, in cast_table_to_schema
                  raise CastError(
                  ...<3 lines>...
                  )
              datasets.table.CastError: Couldn't cast
              state: string
              code: string
              medianListPrice: int64
              medianIncome: int64
              ratio: double
              salaryNeeded: int64
              gap: int64
              yoySalePerSqft: string
              -- schema metadata --
              pandas: '{"index_columns": [{"kind": "range", "name": null, "start": 0, "' + 1207
              to
              {'city': Value('string'), 'state': Value('string'), 'population': Value('int64'), 'medianListPrice': Value('int64'), 'medianIncome': Value('int64'), 'ratio': Value('float64'), 'salaryNeeded': Value('int64'), 'gap': Value('int64'), 'yoySalePerSqft': Value('string')}
              because column names don't match
              
              During handling of the above exception, another exception occurred:
              
              Traceback (most recent call last):
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1369, in compute_config_parquet_and_info_response
                  parquet_operations, partial, estimated_dataset_info = stream_convert_to_parquet(
                                                                        ~~~~~~~~~~~~~~~~~~~~~~~~~^
                      builder, max_dataset_size_bytes=max_dataset_size_bytes
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                  )
                  ^
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 948, in stream_convert_to_parquet
                  builder._prepare_split(split_generator=splits_generators[split], file_format="parquet")
                  ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1683, in _prepare_split
                  for job_id, done, content in self._prepare_split_single(
                                               ~~~~~~~~~~~~~~~~~~~~~~~~~~^
                      gen_kwargs=gen_kwargs, job_id=job_id, **_prepare_split_args
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                  ):
                  ^
                File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1839, in _prepare_split_single
                  raise DatasetGenerationCastError.from_cast_error(
                  ...<4 lines>...
                  )
              datasets.exceptions.DatasetGenerationCastError: An error occurred while generating the dataset
              
              All the data files must have the same columns, but at some point there are 1 new columns ({'code'}) and 2 missing columns ({'city', 'population'}).
              
              This happened while the csv dataset builder was generating data using
              
              hf://datasets/crawlora-net/housing-affordability/data/by-state.csv (at revision d77f4f4087d13893faf2795cf5f81357872bcfa8), ['hf://datasets/crawlora-net/housing-affordability@d77f4f4087d13893faf2795cf5f81357872bcfa8/data/by-city.csv', 'hf://datasets/crawlora-net/housing-affordability@d77f4f4087d13893faf2795cf5f81357872bcfa8/data/by-state.csv']
              
              Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

city
string
state
string
population
int64
medianListPrice
int64
medianIncome
int64
ratio
float64
salaryNeeded
int64
gap
int64
yoySalePerSqft
string
Los Angeles
CA
3,878,718
1,150,000
82,263
13.98
310,563
228,300
-2.7%
New York
NY
8,478,072
938,000
81,228
11.55
253,312
172,084
-4.7%
Irvine
CA
318,693
1,650,000
145,731
11.32
445,591
299,860
-5.2%
Miami
FL
487,006
690,000
66,337
10.4
186,338
120,001
-9.41%
Newark
NJ
317,303
600,000
58,490
10.26
162,033
103,543
-0.19%
Long Beach
CA
450,917
867,000
91,318
9.49
234,138
142,820
-6.5%
Anaheim
CA
344,579
956,000
101,145
9.45
258,173
157,028
-1.0%
Boston
MA
673,822
899,000
97,791
9.19
242,779
144,988
+1.3%
Scottsdale
AZ
246,183
943,000
104,893
8.99
254,662
149,769
+3.8%
San Francisco
CA
827,526
1,250,000
139,801
8.94
337,569
197,768
+16.8%
Santa Ana
CA
316,188
850,000
95,118
8.94
229,547
134,429
+1.9%
Hialeah
FL
235,384
499,000
57,151
8.73
134,757
77,606
+2.3%
San Jose
CA
997,395
1,290,000
148,226
8.7
348,371
200,145
+0.7%
San Diego
CA
1,404,461
934,000
111,032
8.41
252,231
141,199
-1.1%
Chula Vista
CA
278,548
815,000
105,101
7.75
220,095
114,994
-5.2%
Riverside
CA
323,792
675,000
90,004
7.5
182,287
92,283
-1.5%
Jersey City
NJ
302,822
752,000
100,751
7.46
203,081
102,330
-0.17%
Reno
NV
281,684
620,000
85,605
7.24
167,434
81,829
+0.9%
Boise
ID
237,959
575,000
81,102
7.09
155,282
74,180
+3.1%
Oakland
CA
443,575
697,000
102,235
6.82
188,228
85,993
+2.0%
Honolulu
HI
344,977
588,000
86,169
6.82
158,792
72,623
+13.4%
Seattle
WA
780,992
790,000
118,745
6.65
213,343
94,598
-5.0%
Nashville
TN
704,965
525,000
80,090
6.56
141,779
61,689
+1.5%
St Petersburg
FL
267,073
470,000
73,048
6.43
126,926
53,878
+1.1%
Richmond
VA
233,655
400,000
63,390
6.31
108,022
44,632
+6.1%
Las Vegas
NV
678,924
477,000
78,556
6.07
128,816
50,260
-0.38%
Glendale
AZ
258,121
459,000
75,711
6.06
123,955
48,244
-0.42%
Dallas
TX
1,326,093
445,000
74,323
5.99
120,174
45,851
-3.0%
Tampa
FL
414,575
500,000
84,114
5.94
135,028
50,914
+8.2%
Denver
CO
729,019
549,000
92,504
5.93
148,260
55,756
-1.6%
Austin
TX
993,771
535,000
90,430
5.92
144,479
54,049
-1.5%
Stockton
CA
324,980
465,000
78,627
5.91
125,576
46,949
-1.3%
Sacramento
CA
535,787
525,000
91,387
5.74
141,779
50,392
+0.0%
Fresno
CA
550,091
425,000
74,491
5.71
114,773
40,282
+1.6%
Madison
WI
285,318
450,000
79,254
5.68
121,525
42,271
+2.5%
Phoenix
AZ
1,673,122
482,000
85,246
5.65
130,167
44,921
-0.89%
Mesa
AZ
517,142
479,000
85,580
5.6
129,356
43,776
-0.76%
Lexington
KY
329,437
390,000
69,989
5.57
105,321
35,332
+1.0%
Colorado Springs
CO
493,540
465,000
83,672
5.56
125,576
41,904
+1.4%
Portland
OR
636,958
508,000
91,478
5.55
137,188
45,710
+0.6%
Henderson
NV
350,020
530,000
95,415
5.55
143,129
47,714
-1.9%
New Orleans
LA
362,701
325,000
58,821
5.53
87,768
28,947
+0.0%
North Las Vegas
NV
294,042
429,000
78,969
5.43
115,854
36,885
-4.0%
Arlington
VA
239,807
725,000
133,582
5.43
195,790
62,208
+7.1%
Washington DC
DC
702,250
593,000
109,707
5.41
160,143
50,436
+0.8%
Tucson
AZ
554,011
325,000
60,483
5.37
87,768
27,285
-3.7%
Albuquerque
NM
560,333
380,000
71,494
5.32
102,621
31,127
+0.9%
Chesapeake
VA
254,997
475,000
89,265
5.32
128,276
39,011
+3.7%
Houston
TX
2,387,910
340,000
64,361
5.28
91,819
27,458
-3.2%
Bakersfield
CA
417,461
432,000
82,093
5.26
116,664
34,571
+2.6%
Durham
NC
301,877
430,000
82,916
5.19
116,124
33,208
+0.9%
Winston Salem
NC
255,782
300,000
57,758
5.19
81,017
23,259
-4.0%
Cincinnati
OH
314,914
295,000
56,910
5.18
79,666
22,756
-1.1%
Charlotte
NC
943,474
435,000
86,416
5.03
117,474
31,058
-0.4%
Chandler
AZ
281,243
555,000
110,284
5.03
149,881
39,597
-2.4%
Port St Lucie
FL
258,578
434,000
86,241
5.03
117,204
30,963
-2.7%
Irving
TX
258,052
425,000
84,849
5.01
114,773
29,924
-3.7%
Raleigh
NC
499,637
425,000
85,060
5
114,773
29,713
-2.8%
Virginia Beach
VA
454,808
473,000
94,579
5
127,736
33,157
+3.4%
Lincoln
NE
300,626
360,000
72,008
5
97,220
25,212
+2.4%
Frisco
TX
235,221
719,000
145,444
4.94
194,170
48,726
-4.8%
Chicago
IL
2,721,326
395,000
80,613
4.9
106,672
26,059
+9.6%
Gilbert
AZ
288,797
610,000
124,968
4.88
164,734
39,766
+1.1%
El Paso
TX
681,724
286,000
59,932
4.77
77,236
17,304
+2.6%
Plano
TX
292,615
550,000
115,901
4.75
148,530
32,629
+1.6%
Greensboro
NC
307,372
300,000
63,516
4.72
81,017
17,501
-2.8%
Arlington
TX
403,657
350,000
74,388
4.71
94,519
20,131
-3.2%
Enterprise
NV
250,461
520,000
111,128
4.68
140,429
29,301
-6.2%
Aurora
CO
402,452
435,000
93,837
4.64
117,474
23,637
+2.4%
Philadelphia
PA
1,573,916
279,000
60,521
4.61
75,345
14,824
+4.1%
Orlando
FL
334,871
356,000
77,597
4.59
96,140
18,543
-2.0%
Tulsa
OK
413,652
278,000
60,930
4.56
75,075
14,145
+0.7%
Anchorage
AK
289,600
475,000
105,356
4.51
128,276
22,920
+7.4%
Minneapolis
MN
428,572
345,000
77,732
4.44
93,169
15,437
+2.1%
Columbus
OH
931,551
295,000
67,084
4.4
79,666
12,582
+2.1%
Oklahoma City
OK
713,014
305,000
70,040
4.35
82,367
12,327
+0.0%
Garland
TX
250,571
325,000
75,797
4.29
87,768
11,971
-4.3%
Atlanta
GA
520,066
375,000
88,165
4.25
101,271
13,106
+2.1%
Corpus Christi
TX
317,314
284,000
66,967
4.24
76,696
9,729
-1.2%
Fort Worth
TX
1,014,376
349,000
82,503
4.23
94,249
11,746
-1.1%
St Paul
MN
307,484
295,000
70,182
4.2
79,666
9,484
+2.6%
Louisville
KY
640,793
280,000
67,251
4.16
75,615
8,364
+1.8%
Laredo
TX
261,408
255,000
61,519
4.15
68,864
7,345
null
Jacksonville
FL
1,009,831
300,000
72,389
4.14
81,017
8,628
+2.7%
Kansas City
MO
516,045
289,000
69,958
4.13
78,046
8,088
+2.0%
Pittsburgh
PA
307,670
275,000
66,954
4.11
74,265
7,311
+4.1%
San Antonio
TX
1,526,621
268,000
66,176
4.05
72,375
6,199
-0.94%
Milwaukee
WI
563,512
230,000
56,792
4.05
62,113
5,321
+5.5%
St Louis
MO
279,695
215,000
53,374
4.03
58,062
4,688
+6.8%
Wichita
KS
400,993
265,000
65,855
4.02
71,565
5,710
+4.8%
Omaha
NE
489,263
285,000
71,640
3.98
76,966
5,326
+4.5%
Lubbock
TX
272,085
245,000
62,360
3.93
66,163
3,803
+32.6%
Indianapolis
IN
890,315
260,000
66,900
3.89
70,214
3,314
+1.4%
Fort Wayne
IN
273,425
230,000
61,436
3.74
62,113
677
+4.4%
Buffalo
NY
276,618
195,000
52,211
3.73
52,661
450
+1.6%
Cleveland
OH
365,391
149,000
43,383
3.43
40,238
-3,145
+22.8%
Memphis
TN
610,936
176,000
52,679
3.34
47,530
-5,149
-6.7%
Baltimore
MD
568,271
215,000
64,778
3.32
58,062
-6,716
+8.9%
Detroit
MI
645,702
104,000
39,209
2.65
28,086
-11,123
+3.8%
Toledo
OH
265,651
125,000
50,562
2.47
33,757
-16,805
+1.8%
End of preview.

US Housing Affordability Index 2026 — open data

Ownership affordability for all 50 US states + DC and the 100 most-populous US cities, July 2026 snapshot: what the median home lists for, what the median household earns, how many years of income a home costs, and the salary you would need to buy it.

Published by Crawlora. Full write-up, maps and charts: Unaffordable America: The Salary You Need to Buy a Home, Mapped (2026)

Headline findings (July 2026)

  • The median US home ($414,900, NAR closed-sale median) costs 5.08× the median household income ($81,604, ACS 2024) — against the classic rule of thumb.
  • No US state is at or below 3× anymore. The closest is Iowa (3.64×); 28 of 51 are at 5× or worse.
  • Buying the median US home at 6.49% (30-yr fixed, 20% down, 28% DTI, taxes + insurance) takes about $112,046 a year — ~$30,000 more than the median household earns.
  • Montana is the least affordable state at 7.96× ($600K median listing vs $75,340 income), ahead of California (7.49×), New York (7.47×) and Hawaii (7.44×).
  • Among the 100 largest cities, the median household can afford the median home in exactly five: Detroit, Toledo, Cleveland, Memphis, and Baltimore. Los Angeles is the least affordable at 13.98×; Irvine, CA demands the highest salary ($445,591).

Files

File What it is
data/by-state.csv One row per state + DC (51 rows)
data/by-city.csv One row per city — the 100 most-populous US census places
data/summary.json National benchmarks, full assumptions, coverage, and headline extremes

CSV schema (both files)

Column Meaning
state / city + state Geography (city rows carry the state code)
population City rows only — ACS 2024 total population (B01003)
medianListPrice Median listing price, USD (Redfin region median, July 11 2026)
medianIncome Median household income, USD (Census ACS 2024 1-year, B19013)
ratio medianListPrice / medianIncome
salaryNeeded Gross annual income at which the monthly cost of the median home = 28% of pay
gap salaryNeeded − medianIncome (negative = the median household clears the bar)
yoySalePerSqft Redfin year-over-year change in median sale price per sq ft (as reported)

Salary-needed assumptions: 20% down, 30-year fixed at 6.49% (Freddie Mac PMMS, week of 2026-07-09), property tax 1.0%/yr of home value, homeowners insurance 0.5%/yr, 28% front-end debt-to-income. Uniform national simplifications — see caveats.

Method

  1. Prices: median listing price per region from Redfin's public market data — one region-trends request per region (51 states, 100 cities) via Crawlora's structured web-data API, July 11, 2026.
  2. Incomes: US Census ACS 2024 1-year, table B19013 (median household income), matched by state and by census place; city population ranks from B01003. Census data is public domain.
  3. Join + metrics: ratio, salary-needed (assumptions above), and gap computed per geography; national anchor uses NAR's closed-sale median ($414,900).

Caveats (read before citing)

  • medianListPrice is an asking-price proxy, not a closed-sale median. List medians run above sale medians in cool markets and below in hot ones.
  • City limits ≠ metro areas. "San Jose 8.70×" is the city proper; metro-based trackers put the San Jose MSA near 11.7× because metro prices pair with a different income mix. Redfin's public region data has no metro level, so this dataset ranks cities and says so.
  • ACS 2024 income vs July 2026 prices is a ~1.5-year vintage mismatch; ratios are slightly overstated everywhere.
  • One-day snapshot (2026-07-11); thin markets move month to month.
  • Property tax and insurance are uniform national assumptions; they understate NJ/TX/IL taxes, overstate HI, and ignore FL's insurance crisis.

License & citation

CC BY 4.0 — free to use with attribution. Cite as:

Crawlora, "US Housing Affordability Index 2026 (51 states + 100 cities)", July 2026. https://github.com/Crawlora-org/housing-affordability-data

Sources to credit alongside: Redfin (market data), US Census Bureau ACS 2024 (income, public domain), Freddie Mac PMMS (mortgage rate), NAR (national sale median).

Downloads last month
35