Skip to content

Instantly share code, notes, and snippets.

@oneryandunn
Created March 29, 2015 19:04
Show Gist options
  • Save oneryandunn/8d09d6fce1cad8c3a2ba to your computer and use it in GitHub Desktop.
Save oneryandunn/8d09d6fce1cad8c3a2ba to your computer and use it in GitHub Desktop.
DWP Benefit Data
Month Total Jobseeker Ill/Disabled Lone Parent Carer Income Related Bereaved Pensioner
May-02 17063.72 877.38 4725.37 870.95 427.65 1673.25 217.63 8271.49
Aug-02 17126.37 890.54 4747.51 875.04 435.17 1679.55 212.69 8285.88
Nov-02 17104.84 850.05 4776.00 856.23 459.50 1677.88 207.15 8278.04
Feb-03 17209.50 946.16 4788.75 848.85 474.69 1668.73 200.17 8282.16
May-03 17200.63 885.78 4809.68 855.81 491.05 1679.14 195.21 8283.96
Aug-03 17214.82 851.37 4834.92 851.73 509.17 1698.67 190.52 8278.44
Nov-03 17181.16 803.88 4783.66 831.75 530.45 1982.91 185.21 8063.31
Feb-04 17259.94 867.42 4730.08 830.25 552.52 2166.67 180.12 7932.87
May-04 17224.01 777.40 4661.50 823.27 574.91 2356.34 175.56 7855.02
Aug-04 17272.21 769.25 4656.63 818.10 590.31 2449.55 170.91 7817.47
Nov-04 17263.35 741.06 4656.38 796.53 602.32 2478.04 166.37 7822.66
Feb-05 17338.48 819.68 4638.07 793.13 612.80 2491.91 162.67 7820.23
May-05 17335.91 800.66 4630.96 789.32 624.13 2512.03 159.71 7819.11
Aug-05 17376.70 825.11 4635.60 789.35 638.74 2522.17 155.88 7809.86
Nov-05 17379.39 836.71 4632.26 778.56 645.50 2530.19 150.68 7805.50
Feb-06 17492.94 935.20 4638.25 777.09 664.25 2523.79 148.04 7806.33
May-06 17466.03 895.88 4631.06 774.86 672.07 2527.10 144.98 7820.09
Aug-06 17524.35 900.92 4641.15 783.18 682.23 2532.27 141.95 7842.67
Nov-06 17533.97 860.22 4653.36 775.62 693.12 2543.42 135.60 7872.63
Feb-07 17610.95 904.04 4647.75 771.35 706.83 2531.88 132.64 7916.46
May-07 17560.12 807.27 4648.86 765.62 716.94 2532.28 129.24 7959.90
Aug-07 17613.04 788.45 4670.71 763.55 727.11 2530.03 124.36 8008.84
Nov-07 17608.59 741.10 4691.75 741.83 737.78 2522.80 121.22 8052.11
Feb-08 17693.97 806.70 4676.13 741.71 750.97 2510.37 117.61 8090.47
May-08 17728.42 787.87 4681.72 738.64 760.93 2506.13 115.17 8137.96
Aug-08 17886.19 868.73 4699.14 744.68 777.37 2506.63 111.32 8178.33
Nov-08 18111.53 1036.48 4729.91 728.98 788.42 2509.25 107.54 8210.95
Feb-09 18540.96 1421.60 4737.86 736.04 796.11 2497.44 105.05 8246.87
May-09 18655.36 1443.00 4782.09 720.48 807.12 2499.46 102.86 8300.36
Aug-09 18802.96 1485.32 4819.85 715.73 822.82 2500.32 99.76 8359.15
Nov-09 18826.50 1469.92 4826.52 695.72 832.58 2500.71 96.41 8404.64
Feb-10 18923.15 1526.01 4833.57 692.02 836.90 2495.59 95.80 8443.27
May-10 18806.15 1354.62 4853.37 679.15 846.38 2493.56 94.96 8484.11
Aug-10 18821.60 1349.71 4861.43 672.35 858.69 2487.59 95.00 8496.83
Nov-10 18787.80 1328.91 4845.73 648.30 866.40 2478.15 91.47 8528.84
Feb-11 18851.36 1438.67 4839.44 613.78 869.37 2460.61 91.70 8537.80
May-11 18837.26 1404.14 4843.53 595.40 873.74 2443.05 91.17 8586.24
Aug-11 18959.26 1482.86 4867.82 595.29 882.95 2429.39 88.48 8612.46
Nov-11 18984.79 1478.43 4870.40 581.62 886.80 2415.93 87.77 8663.82
Feb-12 19099.65 1589.64 4861.28 584.17 888.99 2393.45 87.80 8694.31
May-12 19030.94 1484.07 4864.33 577.08 896.45 2328.44 87.36 8793.21
Aug-12 19012.95 1471.07 4866.21 545.24 901.74 2311.87 85.88 8830.94
Nov-12 18983.63 1443.54 4858.65 510.06 907.51 2294.79 84.42 8884.65
Feb-13 19029.26 1514.37 4838.02 504.89 910.95 2267.76 84.43 8908.82
May-13 18906.15 1371.62 4829.25 499.73 915.55 2226.46 84.63 8978.90
Aug-13 18804.17 1262.53 4820.64 497.54 919.97 2212.21 83.11 9008.16
Nov-13 18710.29 1132.78 4836.21 485.00 921.85 2197.50 81.36 9055.60
Feb-14 18719.80 1145.63 4839.10 480.09 924.11 2174.39 81.59 9074.89
May-14 18610.81 973.66 4877.12 474.73 932.76 2112.31 81.70 9158.53
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Loading CSV Data with D3</title>
<script src="http://d3js.org/d3.v3.js" > </script>
<style type="text/css">
body {
background-color: white;
font-family: Helvetica, Arial, sans-serif;
}
svg {
background-color: lightblue;
}
</style>
</head>
<body>
<svg width="500" height="200">
<!-- cloud -->
<circle cx="100" cy="75" r="30" fill="white" />
<circle cx="75" cy="75" r="20" fill="white" />
<circle cx="75" cy="82" r="19" fill="white" />
<circle cx="125" cy="70" r="18" fill="white" />
<circle cx="125" cy="85" r="18" fill="white" />
<circle cx="57" cy="75" r="11" fill="white" />
<circle cx="140" cy="82" r="13" fill="white" />
<circle cx="140" cy="75" r="13" fill="white" />
<circle cx="150" cy="75" r="7" fill="white" />
<!-- rainbow -->
<circle cx="250" cy="175" r="100" fill="red" />
<circle cx="250" cy="175" r="90" fill="orange" />
<circle cx="250" cy="175" r="80" fill="yellow" />
<circle cx="250" cy="175" r="70" fill="green" />
<circle cx="250" cy="175" r="60" fill="blue" />
<circle cx="250" cy="175" r="50" fill="indigo" />
<circle cx="250" cy="175" r="40" fill="#7F00FF" />
<circle cx="250" cy="175" r="30" fill="lightblue" />
<!-- grass -->
<rect x="0" y="175" width="500" height="25" fill="lightgreen"/>
<!-- sun -->
<circle cx="500" cy="0" r="50" fill="orange" />
<line x1="500" y1="0" x2="490" y2="170" stroke="orange" stroke-width="1" />
<line x1="500" y1="0" x2="345" y2="60" stroke="orange" stroke-width="1" />
<line x1="500" y1="0" x2="330" y2="10" stroke="orange" stroke-width="1" />
<line x1="500" y1="0" x2="385" y2="112" stroke="orange" stroke-width="1" />
<line x1="500" y1="0" x2="435" y2="150" stroke="orange" stroke-width="1" />
<!-- tree -->
<rect x="420" y="135" width="15" height="50" fill="brown"/>
<circle cx="425" cy="120" r="30" fill="green" />
<circle cx="405" cy="125" r="20" fill="green" />
<circle cx="405" cy="110" r="20" fill="green" />
<circle cx="445" cy="125" r="20" fill="green" />
<circle cx="445" cy="110" r="20" fill="green" />
<circle cx="425" cy="105" r="20" fill="green" />
<!-- text -->
<text x="5" y="22" fill="darkgrey" font-size="24" font-family="Helvetica">see my data in the console</text>
</svg>
<script type="text/javascript">
//Load in contents of CSV fil
//Now CSV contents have been transformed into
//an array of JSON objects.
//Log 'data' to the console, for verification.
// console.log(data);
d3.csv("DWPBenefitData.csv", function(data) {
console.log(data);
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment