Skip to content

Instantly share code, notes, and snippets.

@seschultz
Last active September 27, 2017 23:36
Show Gist options
  • Save seschultz/91a77ad7b4108aa794833f1cb17e6116 to your computer and use it in GitHub Desktop.
Save seschultz/91a77ad7b4108aa794833f1cb17e6116 to your computer and use it in GitHub Desktop.
Grouped Bars
license: mit
NeighborhoodTown CityTown TotalEnrolled TotalDiagnosed TotalDiagnosedMedicated WomenEnrolled WomenDiagnosed WomenDiagnosedMedicated MenEnrolled MenDiagnosed MenDiagnosedMedicated
Aspinwall Borough Aspinwall Borough 1563 111 65 896 71 38 667 40 27
Avalon Borough Avalon Borough 1141 168 80 668 111 52 473 57 28
Avalon Borough Avalon Borough 1419 153 98 833 89 51 586 64 47
Baldwin Borough Baldwin Borough 2949 347 187 1585 200 111 1364 147 76
Baldwin Borough Baldwin Borough 1836 215 102 999 121 48 837 94 54
Baldwin Borough Baldwin Borough 2053 230 121 1083 110 51 970 120 70
Baldwin Borough Baldwin Borough 2204 227 124 1201 119 62 1003 108 62
Baldwin Borough Baldwin Borough 2957 381 183 1607 197 83 1350 184 100
Baldwin Township Baldwin Township 1179 137 74 655 71 37 524 66 37
Bell Acres Borough Bell Acres Borough 744 63 33 391 32 12 353 31 21
Bellevue Borough Bellevue Borough 1758 170 115 980 85 58 778 85 57
Bellevue Borough Bellevue Borough 1050 83 54 589 43 25 461 40 29
Bellevue Borough Bellevue Borough 1495 141 81 813 77 48 682 64 33
Ben Avon Borough Ben Avon Borough 1102 79 36 583 46 18 519 33 18
Bethel Park Bethel Park 2766 381 168 1573 232 93 1193 149 75
Bethel Park Bethel Park 1039 106 45 528 53 19 511 53 26
Bethel Park Bethel Park 2976 333 189 1573 181 92 1403 152 97
Bethel Park Bethel Park 2674 340 174 1437 166 73 1237 174 101
Bethel Park Bethel Park 2519 272 141 1333 135 67 1186 137 74
Bethel Park Bethel Park 3119 288 151 1673 156 74 1446 132 77
Bethel Park Bethel Park 2411 296 147 1303 170 77 1108 126 70
Bethel Park Bethel Park 1888 167 82 1013 79 36 875 88 46
Blawnox Borough Blawnox Borough 813 91 58 469 55 37 344 36 21
Brackenridge Borough Brackenridge Borough 1873 257 151 1030 150 91 843 107 60
Braddock Borough Braddock Borough 1335 156 90 786 106 56 549 50 34
Braddock Hills Borough Braddock Hills Borough 979 140 71 556 75 35 423 65 36
Bradford Woods Borough Bradford Woods Borough 677 47 25 347 21 11 330 26 14
Brentwood Borough Brentwood Borough 2328 247 131 1266 138 65 1062 109 66
Brentwood Borough Brentwood Borough 3310 263 147 1801 143 73 1509 120 74
Bridgeville Borough Bridgeville Borough 733 99 60 416 60 32 317 39 28
Bridgeville Borough Bridgeville Borough 2006 280 157 1120 163 84 886 117 73
Carnegie Borough Carnegie Borough 884 98 55 481 49 25 403 49 30
Carnegie Borough Carnegie Borough 1104 99 60 615 52 24 489 47 36
Carnegie Borough Carnegie Borough 1964 213 130 1128 131 69 836 82 61
Castle Shannon Borough Castle Shannon Borough 2622 284 157 1471 163 88 1151 121 69
Castle Shannon Borough Castle Shannon Borough 1861 208 118 1000 120 65 861 88 53
Cheswick Borough Cheswick Borough 1063 126 76 595 71 44 468 55 32
Churchill Borough Churchill Borough 1875 221 114 1008 106 48 867 115 66
Clairton Clairton 1092 126 80 640 71 43 452 55 37
Clairton Clairton 1526 184 126 917 119 79 609 65 47
Clairton Clairton 1139 142 88 663 84 52 476 58 36
Collier Township Collier Township 4590 508 293 2482 270 132 2108 238 161
Coraopolis Borough Coraopolis Borough 1566 196 123 861 108 67 705 88 56
Coraopolis Borough Coraopolis Borough 1408 190 119 784 108 65 624 82 54
Crafton Borough Crafton Borough 1354 164 83 746 104 50 608 60 33
Crafton Borough Crafton Borough 1929 189 97 1053 103 53 876 86 44
Crescent Township Crescent Township 1353 172 110 711 88 54 642 84 56
Dormont Borough Dormont Borough 1246 103 58 698 54 25 548 49 33
Dormont Borough Dormont Borough 1128 87 59 585 43 28 543 44 31
Dormont Borough Dormont Borough 965 86 46 536 41 18 429 45 28
Dormont Borough Dormont Borough 1116 101 60 606 42 21 510 59 39
Dravosburg Borough Dravosburg Borough 976 159 87 545 89 42 431 70 45
Duquesne Duquesne 1331 126 78 806 84 50 525 42 28
Duquesne Duquesne 981 116 79 547 56 32 434 60 47
Duquesne Duquesne 834 82 53 479 51 34 355 31 19
East Deer Township East Deer Township 799 103 71 431 52 36 368 51 35
East McKeesport Borough East McKeesport Borough 1173 137 88 654 75 46 519 62 42
East Pittsburgh Borough East Pittsburgh Borough 1171 112 69 654 63 34 517 49 35
Edgewood Borough Edgewood Borough 812 60 35 443 28 15 369 32 20
Edgewood Borough Edgewood Borough 988 68 42 541 40 24 447 28 18
Edgeworth Borough Edgeworth Borough 1003 76 36 547 36 15 456 40 21
Elizabeth Borough Elizabeth Borough 822 95 60 462 54 34 360 41 26
Elizabeth Tosnwhip Elizabeth Tosnwhip 1870 193 97 1014 117 53 856 76 44
Elizabeth Tosnwhip Elizabeth Tosnwhip 2624 350 193 1403 184 90 1221 166 103
Elizabeth Tosnwhip Elizabeth Tosnwhip 3294 403 206 1785 209 96 1509 194 110
Emsworth Borough Emsworth Borough 1549 149 104 831 73 48 718 76 56
Etna Borough Etna Borough 2028 185 118 1107 92 55 921 93 63
Fawn Township Fawn Township 1451 214 140 727 102 65 724 112 75
Findlay Township Findlay Township 2317 203 112 1257 107 53 1060 96 59
Forest Hills Borough Forest Hills Borough 2244 262 127 1293 162 70 951 100 57
Forward Township Forward Township 988 111 68 537 55 34 451 56 34
Fox Chapel Borough Fox Chapel Borough 3694 193 119 1867 76 41 1827 117 78
Franklin Park Borough Franklin Park Borough 4813 291 163 2496 129 68 2317 162 95
Franklin Park Borough Franklin Park Borough 3133 216 115 1609 104 47 1524 112 68
Frazer Township Frazer Township 702 90 42 359 48 22 343 42 20
Glassport Borough Glassport Borough 906 121 61 513 75 32 393 46 29
Glassport Borough Glassport Borough 1587 221 119 893 125 68 694 96 51
Green Tree Borough Green Tree Borough 2782 305 153 1513 158 69 1269 147 84
Hampton Township Hampton Township 3298 256 153 1742 123 83 1556 133 70
Hampton Township Hampton Township 4381 391 237 2340 198 115 2041 193 122
Hampton Township Hampton Township 3452 278 157 1786 138 75 1666 140 82
Harmar Township Harmar Township 1681 222 113 933 130 60 748 92 53
Harrison Township Harrison Township 2937 399 204 1636 218 107 1301 181 97
Harrison Township Harrison Township 1584 199 104 900 120 63 684 79 41
Harrison Township Harrison Township 1760 228 127 958 129 69 802 99 58
Hays Hazelwood Hays Hazelwood 1115 124 84 633 72 48 482 52 36
Heidelberg Borough Heidelberg Borough 574 59 31 311 32 18 263 27 13
Homestead Borough Homestead Borough 1734 258 155 1015 157 102 719 101 53
Indiana Township Indiana Township 2708 202 120 1371 93 59 1337 109 61
Indiana Township Indiana Township 1640 136 84 836 68 39 804 68 45
Ingram Borough Ingram Borough 1778 177 113 973 97 63 805 80 50
Jefferson Hills Jefferson Hills 4142 334 171 2207 160 70 1935 174 101
Jefferson Hills Jefferson Hills 1178 145 79 639 84 43 539 61 36
Kennedy Township Kennedy Township 2715 332 184 1493 173 81 1222 159 103
Kennedy Township Kennedy Township 2087 265 144 1121 142 69 966 123 75
Leet Township Leet Township 657 46 27 354 25 13 303 21 14
Leetsdale Borough Leetsdale Borough 627 70 38 360 42 20 267 28 18
Liberty Borough Liberty Borough 1492 200 115 814 100 52 678 100 63
Lincoln Borough Lincoln Borough 531 63 34 290 29 16 241 34 18
Marshall Township Marshall Township 3152 185 104 1657 88 47 1495 97 57
McCandless McCandless 3712 294 183 1969 159 83 1743 135 100
McCandless McCandless 2061 192 108 1080 98 46 981 94 62
McCandless McCandless 1564 138 79 858 84 48 706 54 31
McCandless McCandless 2790 312 156 1487 161 66 1303 151 90
McCandless McCandless 2733 258 145 1451 120 61 1282 138 84
McCandless McCandless 3204 386 196 1740 215 103 1464 171 93
McKees Rocks Borough McKees Rocks Borough 1492 171 120 836 93 62 656 78 58
McKees Rocks Borough McKees Rocks Borough 2063 170 113 1203 103 72 860 67 41
McKeesport McKeesport 863 108 70 475 55 33 388 53 37
McKeesport McKeesport 1777 240 156 1041 143 89 736 97 67
McKeesport McKeesport 1431 201 113 798 111 47 633 90 66
McKeesport McKeesport 778 104 70 452 69 48 326 35 22
McKeesport McKeesport 1626 188 127 938 105 70 688 83 57
McKeesport McKeesport 915 119 65 541 75 38 374 44 27
McKeesport McKeesport 643 61 36 350 32 18 293 29 18
McKeesport McKeesport 1301 152 100 732 87 51 569 65 49
McKeesport McKeesport 1782 240 158 983 133 86 799 107 72
Millvale Borough Millvale Borough 2033 213 123 1114 107 55 919 106 68
Monroeville Monroeville 2715 321 193 1475 159 91 1240 162 102
Monroeville Monroeville 2269 268 151 1239 140 66 1030 128 85
Monroeville Monroeville 2187 307 175 1252 178 100 935 129 75
Monroeville Monroeville 2287 250 148 1267 151 80 1020 99 68
Monroeville Monroeville 1540 239 136 862 132 65 678 107 71
Monroeville Monroeville 2428 249 138 1272 118 69 1156 131 69
Monroeville Monroeville 2483 325 172 1334 162 74 1149 163 98
Moon Township Moon Township 1956 173 100 1060 98 47 896 75 53
Moon Township Moon Township 2028 211 118 1053 98 55 975 113 63
Moon Township Moon Township 1919 121 75 1012 59 34 907 62 41
Moon Township Moon Township 1826 190 122 970 99 62 856 91 60
Moon Township Moon Township 4079 392 244 2155 194 109 1924 198 135
Mt Lebanon Mt Lebanon 2791 216 101 1500 116 49 1291 100 52
Mt Lebanon Mt Lebanon 1831 153 78 1042 84 35 789 69 43
Mt Lebanon Mt Lebanon 3433 341 145 1907 206 75 1526 135 70
Mt Lebanon Mt Lebanon 2135 134 71 1113 64 31 1022 70 40
Mt Lebanon Mt Lebanon 1913 168 80 1025 92 39 888 76 41
Mt Lebanon Mt Lebanon 2173 119 62 1136 56 25 1037 63 37
Mt Lebanon Mt Lebanon 2266 228 80 1219 135 35 1047 93 45
Mt Lebanon Mt Lebanon 2689 297 127 1486 171 64 1203 126 63
Mt Oliver Borough Mt Oliver Borough 2078 188 116 1140 116 71 938 72 45
Munhall Borough Munhall Borough 1893 183 91 1026 96 44 867 87 47
Munhall Borough Munhall Borough 3482 427 250 1910 239 132 1572 188 118
Munhall Borough Munhall Borough 1181 148 80 675 89 48 506 59 32
Neville Township Neville Township 504 74 38 272 38 18 232 36 20
North Braddock Borough North Braddock Borough 1180 170 98 654 87 43 526 83 55
North Braddock Borough North Braddock Borough 746 85 49 419 48 27 327 37 22
North Braddock Borough North Braddock Borough 679 81 53 391 53 33 288 28 20
North Fayette Township North Fayette Township 1008 107 77 517 60 37 491 47 40
North Fayette Township North Fayette Township 3169 277 173 1719 128 79 1450 149 94
North Versailles Township North Versailles Township 2669 364 249 1516 217 140 1153 147 109
O'Hara Township O'Hara Township 3032 256 133 1608 134 59 1424 122 74
O'Hara Township O'Hara Township 3048 219 129 1596 94 51 1452 125 78
Oakdale Borough Oakdale Borough 888 118 65 466 57 29 422 61 36
Oakmont Borough Oakmont Borough 1209 99 45 680 49 20 529 50 25
Oakmont Borough Oakmont Borough 1224 171 86 735 112 50 489 59 36
Oakmont Borough Oakmont Borough 1333 174 80 745 104 37 588 70 43
Ohio Township Ohio Township 3272 228 139 1707 109 57 1565 119 82
Penn Hills Penn Hills 2231 328 176 1329 198 102 902 130 74
Penn Hills Penn Hills 2298 282 165 1324 163 97 974 119 68
Penn Hills Penn Hills 2252 279 141 1249 153 70 1003 126 71
Penn Hills Penn Hills 2783 383 198 1623 215 109 1160 168 89
Penn Hills Penn Hills 2517 334 188 1400 167 87 1117 167 101
Penn Hills Penn Hills 807 119 60 468 68 34 339 51 26
Penn Hills Penn Hills 2732 416 235 1525 236 124 1207 180 111
Penn Hills Penn Hills 2495 319 183 1382 169 87 1113 150 96
Penn Hills Penn Hills 3025 405 242 1716 214 120 1309 191 122
Penn Hills Penn Hills 2820 391 195 1557 215 99 1263 176 96
Pennsbury Village Pennsbury Village 363 29 21 223 17 14 140 12 7
Pine Township Pine Township 6835 378 221 3495 193 93 3340 185 128
Pitcairn Borough Pitcairn Borough 1869 202 130 1022 109 68 847 93 62
Stanton Heights Pittsburgh 1301 198 113 750 115 58 551 83 55
Upper Lawrenceville Pittsburgh 1170 112 70 653 65 38 517 47 32
Morningside Pittsburgh 1960 202 121 1081 106 61 879 96 60
Garfield Pittsburgh 633 52 33 370 35 23 263 17 10
Garfield Pittsburgh 844 87 58 501 52 38 343 35 20
Stanton Heights Pittsburgh 1589 195 119 894 108 72 695 87 47
Bluff Pittsburgh 614 38 34 276 21 19 338 17 15
Highland Park Pittsburgh 2160 160 95 1194 78 47 966 82 48
Highland Park Pittsburgh 1576 98 64 869 58 36 707 40 28
East Liberty Pittsburgh 1339 109 69 784 61 35 555 48 34
Garfield Pittsburgh 749 55 36 406 41 26 343 14 10
East Liberty Pittsburgh 1764 204 124 1056 137 82 708 67 42
Lincoln�Lemington�Belmar Pittsburgh 894 95 63 544 62 40 350 33 23
Larimer Pittsburgh 441 46 27 254 27 16 187 19 11
Homewood West Pittsburgh 417 53 30 242 37 17 175 16 13
Larimer Pittsburgh 396 51 24 236 37 17 160 14 7
Homewood North Pittsburgh 1148 109 65 712 68 34 436 41 31
Homewood North Pittsburgh 662 86 52 413 59 37 249 27 15
Homewood South Pittsburgh 750 88 49 443 57 29 307 31 20
Homewood South Pittsburgh 631 70 40 375 43 26 256 27 14
East Hills Pittsburgh 2040 200 120 1238 125 72 802 75 48
Squirrel Hill North Pittsburgh 1490 86 44 777 37 14 713 49 30
Squirrel Hill North Pittsburgh 1011 45 22 517 20 12 494 25 10
Squirrel Hill North Pittsburgh 2072 133 60 1097 72 30 975 61 30
Point Breeze Pittsburgh 1572 68 40 813 33 19 759 35 21
Point Breeze North Pittsburgh 992 99 56 562 53 28 430 46 28
Point Breeze Pittsburgh 1959 126 70 1059 71 33 900 55 37
Squirrel Hill South Pittsburgh 2887 175 92 1491 80 41 1396 95 51
Regent Square Pittsburgh 608 43 22 337 24 11 271 19 11
Swisshelm Park Pittsburgh 879 84 52 464 42 25 415 42 27
Squirrel Hill South Pittsburgh 2472 210 77 1312 111 35 1160 99 42
Squirrel Hill South Pittsburgh 3333 284 139 1746 148 57 1587 136 82
Greenfield Pittsburgh 1463 147 84 784 72 40 679 75 44
Greenfield Pittsburgh 2820 276 167 1521 158 93 1299 118 74
South Side Slopes Pittsburgh 1218 102 64 636 60 31 582 42 33
South Side Flats Pittsburgh 1004 120 65 543 75 35 461 45 30
South Side Flats Pittsburgh 1408 115 58 713 69 32 695 46 26
South Side Slopes Pittsburgh 798 69 43 412 39 23 386 30 20
Allentown Pittsburgh 1313 111 80 765 75 52 548 36 28
Mount Washington Pittsburgh 1037 121 69 561 69 41 476 52 28
Mount Washington Pittsburgh 900 82 49 514 44 23 386 38 26
Duquesne Heights Pittsburgh 1224 128 64 657 60 25 567 68 39
Mount Washington Pittsburgh 1223 143 85 660 81 43 563 62 42
Mount Washington Pittsburgh 994 102 77 529 52 40 465 50 37
Beechview Pittsburgh 2283 227 160 1206 119 85 1077 108 75
Brookline Pittsburgh 1937 195 119 1059 115 69 878 80 50
Brookline Pittsburgh 3111 322 191 1744 180 107 1367 142 84
Brookline Pittsburgh 1207 84 43 658 47 22 549 37 21
Beechview Pittsburgh 1937 216 131 1034 117 70 903 99 61
Central Business District Pittsburgh 5438 330 210 2759 172 98 2679 158 112
Sheraden Pittsburgh 1512 166 106 846 99 56 666 67 50
Banksville Pittsburgh 2099 259 140 1151 149 66 948 110 74
Strip District Pittsburgh 382 17 7 191 9 2 191 8 5
Manchester Pittsburgh 1108 146 94 644 89 62 464 57 32
Central Northside Pittsburgh 789 68 51 394 35 25 395 33 26
Troy Hill Pittsburgh 1433 141 84 719 69 37 714 72 47
Spring Garden Pittsburgh 515 69 47 279 36 28 236 33 19
Central Northside Pittsburgh 642 45 28 335 27 16 307 18 12
California-Kirkbride Pittsburgh 441 31 21 263 17 12 178 14 9
Fineview Pittsburgh 758 67 46 462 36 24 296 31 22
Perry North Pittsburgh 1225 108 73 657 56 35 568 52 38
Perry North Pittsburgh 992 95 61 535 59 34 457 36 27
Northview Heights Pittsburgh 1191 66 38 694 42 22 497 24 16
Summer Hill Pittsburgh 648 88 49 344 50 28 304 38 21
Perry South Pittsburgh 1361 154 91 777 106 56 584 48 35
Perry South Pittsburgh 833 88 60 483 53 34 350 35 26
Spring Hill�City View Pittsburgh 1381 171 95 803 90 47 578 81 48
Brighton Heights Pittsburgh 1406 151 90 805 89 46 601 62 44
Brighton Heights Pittsburgh 1004 91 53 556 53 29 448 38 24
Marshall-Shadeland Pittsburgh 629 66 44 348 43 30 281 23 14
Brighton Heights Pittsburgh 1653 227 111 925 127 57 728 100 54
Marshall-Shadeland Pittsburgh 1853 186 116 1026 99 63 827 87 53
Crafton Heights Pittsburgh 1606 139 88 915 84 42 691 55 46
Crafton Heights Pittsburgh 796 96 60 446 52 32 350 44 28
Carrick Pittsburgh 1311 120 77 708 61 39 603 59 38
Carrick Pittsburgh 2580 267 152 1421 158 80 1159 109 72
Carrick Pittsburgh 2404 226 143 1350 118 78 1054 108 65
Knoxville Pittsburgh 2190 248 158 1268 158 98 922 90 60
Crawford-Roberts Pittsburgh 1132 171 121 706 123 85 426 48 36
Lincoln Place Pittsburgh 2019 259 148 1075 121 61 944 138 87
New Homestead Pittsburgh 636 72 39 336 40 21 300 32 18
Overbrook Pittsburgh 1145 136 80 614 78 38 531 58 42
Brookline Pittsburgh 1396 126 73 755 59 34 641 67 39
Overbrook Pittsburgh 898 109 72 476 56 35 422 53 37
West Oakland Pittsburgh 639 64 40 368 43 25 271 21 15
Central Oakland Pittsburgh 302 31 15 164 17 3 138 14 12
Central Oakland Pittsburgh 263 34 14 128 16 3 135 18 11
South Oakland Pittsburgh 837 101 68 450 55 42 387 46 26
Middle Hill Pittsburgh 982 118 76 584 74 46 398 44 30
Upper Hill Pittsburgh 1021 142 76 590 95 52 431 47 24
Bedford Dwellings Pittsburgh 832 76 58 525 50 40 307 26 18
Terrace Village Pittsburgh 702 86 62 426 61 46 276 25 16
Terrace Village Pittsburgh 74 7 6 47 5 4 27 2 2
Arlington Pittsburgh 1197 106 74 669 66 42 528 40 32
Saint Clair Pittsburgh 424 38 31 236 23 20 188 15 11
Lincoln�Lemington�Belmar Pittsburgh 1159 180 110 708 119 74 451 61 36
North Oakland Pittsburgh 1020 115 69 543 64 32 477 51 37
Glen Hazel Pittsburgh 1719 241 160 1000 160 108 719 81 52
Beltzhoover Pittsburgh 1520 183 100 848 105 62 672 78 38
Sheraden Pittsburgh 1660 147 104 939 85 58 721 62 46
Elliott Pittsburgh 1464 154 98 796 82 49 668 72 49
Allegheny Center Pittsburgh 729 72 37 397 46 24 332 26 13
East Carnegie Pittsburgh 781 111 66 415 50 32 366 61 34
Fairywood Pittsburgh 1469 171 104 849 94 57 620 77 47
Westwood Pittsburgh 2032 214 128 1066 121 68 966 93 60
East Allegheny Pittsburgh 1006 130 84 541 67 43 465 63 41
Lower Lawrenceville Pittsburgh 1426 168 74 727 85 42 699 83 32
Polish Hill Pittsburgh 676 71 34 370 27 14 306 44 20
Shadyside Pittsburgh 945 47 17 491 27 10 454 20 7
Shadyside Pittsburgh 1117 37 17 580 22 7 537 15 10
Shadyside Pittsburgh 1031 57 28 592 35 16 439 22 12
Shadyside Pittsburgh 895 34 16 497 15 5 398 19 11
Shadyside Pittsburgh 1910 112 49 1021 50 20 889 62 29
Bloomfield Pittsburgh 838 108 58 469 75 39 369 33 19
Bloomfield Pittsburgh 605 55 24 310 29 11 295 26 13
Bloomfield Pittsburgh 1043 65 32 543 36 16 500 29 16
Friendship Pittsburgh 698 35 20 379 17 9 319 18 11
Bloomfield Pittsburgh 914 84 54 484 54 33 430 30 21
Central Lawrenceville Pittsburgh 924 75 40 494 42 20 430 33 20
Central Lawrenceville Pittsburgh 1404 165 93 808 90 50 596 75 43
Bloomfield Pittsburgh 811 92 59 441 47 26 370 45 33
Highland Park Pittsburgh 5 0 0 4 0 0 0 0 0
Southshore Pittsburgh 22 5 5 10 0 0 12 4 4
Pleasant Hills Borough Pleasant Hills Borough 2698 377 183 1493 216 99 1205 161 84
Pleasant Hills Borough Pleasant Hills Borough 2300 222 103 1204 118 46 1096 104 57
Plum Borough Plum Borough 2307 260 141 1242 151 74 1065 109 67
Plum Borough Plum Borough 1183 125 57 607 65 31 576 60 26
Plum Borough Plum Borough 2263 276 141 1178 152 81 1085 124 60
Plum Borough Plum Borough 2771 279 162 1498 133 65 1273 146 97
Plum Borough Plum Borough 2421 292 170 1278 153 85 1143 139 85
Plum Borough Plum Borough 2658 263 153 1418 133 64 1240 130 89
Port Vue Borough Port Vue Borough 2026 224 132 1144 116 65 882 108 67
Rankin Borough Rankin Borough 1171 110 67 694 68 42 477 42 25
Reserve Township Reserve Township 773 100 56 409 40 22 364 60 34
Reserve Township Reserve Township 1390 157 91 733 72 44 657 85 47
Richland Township Richland Township 3147 309 157 1682 183 85 1465 126 72
Richland Township Richland Township 3811 264 177 1993 135 88 1818 129 89
Robinson Township Robinson Township 1063 107 63 560 57 32 503 50 31
Robinson Township Robinson Township 3291 297 167 1754 156 81 1537 141 86
Robinson Township Robinson Township 3176 334 186 1678 175 103 1498 159 83
Ross Township Ross Township 1400 158 87 773 87 48 627 71 39
Ross Township Ross Township 2409 269 128 1275 148 63 1134 121 65
Ross Township Ross Township 2893 279 155 1587 138 64 1306 141 91
Ross Township Ross Township 3339 448 247 1849 250 119 1490 198 128
Ross Township Ross Township 2367 240 116 1281 124 56 1086 116 60
Ross Township Ross Township 2383 300 169 1323 170 83 1060 130 86
Ross Township Ross Township 1885 197 116 1060 116 64 825 81 52
Ross Township Ross Township 1389 178 107 741 89 52 648 89 55
Scott Township Scott Township 2264 359 151 1293 203 76 971 156 75
Scott Township Scott Township 1758 206 97 978 102 46 780 104 51
Scott Township Scott Township 1434 118 72 795 61 36 639 57 36
Scott Township Scott Township 1767 215 103 977 118 44 790 97 59
Scott Township Scott Township 1520 187 117 834 92 54 686 95 63
Sewickley Borough Sewickley Borough 1995 162 87 1117 89 42 878 73 45
Sewickley Hills Borough Sewickley Hills Borough 850 49 20 438 22 5 412 27 15
Shaler Township Shaler Township 3861 396 234 2097 202 105 1764 194 129
Shaler Township Shaler Township 2704 295 176 1486 177 105 1218 118 71
Shaler Township Shaler Township 1355 162 96 750 76 40 605 86 56
Shaler Township Shaler Township 3383 340 204 1777 168 101 1606 172 103
Shaler Township Shaler Township 3615 348 204 1941 170 101 1674 178 103
Shaler Township Shaler Township 3146 312 201 1738 176 119 1408 136 82
Sharpsburg Borough Sharpsburg Borough 1959 219 135 1069 128 78 890 91 57
South Fayette Township South Fayette Township 1175 78 55 640 36 26 535 42 29
South Fayette Township South Fayette Township 2407 204 120 1282 102 57 1125 102 63
South Fayette Township South Fayette Township 2593 317 142 1464 189 73 1129 128 69
South Park Township South Park Township 2761 329 174 1498 169 94 1263 160 80
South Park Township South Park Township 2165 221 113 1121 112 56 1044 109 57
South Park Township South Park Township 3089 283 152 1634 135 67 1455 148 85
Springdale Borough Springdale Borough 1196 137 83 646 70 39 550 67 44
Springdale Borough Springdale Borough 718 85 57 373 49 33 345 36 24
Springdale Township Springdale Township 919 131 76 502 70 41 417 61 35
Stowe Township Stowe Township 1576 167 105 870 93 60 706 74 45
Stowe Township Stowe Township 2081 201 133 1163 119 75 918 82 58
Swissvale Borough Swissvale Borough 1439 149 92 842 87 51 597 62 41
Swissvale Borough Swissvale Borough 1129 118 77 673 71 47 456 47 30
Swissvale Borough Swissvale Borough 1040 117 72 644 82 49 396 35 23
Swissvale Borough Swissvale Borough 1260 102 56 761 66 30 499 36 26
Tarentum Borough Tarentum Borough 2444 320 177 1356 185 108 1088 135 69
Turtle Creek Borough Turtle Creek Borough 2921 344 187 1714 204 103 1207 140 84
Upper St Clair Township Upper St Clair Township 2435 179 95 1263 86 42 1172 93 53
Upper St Clair Township Upper St Clair Township 2228 180 78 1154 97 36 1074 83 42
Upper St Clair Township Upper St Clair Township 1556 105 64 813 45 21 743 60 43
Upper St Clair Township Upper St Clair Township 2943 317 115 1528 169 47 1415 148 68
Upper St Clair Township Upper St Clair Township 2868 209 129 1470 83 45 1398 126 84
Verona Borough Verona Borough 1525 154 88 822 78 40 703 76 48
Versailles Borough Versailles Borough 794 132 80 434 75 43 360 57 37
West Deer Township West Deer Township 3073 327 190 1637 175 104 1436 152 86
West Deer Township West Deer Township 3785 377 226 2042 188 106 1743 189 120
West Homestead Borough West Homestead Borough 1156 177 89 621 101 44 535 76 45
West Mifflin Borough West Mifflin Borough 1817 204 124 949 115 66 868 89 58
West Mifflin Borough West Mifflin Borough 2282 247 122 1311 139 60 971 108 62
West Mifflin Borough West Mifflin Borough 1468 185 94 814 101 52 654 84 42
West Mifflin Borough West Mifflin Borough 2939 348 177 1696 206 96 1243 142 81
West Mifflin Borough West Mifflin Borough 1629 184 97 877 85 39 752 99 58
West Mifflin Borough West Mifflin Borough 2964 318 182 1681 159 90 1283 159 92
West View Borough West View Borough 1147 98 68 636 52 34 511 46 34
West View Borough West View Borough 2656 284 163 1480 159 93 1176 125 70
Whitaker Borough Whitaker Borough 658 68 39 377 41 20 281 27 19
White Oak Borough White Oak Borough 3541 522 282 1991 321 160 1550 201 122
White Oak Borough White Oak Borough 1080 156 89 591 86 48 489 70 41
Whitehall Borough Whitehall Borough 2167 253 125 1189 134 61 978 119 64
Whitehall Borough Whitehall Borough 2707 376 174 1516 215 89 1191 161 85
Whitehall Borough Whitehall Borough 3665 336 184 1912 170 86 1753 166 98
Wilkins Township Wilkins Township 1821 270 144 1011 138 64 810 132 80
Wilkins Township Wilkins Township 1819 248 132 1033 155 83 786 93 49
Wilkinsburg Borough Wilkinsburg Borough 569 65 32 334 46 23 235 19 9
Wilkinsburg Borough Wilkinsburg Borough 1127 73 41 635 41 21 492 32 20
Wilkinsburg Borough Wilkinsburg Borough 476 59 39 276 40 28 200 19 11
Wilkinsburg Borough Wilkinsburg Borough 635 66 44 370 35 23 265 31 21
Wilkinsburg Borough Wilkinsburg Borough 450 52 31 263 29 17 187 23 14
Wilkinsburg Borough Wilkinsburg Borough 591 73 46 339 44 26 252 29 20
Wilkinsburg Borough Wilkinsburg Borough 2227 318 186 1347 195 116 880 123 70
Wilkinsburg Borough Wilkinsburg Borough 1400 198 111 822 117 59 578 81 52
Wilmerding Borough Wilmerding Borough 1115 118 73 660 76 45 455 42 28
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>D3 Example</title>
<script src="//cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/d3-legend/1.1.0/d3-legend.js"></script>
<link href='https://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
<style>
.axis text {
font-family: 'Open Sans', sans-serif;
font-size: 19pt;
}
.axis .label {
font-size: 20pt;
}
.axis path, .axis line {
fill: none;
stroke: #000;
shape-rendering: crispEdges;
}
.color-legend text {
font-family: 'Open Sans', sans-serif;
font-size: 19pt;
}
</style>
</head>
<body>
<script>
var outerWidth = 960;
var outerHeight = 500;
var margin = { left: 90, top: 8, right: 30, bottom: 66 };
var barPadding = 0.2;
var xColumn = "CityTown";
var yColumn = "TotalEnrolled";
var colorColumn = "TotalDiagnosedMedicated";
var layerColumn = "TotalDiagnosed";
var innerWidth = outerWidth - margin.left - margin.right;
var innerHeight = outerHeight - margin.top - margin.bottom;
var svg = d3.select("body").append("svg")
.attr("width", outerWidth)
.attr("height", outerHeight);
var g = svg.append("g")
.attr("transform", "translate(" + margin.left + "," + margin.top + ")");
var xAxisG = g.append("g")
.attr("class", "x axis")
.attr("transform", "translate(0," + innerHeight + ")");
var yAxisG = g.append("g")
.attr("class", "y axis");
var colorLegendG = g.append("g")
.attr("class", "color-legend")
.attr("transform", "translate(596, 0)");
var xScale = d3.scale.ordinal().rangeBands([0, innerWidth], barPadding);
var yScale = d3.scale.linear().range([innerHeight, 0]);
var colorScale = d3.scale.category10();
var xAxis = d3.svg.axis().scale(xScale).orient("bottom")
.outerTickSize(0);
var yAxis = d3.svg.axis().scale(yScale).orient("left")
.ticks(5)
.tickFormat(d3.format("s"))
.outerTickSize(0);
var colorLegend = d3.legend.color()
.scale(colorScale)
.shapePadding(6.24)
.shapeWidth(25)
.shapeHeight(25)
.labelOffset(5);
function render(data){
var nested = d3.nest()
.key(function (d){ return d[layerColumn]; })
.entries(data)
var stack = d3.layout.stack()
.y(function (d){ return d[yColumn]; })
.values(function (d){ return d.values; });
var layers = stack(nested);
xScale.domain(layers[0].values.map(function (d){
return d[xColumn];
}));
yScale.domain([
0,
d3.max(layers, function (layer){
return d3.max(layer.values, function (d){
return d.y;
});
})
]);
colorScale.domain(layers.map(function (layer){
return layer.key;
}));
xAxisG.call(xAxis);
yAxisG.call(yAxis);
var layers = g.selectAll(".layer").data(layers);
layers.enter().append("g").attr("class", "layer");
layers.exit().remove();
layers.style("fill", function (d){
return colorScale(d.key);
});
var bars = layers.selectAll("rect").data(function (d){
return d.values;
});
var barWidth = xScale.rangeBand() / colorScale.domain().length;
bars.enter().append("rect")
bars.exit().remove();
bars
.attr("x", function (d, i, j){
return xScale(d[xColumn]) + barWidth * j;
})
.attr("y", function (d){ return yScale(d.y); })
.attr("width", barWidth)
.attr("height", function (d){ return innerHeight - yScale(d.y); })
colorLegendG.call(colorLegend)
.selectAll("text")
.attr("y", 4);
}
function type(d){
//d.population = +d.population;
d.TotalEnrolled=+d.TotalEnrolled;
d.TotalDiagnosed=+d.TotalDiagnosed;
d.TotalDiagnosedMedicated=+d.TotalDiagnosedMedicated;
return d;
}
d3.csv("diabetes2015Label.csv", type, render);
</script>
</body>
</html>
country religion population
China Christian 68410000
China Muslim 24690000
China Unaffiliated 700680000
China Hindu 20000
China Buddhist 244130000
China Folk Religions 294320000
China Other Religions 9080000
China Jewish 0
India Christian 31130000
India Muslim 176190000
India Unaffiliated 870000
India Hindu 973750000
India Buddhist 9250000
India Folk Religions 5840000
India Other Religions 27560000
India Jewish 10000
USA Christian 243060000
USA Muslim 2770000
USA Unaffiliated 50980000
USA Hindu 1790000
USA Buddhist 3570000
USA Folk Religions 630000
USA Other Religions 1900000
USA Jewish 5690000
Indonesia Christian 23660000
Indonesia Muslim 209120000
Indonesia Unaffiliated 240000
Indonesia Hindu 4050000
Indonesia Buddhist 1720000
Indonesia Folk Religions 750000
Indonesia Other Religions 340000
Indonesia Jewish 0
Brazil Christian 173300000
Brazil Muslim 40000
Brazil Unaffiliated 15410000
Brazil Hindu 0
Brazil Buddhist 250000
Brazil Folk Religions 5540000
Brazil Other Religions 300000
Brazil Jewish 110000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment