Last active
September 4, 2015 01:32
-
-
Save asuozzo/8e4ead05faf2ed3e6e8b to your computer and use it in GitHub Desktop.
D3 Bar Chart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Vermont State Salaries by Agency, 2009</title> | |
<script type="text/javascript" src="http://d3js.org/d3.v3.js"></script> | |
<style type="text/css"> | |
body { | |
background-color: #add8e6; | |
} | |
svg { | |
background-color: #add8e6; | |
} | |
</style> | |
</head> | |
<body> | |
<script type="text/javascript"> | |
var svg = d3.select("body") | |
.append("svg") | |
.attr("width", 800) | |
.attr("height", 600); | |
d3.csv("VTSalaryData20092014.csv", function(data) { | |
data.sort(function(a, b) { | |
return d3.descending(+a.nine, +b.nine); | |
}); | |
var rects = svg.selectAll("rect") | |
.data(data) | |
.enter() | |
.append("rect"); | |
rects.attr("x", 0) | |
.attr("y", function(d, i) { | |
return i * 10; | |
}) | |
.attr("width", function(d) { | |
return d.nine/100000; | |
}) | |
.attr("height", 8) | |
.attr("fill", "#663366") | |
.append("title") | |
.text(function(d) { | |
return d.Agency + " spent $" + d.nine + " on salaries in 2009."; | |
}); | |
}); | |
</script> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Agency | nine | ten | eleven | twelve | thirteen | fourteen | |
---|---|---|---|---|---|---|---|
Administration | 517082.41 | 444531.98 | 420472.7 | 552826.66 | 551458.18 | 2478554.18 | |
Agriculture | 5252889.2 | 4921034.6 | 4887326.59 | 4734889.24 | 5364325.41 | 5809201.23 | |
AttorneyGeneral | 4546406.16 | 4568744.45 | 4669888.88 | 4769927.11 | 5085669.7 | 5264829.65 | |
Auditor | 954234.26 | 988680.96 | 1046529.54 | 1032706.41 | 1081290.45 | 1137847.9 | |
BuildingsandGeneralServices | 17354008.95 | 15854477.67 | 16008714.91 | 15182672.76 | 15691697.22 | 14577891.55 | |
HouseClerk | 241282.05 | 245943.77 | 262990.61 | 267954.22 | 291607.77 | 289839.36 | |
Commerce | 5472059.97 | 4875442.9 | 4906046.75 | 4640734.92 | 5060504.03 | 5717673.8 | |
Corrections | 55786501.56 | 53891477.24 | 54002007.3 | 52255815.88 | 56399508.6 | 57978276.23 | |
CourtAdministratorJudicial | 18786732.71 | 18464358.16 | 19489262.56 | 19132129.05 | 20270036.51 | 20536677.26 | |
CriminalJusticeTrainingCouncil | 685841.01 | 595100.13 | 467074.32 | 622835.32 | 762900.44 | 761435.14 | |
DAIL | 16255639.55 | 15098550.37 | 15179803.52 | 14704159.36 | 15926574.58 | 16673609.71 | |
DefenderGeneral | 3427395.02 | 3429466.92 | 3646011.02 | 3622131.2 | 4041349.49 | 4307224.21 | |
HumanResources | 2790417.67 | 2374965.9 | 4191568.48 | 4125654.42 | 4906899.73 | 5211614.14 | |
ChildrenandFamilies | 52190960.86 | 51911733.07 | 52547090.85 | 49499461.16 | 54475730.34 | 59213987.59 | |
Financial Regulation | 7355280.88 | 7323602.15 | 7403182.74 | 7085915.74 | 7576832.74 | 7416701.67 | |
Mental Health | 14274271.52 | 15009057.28 | 14845025.25 | 14222783.74 | 9836706.39 | 11253894.43 | |
Education | 10462572.85 | 9562114.91 | 9051087.81 | 8702160.76 | 9479643.7 | 9465076.08 | |
Enhanced911 | 0 | 0 | 0 | 666758.14 | 664154.02 | 708486.38 | |
EnvironmentalConservation | 15807512.89 | 15721770.73 | 15820841.75 | 15177541.7 | 16166889.71 | 17222632.79 | |
ExecutiveOffice | 1054509.65 | 859266.89 | 892555.73 | 920172.13 | 910386.88 | 961766.75 | |
Finance&Management | 2705241.99 | 2039989.2 | 2113685.48 | 2176316.01 | 2483596.81 | 2383948.72 | |
Fish&Wildlife | 8223052.94 | 8180897.77 | 8268954.5 | 7858961.91 | 8241590.81 | 8760450.54 | |
ForestsParks&Recreation | 8315234.92 | 8047742.73 | 8320042.37 | 8102153.13 | 8577090.6 | 8987010.03 | |
GreenMountainCareBoard | 0 | 0 | 0 | 746160.5 | 1410839.93 | 1917035.28 | |
Health | 26772556.93 | 24741532.31 | 24586302.43 | 23595120.06 | 26238288.05 | 28019450.68 | |
HouseofRepresentatives | 2963951.97 | 3240212.51 | 3051484.16 | 3157939.33 | 3281873.83 | 3247586.67 | |
HumanRightsCommission | 266325.28 | 266296.96 | 277923.48 | 262367.75 | 266679.92 | 295346.25 | |
HumanServices | 5912267.54 | 6687360.82 | 5781872.54 | 6297370.16 | 7051831.18 | 6782268.3 | |
InformationandInnovation | 3404103.67 | 4497882.77 | 4624932.76 | 4438401.98 | 5304160.84 | 7546490.68 | |
JointFiscalCommittee | 808055.02 | 790096.5 | 844761.18 | 753554.79 | 831313.71 | 886920.16 | |
LaborRelationsBoard | 107195.53 | 95470.37 | 95021.22 | 91953.4 | 96772.92 | 101317.28 | |
Labor | 13817273.06 | 14474323.21 | 14011934.15 | 12890702.51 | 13534708.07 | 13666619.41 | |
LegislativeCouncil | 2360235.79 | 2385054.82 | 2337083.66 | 2117232.97 | 2197367.15 | 2456455.37 | |
Libraries | 1439531.96 | 1218355.12 | 1294789.98 | 1200313.92 | 1290232.6 | 1321754.45 | |
LiquorControl | 2980545.45 | 2999972.47 | 2880615.3 | 2810200.62 | 2807087.95 | 2895731.61 | |
LotteryCommission | 985484.87 | 1020620.24 | 1021940.56 | 974716.26 | 1028638.06 | 1016049.28 | |
LtGovernor | 116574.4 | 115003.2 | 121165.36 | 120009.02 | 120521.48 | 121258.41 | |
Military | 6010735.16 | 5813751.45 | 6125845.39 | 5856397.48 | 6109924.67 | 5914359.97 | |
NaturalResourcesBoard | 1802769.92 | 1667412.93 | 1646681.63 | 1510214.22 | 1594086.06 | 1642168.1 | |
NaturalResources | 3592906.46 | 2494653.13 | 1820849.07 | 1868120.41 | 2095390.01 | 2177012.53 | |
PublicSafety | 39462489.05 | 39395985.78 | 39315973.1 | 39171236.03 | 41707129.4 | 43903473.67 | |
PublicServiceBoard | 1661954.47 | 1514966.11 | 1677909.39 | 1624251.78 | 1656038.24 | 1864905.03 | |
PublicService | 3184926.06 | 3304741.14 | 3635581.81 | 3005883.32 | 3021374.62 | 3155500.94 | |
SecretaryofState | 3438116.48 | 3283291.42 | 3422261.83 | 3449257.87 | 3587495.09 | 3634472.52 | |
SecretaryoftheSenate | 217677.66 | 216377.97 | 213330.21 | 222462.73 | 245775.23 | 256229.77 | |
Senate | 653570.92 | 707845.23 | 644043.25 | 659092.88 | 693418.74 | 691920.12 | |
SgtAtArms | 391047.96 | 358707.38 | 329904.94 | 366892.54 | 386701.97 | 401980.11 | |
StateTreasurer | 2167460.85 | 2117095.26 | 2087820 | 1954419.08 | 2214741.29 | 2288439.63 | |
StatesAttorneys | 5432378.71 | 5282833.65 | 5238337.6 | 4863125.33 | 5233775.17 | 5546350.65 | |
StatesAttorneysDept | 2862563.8 | 2919287.45 | 2986475.11 | 2828874.07 | 2992904.74 | 3175282.92 | |
Taxes | 8643626.47 | 7927345.28 | 8107289.24 | 7712225.42 | 8403662.35 | 8660439.09 | |
Transportation | 62825173.63 | 63433624.13 | 64816878.55 | 64055953.68 | 67411747.78 | 70938509.06 | |
CommissiononWomen | 180146.12 | 168688.9 | 168830.16 | 162479.25 | 160362.83 | 174324.85 | |
VermontHealthAccess | 5080192.76 | 4795846.92 | 6209003.54 | 6617847.77 | 8817422.99 | 11608635.59 | |
VeteransHome | 9125534.55 | 9262772.7 | 9044897.18 | 8849198.55 | 8854881.85 | 9032392.96 | |
VOSHAReviewBoard | 18633.24 | 15809.6 | 2607.28 | 13892.34 | 16405.77 | 15584.52 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment