Skip to content

Instantly share code, notes, and snippets.

@csessig86
Created March 28, 2015 20:49
Show Gist options
  • Save csessig86/d7ebc94b7b4f8e319233 to your computer and use it in GitHub Desktop.
Save csessig86/d7ebc94b7b4f8e319233 to your computer and use it in GitHub Desktop.
SVG drawing, D3 data load
District Name Enrollment FreeLunch ReducedLunch FreeorReduced FreeorReducedPrice
9 AGWSR 539 178 34 212 39.33
18 Adair-Casey 287 96 12 108 37.63
27 Adel DeSoto Minburn 1629 282 83 365 22.41
63 Akron Westfield 552 135 49 184 33.33
72 Albert City-Truesdale 99 36 17 53 53.54
81 Albia 1167 366 74 440 37.7
99 Alburnett 622 77 20 97 15.59
108 Alden 228 56 22 78 34.21
126 Algona 1358 331 129 460 33.87
135 Allamakee 1116 329 237 566 50.72
153 North Butler 660 187 60 247 37.42
171 Alta 489 206 34 240 49.08
225 Ames 4206 1033 190 1223 29.08
234 Anamosa 1212 437 107 544 44.88
243 Andrew 156 48 23 71 45.51
261 Ankeny 10169 1024 305 1329 13.07
279 Aplington-Parkersburg 837 168 72 240 28.67
333 North Union 390 102 45 147 37.69
355 Ar-We-Va 221 46 33 79 35.75
387 Atlantic 1499 600 155 755 50.37
414 Audubon 537 162 36 198 36.87
423 Aurelia 262 96 15 111 42.37
441 A-H-S-T 597 164 44 208 34.84
472 Ballard 1712 274 45 319 18.63
504 Battle Creek-Ida Grove 576 189 54 243 42.19
513 Baxter 425 82 20 102 24
540 BCLUW 604 166 35 201 33.28
549 Bedford 445 165 42 207 46.52
576 Belle Plaine 522 165 35 200 38.31
585 Bellevue 621 109 38 147 23.67
594 Belmond-Klemme 716 334 37 371 51.82
603 Bennett 81 26 4 30 37.04
609 Benton 1420 258 83 341 24.01
621 Bettendorf 4392 1108 248 1356 30.87
657 Eddyville-Blakesburg- 903 332 76 408 45.18
720 Bondurant-Farrar 1755 271 91 362 20.63
729 Boone 1995 584 116 700 35.09
747 Boyden-Hull 630 133 62 195 30.95
819 West Hancock 612 215 39 254 41.5
846 Brooklyn-Guernsey-Malcom 552 125 42 167 30.25
873 North Iowa 441 145 58 203 46.03
882 Burlington 4001 2225 217 2442 61.03
914 CAM 841 261 99 360 42.81
916 CAL 220 117 21 138 62.73
918 Calamus-Wheatland 490 99 60 159 32.45
936 Camanche 1059 334 65 399 37.68
977 Cardinal 627 306 56 362 57.74
981 Carlisle 2008 438 106 544 27.09
999 Carroll 1684 441 134 575 34.14
1044 Cedar Falls 5125 891 224 1115 21.76
1053 Cedar Rapids 15884 6894 1055 7949 50.04
1062 Center Point-Urbana 1440 179 30 209 14.51
1071 Centerville 1329 499 111 610 45.9
1079 Central Lee 1068 279 83 362 33.9
1080 Central 452 112 34 146 32.3
1082 Central DeWitt 1452 326 75 401 27.62
1089 Central City 447 118 18 136 30.43
1093 Central Decatur 698 339 109 448 64.18
1095 Central Lyon 687 164 28 192 27.95
1107 Chariton 1337 635 70 705 52.73
1116 Charles City 1525 629 120 749 49.11
1134 Charter Oak-Ute 272 98 32 130 47.79
1152 Cherokee 1009 335 84 419 41.53
1197 Clarinda 1194 299 70 369 30.9
1206 Clarion-Goldfield-Dows 921 317 78 395 42.89
1211 Clarke 1330 622 161 783 58.87
1215 Clarksville 306 83 17 100 32.68
1218 Clay Central-Everly 296 98 29 127 42.91
1221 Clear Creek Amana 2031 310 88 398 19.6
1233 Clear Lake 1273 219 73 292 22.94
1278 Clinton 3465 1724 246 1970 56.85
1332 Colfax-Mingo 652 261 35 296 45.4
1337 College 5100 1265 283 1548 30.35
1350 Collins-Maxwell 442 96 37 133 30.09
1359 Colo-NESCO School 446 123 36 159 35.65
1368 Columbus 739 487 59 546 73.88
1413 Coon Rapids-Bayard 379 137 55 192 50.66
1431 Corning 423 145 50 195 46.1
1449 Corwith-Wesley 58 26 4 30 51.72
1476 Council Bluffs 8582 3895 466 4361 50.82
1503 Creston 1441 650 143 793 55.03
1576 Dallas Center-Grimes 2574 341 159 500 19.43
1602 Danville 628 104 32 136 21.66
1611 Davenport 15269 7520 619 8139 53.3
1619 Davis County 1213 398 81 479 39.49
1638 Decorah Community 1687 295 154 449 26.62
1675 Delwood 141 43 10 53 37.59
1701 Denison 2126 1273 255 1528 71.87
1719 Denver 730 69 28 97 13.29
1737 Des Moines Independent 31356 19796 3163 22959 73.22
1782 Diagonal 105 41 9 50 47.62
1791 Dike-New Hartford 850 170 53 223 26.24
1863 Dubuque 10472 3213 675 3888 37.13
1908 Dunkerton 454 138 34 172 37.89
1917 Boyer Valley 448 154 30 184 41.07
1926 Durant 671 163 19 182 27.12
1944 Eagle Grove 823 421 85 506 61.48
1953 Earlham 626 117 20 137 21.88
1963 East Buchanan 564 140 47 187 33.16
1965 Easton Valley 485 127 36 163 33.61
1968 East Marshall 855 263 44 307 35.91
1970 East Union 475 190 43 233 49.05
1972 Eastern Allamakee 354 106 48 154 43.5
1975 River Valley 393 126 65 191 48.6
1989 Edgewood-Colesburg 536 158 58 216 40.3
2007 Eldora-New Providence 556 232 38 270 48.56
2088 Emmetsburg 732 221 90 311 42.49
2097 English Valleys 437 147 16 163 37.3
2113 Essex 221 70 24 94 42.53
2124 Estherville Lincoln 1345 530 104 634 47.14
2151 Exira-Elk Horn- 361 100 45 145 40.17
2169 Fairfield 1650 620 150 770 46.67
2205 Farragut 152 57 10 67 44.08
2295 Forest City 1123 296 132 428 38.11
2313 Fort Dodge 3680 1951 406 2357 64.05
2322 Fort Madison 2028 955 169 1124 55.42
2369 Fremont-Mills 453 144 26 170 37.53
2376 Galva-Holstein 413 83 34 117 28.33
2403 Garner-Hayfield 822 183 73 256 31.14
2457 George-Little Rock 435 123 43 166 38.16
2466 Gilbert 1397 86 23 109 7.8
2493 Gilmore City-Bradgate 42 18 7 25 59.52
2502 Gladbrook-Reinbeck 523 120 32 152 29.06
2511 Glenwood 1958 520 154 674 34.42
2520 Glidden-Ralston 309 66 17 83 26.86
2556 Graettinger-Terril 328 105 46 151 46.04
2673 Nodaway Valley 651 207 55 262 40.25
2682 GMG 480 142 51 193 40.21
2709 Grinnell-Newburg 1616 447 152 599 37.07
2718 Griswold 494 133 50 183 37.04
2727 Grundy Center 661 141 44 185 27.99
2754 Guthrie Center 510 128 60 188 36.86
2763 Clayton Ridge 871 196 70 266 30.54
2766 H-L-V 312 55 27 82 26.28
2772 Hamburg 207 107 13 120 57.97
2781 Hampton-Dumont 1186 545 94 639 53.88
2826 Harlan 1495 357 114 471 31.51
2834 Harmony 256 107 42 149 58.2
2846 Harris-Lake Park 350 76 33 109 31.14
2862 Hartley-Melvin-Sanborn 650 225 49 274 42.15
2977 Highland 652 129 33 162 24.85
2988 Hinton 739 107 38 145 19.62
3029 Howard-Winneshiek 1146 370 160 530 46.25
3033 Hubbard-Radcliffe 359 124 28 152 42.34
3042 Hudson 705 135 37 172 24.4
3060 Humboldt 1400 438 94 532 38
3105 Independence 1368 351 113 464 33.92
3114 Indianola 3503 723 218 941 26.86
3119 Interstate 35 826 184 76 260 31.48
3141 Iowa City 12930 3884 475 4359 33.71
3150 Iowa Falls 1141 362 94 456 39.96
3154 Iowa Valley 516 145 37 182 35.27
3168 IKM-Manning 652 174 79 253 38.8
3186 Janesville Consolidated 350 55 17 72 20.57
3195 Greene County 1221 450 137 587 48.08
3204 Jesup 914 187 47 234 25.6
3231 Johnston 6620 855 178 1033 15.6
3312 Keokuk 1844 953 185 1138 61.71
3330 Keota 307 82 4 86 28.01
3348 Kingsley-Pierson 434 104 19 123 28.34
3375 Knoxville 1728 591 93 684 39.58
3420 Lake Mills 706 196 77 273 38.67
3465 Lamoni 322 134 33 167 51.86
3537 Laurens-Marathon 270 163 13 176 65.19
3555 Lawton-Bronson 615 88 40 128 20.81
3600 Le Mars 2056 540 124 664 32.3
3609 Lenox 471 196 50 246 52.23
3645 Lewis Central 3054 896 215 1111 36.38
3691 North Cedar 772 207 78 285 36.92
3715 Linn-Mar 7088 1070 203 1273 17.96
3744 Lisbon 649 139 34 173 26.66
3798 Logan-Magnolia 633 139 45 184 29.07
3816 Lone Tree 478 123 50 173 36.19
3841 Louisa-Muscatine 816 276 51 327 40.07
3897 LuVerne 73 39 10 49 67.12
3906 Lynnville-Sully 467 65 48 113 24.2
3942 Madrid 668 141 50 191 28.59
3978 East Mills 456 165 44 209 45.83
4023 Manson Northwest Webster 696 156 50 206 29.6
4033 Maple Valley-Anthon Oto 614 238 85 323 52.61
4041 Maquoketa 1391 610 105 715 51.4
4043 Maquoketa Valley 700 190 89 279 39.86
4068 Marcus-Meriden-Cleghorn 399 96 42 138 34.59
4086 Marion Independent 2063 491 98 589 28.55
4104 Marshalltown 4852 2932 456 3388 69.83
4122 Martensdale-St Marys 538 93 30 123 22.86
4131 Mason City 3761 1680 390 2070 55.04
4149 MOC-Floyd Valley 1380 314 97 411 29.78
4203 Mediapolis 846 158 60 218 25.77
4212 Melcher-Dallas 332 121 34 155 46.69
4269 Midland 461 184 38 222 48.16
4271 Mid-Prairie 1295 259 111 370 28.57
4356 Missouri Valley 784 244 79 323 41.2
4419 MFL MarMac 755 235 64 299 39.6
4437 Montezuma 505 120 38 158 31.29
4446 Monticello 1081 251 84 335 30.99
4491 Moravia 378 151 46 197 52.12
4505 Mormon Trail 215 107 20 127 59.07
4509 Morning Sun 120 48 5 53 44.17
4518 Moulton-Udell 191 73 10 83 43.46
4527 Mount Ayr 629 237 51 288 45.79
4536 Mount Pleasant 2021 798 124 922 45.62
4554 Mount Vernon 1249 138 30 168 13.45
4572 Murray 322 130 36 166 51.55
4581 Muscatine 5184 2308 353 2661 51.33
4599 Nashua-Plainfield 596 129 66 195 32.72
4617 Nevada 1544 455 83 538 34.84
4644 Newell-Fonda 463 190 53 243 52.48
4662 New Hampton 972 241 58 299 30.76
4689 New London 508 156 51 207 40.75
4725 Newton 2838 1230 224 1454 51.23
4772 Central Springs 746 216 45 261 34.99
4773 Northeast 840 231 50 281 33.45
4774 North Fayette 777 234 96 330 42.47
4775 Northeast Hamilton 170 57 16 73 42.94
4776 North Mahaska 523 125 64 189 36.14
4777 North Linn 638 101 26 127 19.91
4778 North Kossuth 261 112 36 148 56.7
4779 North Polk 1459 141 54 195 13.37
4784 North Scott 3096 574 153 727 23.48
4785 North Tama County 476 110 46 156 32.77
4787 North Winneshiek 140 35 33 68 48.57
4788 Northwood-Kensett 519 138 47 185 35.65
4797 Norwalk 2619 387 97 484 18.48
4860 Odebolt-Arthur 385 113 54 167 43.38
4869 Oelwein 1209 562 127 689 56.99
4878 Ogden 687 113 31 144 20.96
4890 Okoboji 933 249 102 351 37.62
4905 Olin Consolidated 83 52 4 56 67.47
4978 Orient-Macksburg 166 77 14 91 54.82
4995 Osage 925 203 70 273 29.51
5013 Oskaloosa 2353 975 145 1120 47.6
5049 Ottumwa 4332 2049 302 2351 54.27
5121 Panorama 706 188 62 250 35.41
5139 Paton-Churdan 198 81 17 98 49.49
5160 PCM 1072 230 64 294 27.43
5163 Pekin 685 126 35 161 23.5
5166 Pella 2165 308 124 432 19.95
5184 Perry 1746 1104 222 1326 75.95
5250 Pleasant Valley 4332 383 69 452 10.43
5256 Pleasantville 677 181 34 215 31.76
5283 Pocahontas Area 659 249 65 314 47.65
5310 Postville 656 654 0 654 99.7
5325 Prairie Valley 541 153 61 214 39.56
5328 Prescott 38 22 4 26 68.42
5463 Red Oak 1088 543 94 637 58.55
5486 Remsen-Union 353 63 39 102 28.9
5508 Riceville 330 96 24 120 36.36
5510 Riverside 602 170 49 219 36.38
5607 Rock Valley 777 242 76 318 40.93
5643 Roland-Story 1060 166 53 219 20.66
5697 Rudd-Rockford-Marble Rk 461 125 31 156 33.84
5724 Ruthven-Ayrshire 188 63 22 85 45.21
5751 St Ansgar 632 143 70 213 33.7
5805 Saydel 1302 509 110 619 47.54
5823 Schaller-Crestland 318 97 38 135 42.45
5832 Schleswig 198 78 16 94 47.47
5877 Sergeant Bluff-Luton 1583 394 76 470 29.69
5895 Seymour 250 104 28 132 52.8
5922 West Fork CSD 659 150 72 222 33.69
5949 Sheldon 993 291 94 385 38.77
5976 Shenandoah 996 411 84 495 49.7
5994 Sibley-Ocheyedan 777 251 66 317 40.8
6003 Sidney 334 118 29 147 44.01
6012 Sigourney 537 125 50 175 32.59
6030 Sioux Center 1167 346 133 479 41.05
6035 Sioux Central 604 187 50 237 39.24
6039 Sioux City 13862 7804 1378 9182 66.24
6091 South Central Calhoun 851 253 76 329 38.66
6093 Solon 1412 84 35 119 8.43
6094 Southeast Warren 476 113 50 163 34.24
6095 South Hamilton 689 172 56 228 33.09
6096 Southeast Webster Grand 530 178 71 249 46.98
6097 South Page 127 70 7 77 60.63
6098 South Tama County 1423 693 150 843 59.24
6099 South O'Brien 584 146 71 217 37.16
6100 South Winneshiek 497 92 59 151 30.38
6101 Southeast Polk 6590 1536 305 1841 27.94
6102 Spencer 1980 698 199 897 45.3
6120 Spirit Lake 1215 267 62 329 27.08
6138 Springville 357 69 16 85 23.81
6165 Stanton 228 41 16 57 25
6175 Starmont 588 221 53 274 46.6
6219 Storm Lake 2306 1453 253 1706 73.98
6246 Stratford 90 37 7 44 48.89
6264 West Central Valley 841 324 53 377 44.83
6273 Sumner-Fredericksburg 825 174 79 253 30.67
6408 Tipton 931 193 57 250 26.85
6453 Treynor 775 35 15 50 6.45
6460 Tri-Center 668 119 50 169 25.3
6462 Tri-County 234 88 29 117 50
6471 Tripoli 413 78 40 118 28.57
6509 Turkey Valley 364 61 29 90 24.73
6512 Twin Cedars 348 137 27 164 47.13
6516 Twin Rivers 50 30 7 37 74
6534 Underwood 747 88 39 127 17
6536 Union 1150 253 78 331 28.78
6561 United 216 44 18 62 28.7
6579 Urbandale 3888 794 163 957 24.61
6591 Valley 357 99 40 139 38.94
6592 Van Buren 568 160 59 219 38.56
6615 Van Meter 675 58 23 81 12
6633 Ventura 232 60 10 70 30.17
6651 Villisca 280 115 33 148 52.86
6660 Vinton-Shellsburg 1513 488 74 562 37.14
6700 Waco 438 126 30 156 35.62
6741 East Sac County 913 295 105 400 43.81
6750 Walnut 73 24 10 34 46.58
6759 Wapello 632 234 60 294 46.52
6762 Wapsie Valley 718 88 28 116 16.16
6768 Washington 1651 594 151 745 45.12
6795 Waterloo 10662 6498 914 7412 69.52
6822 Waukee 8531 1032 225 1257 14.73
6840 Waverly-Shell Rock 2227 453 103 556 24.97
6854 Wayne 518 199 61 260 50.19
6867 Webster City 1602 687 90 777 48.5
6921 West Bend-Mallard 355 87 20 107 30.14
6930 West Branch 799 159 15 174 21.78
6937 West Burlington Ind 883 334 76 410 46.43
6943 West Central 252 79 26 105 41.67
6950 West Delaware County 1463 358 122 480 32.81
6957 West Des Moines 8963 2495 479 2974 33.18
6961 Western Dubuque 3107 610 242 852 27.42
6969 West Harrison 316 108 33 141 44.62
6975 West Liberty 1179 560 138 698 59.2
6983 West Lyon 872 122 65 187 21.44
6985 West Marshall 912 199 51 250 27.41
6987 West Monona 636 241 71 312 49.06
6990 West Sioux 740 360 88 448 60.54
6992 Westwood 522 123 58 181 34.67
7002 Whiting 193 92 30 122 63.21
7029 Williamsburg 1159 244 55 299 25.8
7038 Wilton 815 191 63 254 31.17
7047 Winfield-Mt Union 438 170 39 209 47.72
7056 Winterset 1710 466 105 571 33.39
7092 Woodbine 438 124 29 153 34.93
7098 Woodbury Central 574 80 30 110 19.16
7110 Woodward-Granger 1092 418 18 436 39.93
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Simple SVG and loading data with D3</title>
<script type="text/javascript" src="http://d3js.org/d3.v3.js"></script>
</head>
<style>
html, body {
font-family: Helvetica;
}
svg {
margin-bottom: 20px;
}
svg line {
stroke: blue;
stroke-width: 5px;
}
svg circle, rect {
fill: blue;
}
svg rect {
transform: rotate(-5deg);
}
</style>
<body>
<p>Here's a simple SVG:</p>
<svg width="200" height="150">
<line x1="52" y1="25" x2="45" y2="130"></line>
<line x1="156" y1="30" x2="152" y2="120"></line>
<rect x="45" y="25" width="110" height="20"></rect>
<circle cx="32" cy="120" r="20"></circle>
<circle cx="140" cy="110" r="20"></circle>
</svg>
<p>Shout out to the iTunes icon for inspiration</p>
<p>Also, check the console for the data</p>
<script type="text/javascript">
//Load in contents of CSV file
d3.csv("ia_free_reduced.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