Source: US Census Bureau, American Community Survey
Let’s make a good gt table
goodtable <-gt(states) |>tab_header(title ="Mean Household Income of Quintiles, 2021",subtitle ="Seven Representative U.S. States" ) |>cols_label(name ="",q1 ="lowest",q2 ="second",q3 ="third",q4 ="fourth",q5 ="highest",top5 ="top 5%" ) |>fmt_currency(columns =c(q1:top5),currency ="USD", use_subunits =FALSE ) |># note that you can use markdown (md) to format the source note for html documentstab_source_note(source_note =md("**Source**: US Census Bureau, American Community Survey"))goodtable
10:00
Change Colum Width
Mean Household Income of Quintiles, 2021
Seven Representative U.S. States
lowest
second
third
fourth
highest
top 5%
District of Columbia
$12,971
$51,060
$94,478
$157,803
$375,792
$670,768
Florida
$14,307
$37,662
$62,092
$97,166
$230,107
$431,870
Nevada
$15,024
$40,468
$66,247
$101,591
$224,480
$410,161
Oklahoma
$13,348
$34,646
$57,485
$89,451
$195,269
$348,180
Arkansas
$12,076
$31,051
$52,280
$82,811
$188,510
$344,470
New Mexico
$11,058
$31,274
$54,295
$86,905
$188,282
$323,568
Puerto Rico
$2,906
$12,144
$22,163
$38,397
$99,043
$187,234
Source: US Census Bureau, American Community Survey