Skip to content

Instantly share code, notes, and snippets.

@heartpunk
Created February 2, 2016 05:26
Show Gist options
  • Save heartpunk/ba41d35a5b4fff8f689c to your computer and use it in GitHub Desktop.
Save heartpunk/ba41d35a5b4fff8f689c to your computer and use it in GitHub Desktop.
calculate correlation between tax burden and per capita income.
State Burden Rate Income per Capita Taxes Paid to Own State Per Capita Taxes Paid to Other States Per Capita Total Taxes Paid Per Capita
Alabama 8.7% $35,336.66 $2,141.95 $925.09 $3,067.04
Alaska 6.5% $49,779.58 $1,986.21 $1,242.48 $3,228.69
Arizona 8.8% $37,011.65 $2,283.47 $992.05 $3,275.52
Arkansas 10.1% $34,862.10 $2,552.18 $966.83 $3,519.01
California 10.9% $47,807.79 $4,126.38 $1,110.81 $5,237.19
Colorado 8.9% $48,313.50 $2,967.52 $1,336.18 $4,303.70
Connecticut 12.6% $62,374.15 $5,515.62 $2,353.76 $7,869.38
Delaware 10.2% $43,437.33 $2,610.01 $1,802.16 $4,412.17
District of Columbia 10.7% $70,836.83 $5,230.92 $2,309.81 $7,540.73
Florida 8.9% $41,848.49 $2,498.79 $1,239.64 $3,738.43
Georgia 9.1% $37,477.52 $2,445.99 $980.37 $3,426.36
Hawaii 10.2% $44,920.02 $3,480.16 $1,095.84 $4,576.00
Idaho 9.3% $35,495.64 $2,255.14 $1,063.04 $3,318.18
Illinois 11.0% $47,655.55 $4,015.29 $1,219.85 $5,235.14
Indiana 9.5% $37,580.46 $2,591.64 $993.11 $3,584.75
Iowa 9.2% $43,877.59 $2,876.58 $1,160.85 $4,037.43
Kansas 9.5% $43,490.14 $2,807.66 $1,323.08 $4,130.74
Kentucky 9.5% $34,782.48 $2,410.46 $887.70 $3,298.16
Louisiana 7.6% $38,905.57 $1,953.10 $996.84 $2,949.94
Maine 10.2% $39,062.17 $2,894.60 $1,101.93 $3,996.53
Maryland 10.9% $54,265.58 $4,387.04 $1,533.18 $5,920.22
Massachusetts 10.3% $57,179.53 $4,220.49 $1,651.29 $5,871.78
Michigan 9.4% $38,636.25 $2,704.21 $926.41 $3,630.62
Minnesota 10.8% $47,805.87 $3,979.93 $1,204.79 $5,184.72
Mississippi 8.6% $31,847.27 $1,909.66 $832.46 $2,742.12
Missouri 9.3% $38,825.01 $2,483.32 $1,108.06 $3,591.38
Montana 8.7% $38,980.50 $2,172.35 $1,216.49 $3,388.84
Nebraska 9.2% $45,484.91 $2,930.17 $1,267.03 $4,197.20
Nevada 8.1% $41,296.58 $2,050.95 $1,297.97 $3,348.92
New Hampshire 7.9% $50,287.79 $2,172.53 $1,788.86 $3,961.39
New Jersey 12.2% $56,731.04 $4,876.44 $2,050.03 $6,926.47
New Mexico 8.7% $36,051.21 $2,170.36 $971.03 $3,141.39
New York 12.7% $55,047.07 $5,587.84 $1,405.58 $6,993.42
North Carolina 9.8% $37,522.78 $2,706.67 $952.14 $3,658.81
North Dakota 9.0% $53,953.44 $3,348.72 $1,518.21 $4,866.93
Ohio 9.8% $40,110.60 $2,985.84 $937.98 $3,923.82
Oklahoma 8.6% $40,762.14 $2,420.17 $1,094.55 $3,514.72
Oregon 10.3% $39,578.36 $3,062.85 $1,032.01 $4,094.86
Pennsylvania 10.2% $45,046.00 $3,384.52 $1,204.16 $4,588.68
Rhode Island 10.8% $46,359.05 $3,475.91 $1,521.60 $4,997.51
South Carolina 8.4% $34,820.69 $1,998.87 $936.94 $2,935.81
South Dakota 7.1% $46,780.66 $1,910.79 $1,407.30 $3,318.09
Tennessee 7.3% $38,178.36 $1,860.96 $944.19 $2,805.15
Texas 7.6% $44,080.98 $2,332.13 $1,008.06 $3,340.19
Utah 9.6% $36,988.84 $2,504.59 $1,051.14 $3,555.73
Vermont 10.3% $44,336.70 $3,129.45 $1,427.89 $4,557.34
Virginia 9.3% $49,540.85 $3,258.34 $1,364.73 $4,623.07
Washington 9.3% $48,999.45 $3,240.84 $1,300.64 $4,541.48
West Virginia 9.8% $34,015.67 $2,454.87 $875.80 $3,330.67
Wisconsin 11.0% $42,990.35 $3,602.49 $1,131.73 $4,734.22
Wyoming 7.1% $61,707.54 $2,055.75 $2,350.99 $4,406.74
from pandas import DataFrame
frame = DataFrame.from_csv("data")
frame["Burden Rate"].map(lambda x: float(x[:-1])).corr(frame["Income per Capita"].map(lambda x: float(str.replace(x[1:], ',', ''))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment