UMKC Center for Health Insights
Earl F Glynn
2013-12-12. Last modified 2015-01-04.
https://data.kcmo.org/311/KCMOPS311-Data/7at3-sxhp
2015-01-03
The current dataset has 819903 data rows by 34 columns. (Most data rows spill onto several lines in the orignal file.)
There are 819903 unique CASE.IDs.
Reports by Source:
table(d$SOURCE)
##
## BIZ CMO CTI EDC EIP EMAIL FAX INSPE MAIL PHONE SPNSH SYS TWIR VOICE WALK WEB
## 5 49 19 194 260 29370 1413 11919 210 684456 23 18137 1206 6044 1647 64951
Reports by Source and Creation Year:
table(d$SOURCE, d$CreationYear)
##
## 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015
## BIZ 0 0 0 0 1 1 2 0 1 0
## CMO 0 0 0 0 0 0 39 1 9 0
## CTI 0 4 3 1 2 9 0 0 0 0
## EDC 0 0 0 0 0 0 53 91 50 0
## EIP 0 129 16 4 23 17 51 18 2 0
## EMAIL 0 1762 4181 4883 3538 3164 4274 3981 3569 18
## FAX 0 297 248 214 420 78 125 22 9 0
## INSPE 0 3192 7661 362 330 183 134 44 13 0
## MAIL 0 0 0 0 44 30 95 27 14 0
## PHONE 1 77003 120595 107601 89751 78886 71546 71904 66795 374
## SPNSH 0 0 0 0 0 0 0 18 5 0
## SYS 0 0 0 498 5490 3886 3166 2669 2428 0
## TWIR 0 0 0 0 0 0 0 507 695 4
## VOICE 0 210 1037 1201 2786 765 43 2 0 0
## WALK 0 7 225 280 342 182 287 209 115 0
## WEB 0 604 4178 4441 7957 9459 11177 13503 13536 96
Reports by City Department:
table(d$DEPARTMENT)
##
## Aviation City Managers Office City Planning and Development
## 87 7103 6097
## Convention and Entertainment Center Fire General Service
## 30 312 252
## Health Housing Community Dev Information Technology
## 14014 342 19
## IT KCPD NCS
## 1 16033 301820
## Parks & Rec Parks & Recreation Public Works
## 40589 11 319426
## Water Services
## 113767
Reports by City Department by Creation Year:
table(d$DEPARTMENT, d$CreationYear)
##
## 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015
## Aviation 0 14 21 7 8 11 8 11 7 0
## City Managers Office 0 994 976 1075 1040 906 749 825 538 0
## City Planning and Development 0 708 939 745 934 748 685 647 690 1
## Convention and Entertainment Center 0 13 7 0 3 0 3 2 2 0
## Fire 0 33 31 37 40 46 41 46 38 0
## General Service 0 0 28 127 21 14 10 17 35 0
## Health 0 882 1431 1456 1904 2007 2156 2172 2001 5
## Housing Community Dev 0 0 0 116 145 64 17 0 0 0
## Information Technology 0 1 0 14 2 2 0 0 0 0
## IT 0 0 0 0 1 0 0 0 0 0
## KCPD 0 1407 2795 2619 2375 1857 1672 1671 1630 7
## NCS 1 34820 46203 36479 41901 35340 38218 34981 33779 98
## Parks & Rec 0 4928 6674 4375 4509 4358 4169 5966 5606 4
## Parks & Recreation 0 0 0 11 0 0 0 0 0 0
## Public Works 0 34779 68995 57159 39048 33125 25416 31263 29324 317
## Water Services 0 4629 10044 15265 18753 18182 17848 15395 13591 60
Reports by Creation Year and Month:
table(d$CreationYear)
##
## 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015
## 1 83208 138144 119485 110684 96660 90992 92996 87241 492
table(d$CreationMonth)
##
## 1 2 3 4 5 6 7 8 9 10 11 12
## 72666 59670 66570 72299 83258 75082 72216 73131 66554 62946 52794 62717
table(d$CreationYear, d$CreationMonth)
##
## 1 2 3 4 5 6 7 8 9 10 11 12
## 2006 0 0 0 0 0 0 0 0 0 0 0 1
## 2007 4558 5821 6654 6018 7823 7472 6796 7576 7655 7695 6583 8557
## 2008 9437 8524 9228 11152 11764 11564 12817 12993 13958 12691 10674 13342
## 2009 10769 9671 10289 12589 15962 12065 9556 7739 7113 6748 6178 10806
## 2010 18585 6667 8890 9994 10999 10973 9957 8440 7602 6448 6114 6015
## 2011 8677 7274 9386 7873 9449 8784 7748 10105 8041 6881 6498 5944
## 2012 6154 5497 7430 9111 8662 7685 7835 10636 8442 7542 6079 5919
## 2013 6323 7967 7986 8377 9891 9775 8720 7673 7295 7334 5247 6408
## 2014 7671 8249 6707 7185 8708 6764 8787 7969 6448 7607 5421 5725
## 2015 492 0 0 0 0 0 0 0 0 0 0 0
Reports by Status:
table(d$STATUS)
##
## ASSIG CANC DUP HOLD OPEN RESOL RHOLD
## 39 11431 17 1 19623 788789 3
Reports by Status and Creation Year:
table(d$STATUS, d$CreationYear)
##
## 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015
## ASSIG 0 0 0 0 0 0 0 0 39 0
## CANC 0 815 2859 6955 234 55 61 151 299 2
## DUP 0 0 0 9 5 0 1 0 2 0
## HOLD 0 0 0 0 0 0 0 0 1 0
## OPEN 0 0 0 4 344 753 2294 3210 12549 469
## RESOL 1 82393 135285 112517 110101 95852 88636 89635 74348 21
## RHOLD 0 0 0 0 0 0 0 0 3 0
table(d$EXCEEDED.EST.TIMEFRAME)
##
## N Y
## 7 1 622279 197616
table(d$EXCEEDED.EST.TIMEFRAME, d$CreationYear)
##
## 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015
## 0 0 0 0 0 0 0 0 7 0
## 0 0 0 0 0 0 0 1 0 0
## N 1 68322 107655 92536 73141 72206 70606 68948 68376 488
## Y 0 14886 30489 26949 37543 24454 20386 24047 18858 4
Reports by Creation Year and Close Year
table(d$CreationYear, d$CloseYear)
##
## 2007 2008 2009 2010 2011 2012 2013 2014 2015
## 2006 1 0 0 0 0 0 0 0 0
## 2007 75940 5486 911 38 9 2 7 0 0
## 2008 0 117755 15912 1189 189 34 206 0 0
## 2009 0 0 102634 7374 1095 129 481 813 0
## 2010 0 0 0 92988 14417 1564 346 789 2
## 2011 0 0 0 0 86710 7049 742 1351 0
## 2012 0 0 0 0 0 80310 5843 2464 20
## 2013 0 0 0 0 0 0 83542 6088 11
## 2014 0 0 0 0 0 0 0 74157 193
## 2015 0 0 0 0 0 0 0 0 21
Histogram of Days To Close:
options(scipen=999) # suppress scientific notation
hist(d$DaysToClose, main="Days to Close", col="gray")
Since the histogram is skewed, introduce a log10 transformation:
hist(log10(1+d$DaysToClose), col="gray")
table(d$ZIP.CODE)
##
## 6152 63130 64012 64028 64030 64052 64053 64055 64068 64079 64082 64101 64102 64105 64106 64108 64109 64110 64111
## 8445 1 1 39 22 23 47 115 28 281 1 1 730 858 4449 15362 17451 25721 36080 24885
## 64112 64113 64114 64116 64117 64118 64119 64120 64123 64124 64125 64126 64127 64128 64129 64130 64131 64132 64133 64134
## 10162 17329 38287 14801 18540 20023 28367 4477 23377 24821 6228 12762 53081 41075 20764 74125 37225 40633 24496 41029
## 64136 64137 64138 64139 64145 64146 64147 64149 64151 64152 64153 64154 64155 64156 64157 64158 64160 64161 64163 64164
## 2621 14902 19770 2045 7381 2648 356 1008 21376 7707 4779 6897 19948 4327 12644 3130 71 888 584 212
## 64165 64166 64167 64444 66203
## 169 211 71 15 1
table(d$ZIP.CODE, d$CreationYear)
##
## 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015
## 0 1 20 36 221 295 1105 775 5992 0
## 6152 0 0 0 1 0 0 0 0 0 0
## 63130 0 0 1 0 0 0 0 0 0 0
## 64012 0 9 21 9 0 0 0 0 0 0
## 64028 0 2 18 2 0 0 0 0 0 0
## 64030 0 8 10 4 1 0 0 0 0 0
## 64052 0 19 23 4 0 0 1 0 0 0
## 64053 0 43 44 27 1 0 0 0 0 0
## 64055 0 13 14 1 0 0 0 0 0 0
## 64068 0 57 177 31 13 3 0 0 0 0
## 64079 0 0 0 0 0 1 0 0 0 0
## 64082 0 0 0 1 0 0 0 0 0 0
## 64101 0 41 123 86 89 85 101 120 85 0
## 64102 0 82 115 110 117 97 106 122 108 1
## 64105 0 385 704 550 554 508 536 644 568 0
## 64106 1 1379 2168 1977 2178 2173 2056 1932 1495 3
## 64108 0 1739 2474 2152 2380 2150 2102 2322 2122 10
## 64109 0 3012 4385 3758 3501 3025 3083 2613 2336 8
## 64110 0 4104 5826 5091 4724 4326 4273 4284 3446 6
## 64111 0 2755 3950 2984 3155 2944 3018 3181 2892 6
## 64112 0 1171 1541 1331 1237 1288 1152 1260 1179 3
## 64113 0 1614 2734 2508 2212 2159 1821 2407 1871 3
## 64114 0 3442 6390 5744 5258 4852 4090 4616 3876 19
## 64116 0 1416 2517 2384 2052 1703 1406 1714 1605 4
## 64117 0 1628 3092 2792 2590 2148 1747 2214 2327 2
## 64118 0 1947 3849 3536 2918 2043 1628 2047 2021 34
## 64119 0 2651 5652 4457 4275 3056 2475 2806 2952 43
## 64120 0 539 555 511 639 601 536 586 508 2
## 64123 0 2797 3848 3276 3057 2616 2863 2609 2292 19
## 64124 0 2939 4531 3517 2955 2972 2963 2595 2342 7
## 64125 0 758 937 983 777 692 733 733 610 5
## 64126 0 1331 2054 1902 1821 1663 1514 1328 1143 6
## 64127 0 5898 9242 7675 6856 6574 6676 5563 4577 20
## 64128 0 4139 6885 5942 5319 5403 4972 4378 4025 12
## 64129 0 2416 3284 2894 2590 2596 2596 2442 1939 7
## 64130 0 7710 11184 10876 10056 9490 8804 8840 7131 34
## 64131 0 3394 6047 5263 5355 4753 4088 4357 3939 29
## 64132 0 4095 7193 5889 5848 4586 4476 4635 3897 14
## 64133 0 2611 4141 3790 3298 2823 3009 2663 2156 5
## 64134 0 3860 7366 6369 5664 4403 4606 4838 3913 10
## 64136 0 282 367 374 394 369 317 298 220 0
## 64137 0 1383 2476 2331 2225 1760 1558 1743 1420 6
## 64138 0 1965 3200 3093 3020 2400 2038 2138 1909 7
## 64139 0 209 347 310 284 163 236 329 167 0
## 64145 0 733 1258 1136 1045 752 814 876 767 0
## 64146 0 272 403 415 369 354 300 275 260 0
## 64147 0 21 40 44 60 51 47 41 52 0
## 64149 0 114 105 132 194 122 144 94 103 0
## 64151 0 2081 4254 3469 3100 2256 1729 2149 2312 26
## 64152 0 798 1702 1326 922 827 639 688 788 17
## 64153 0 421 965 753 581 589 445 540 475 10
## 64154 0 628 1449 966 1058 690 656 706 735 9
## 64155 0 2013 4008 3295 2591 2098 1709 2095 2117 22
## 64156 0 412 773 629 687 464 331 492 518 21
## 64157 0 1370 2681 1905 1658 1215 1019 1346 1401 49
## 64158 0 266 569 564 416 301 286 336 382 10
## 64160 0 9 9 11 14 6 9 6 7 0
## 64161 0 80 142 106 134 108 76 131 111 0
## 64163 0 60 83 70 130 54 62 40 85 0
## 64164 0 25 64 27 28 16 21 9 22 0
## 64165 0 17 30 25 25 14 12 20 26 0
## 64166 0 33 63 26 29 23 6 15 15 1
## 64167 0 11 29 12 8 0 2 5 2 2
## 64444 0 0 12 3 0 0 0 0 0 0
## 66203 0 0 0 0 1 0 0 0 0 0
table(d$COUNCIL.DISTRICT)
##
## 1 2 3 4 5 6
## 35138 102711 74123 195210 134125 166163 112433
table(d$COUNCIL.DISTRICT, d$CreationYear)
##
## 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015
## 1 7640 12853 9792 1951 1432 1064 361 44 0
## 1 0 12939 22532 17953 13161 9584 7432 9236 9695 179
## 2 0 7953 16328 12725 10160 7465 5630 6790 7004 68
## 3 0 18420 28190 25287 27418 26043 26359 23525 19895 73
## 4 0 11843 18156 16366 18585 17617 17285 18205 16007 61
## 5 0 14911 23107 21680 23228 20445 20148 20110 22466 68
## 6 0 9502 16978 15682 16181 14074 13074 14769 12130 43
table(d$QUALITY.OF.SERVICE)
##
## 1 2 3 4 5
## 799217 2575 1049 1645 4158 11259
table(d$QUALITY.OF.SERVICE, d$CreationYear)
##
## 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015
## 1 83205 138118 119314 106971 91965 84365 87733 87053 492
## 1 0 0 8 36 571 602 694 606 58 0
## 2 0 1 0 15 217 246 302 252 16 0
## 3 0 0 3 16 333 395 492 392 14 0
## 4 0 2 4 37 701 939 1363 1089 23 0
## 5 0 0 11 67 1891 2513 3776 2924 77 0
table(d$TIMELINESS.OF..SERVICE)
##
## 1 2 3 4 5
## 799767 2235 1231 1980 4074 10616
table(d$TIMELINESS.OF..SERVICE, d$CreationYear)
##
## 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015
## 1 83205 138118 119314 106969 91992 84485 88018 87173 492
## 1 0 0 9 43 528 547 600 494 14 0
## 2 0 1 1 16 267 313 379 254 0 0
## 3 0 1 2 24 386 466 613 485 3 0
## 4 0 1 5 26 735 948 1340 1003 16 0
## 5 0 0 9 62 1799 2394 3575 2742 35 0
table(d$CUSTOMER.SERVICE)
##
## 1 2 3 4 5
## 799609 1203 712 1470 3919 12990
table(d$CUSTOMER.SERVICE, d$CreationYear)
##
## 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015
## 1 83205 138118 119314 106974 92003 84576 87870 87056 492
## 1 0 0 5 17 286 282 310 269 34 0
## 2 0 2 2 11 203 168 180 135 11 0
## 3 0 0 5 23 316 349 429 330 18 0
## 4 0 1 3 34 741 990 1173 945 32 0
## 5 0 0 11 86 2164 2868 4324 3447 90 0
Lists from remaining data fields are farily long, so they will be shown separately.
length(table(d$WORK.GROUP))
## [1] 126
length(table(d$REQUEST.TYPE))
## [1] 594
length(table(d$NEIGHBORHOOD))
## [1] 244
Includes extra variables from conversions.
str(d)
## 'data.frame': 819903 obs. of 34 variables:
## $ CASE.ID : chr "2011238783" "2008039007" "2007191119" "2007003108" ...
## $ SOURCE : chr "WEB" "PHONE" "PHONE" "PHONE" ...
## $ DEPARTMENT : chr "Aviation" "Aviation" "Aviation" "Aviation" ...
## $ WORK.GROUP : chr "Aviation--" "Aviation--" "Aviation--" "Aviation--" ...
## $ REQUEST.TYPE : chr "Aviation - All" "Aviation - All" "Aviation - All" "Aviation - All" ...
## $ CREATION.DATE : chr "12/31/2011" "02/20/2008" "12/24/2007" "01/23/2007" ...
## $ CREATION.MONTH : chr "12" "2" "12" "1" ...
## $ CREATION.YEAR : chr "2011" "2008" "2007" "2007" ...
## $ STATUS : chr "RESOL" "RESOL" "RESOL" "RESOL" ...
## $ EXCEEDED.EST.TIMEFRAME: chr "N" "N" "N" "N" ...
## $ CLOSED.DATE : chr "01/09/2012" "02/22/2008" "12/26/2007" "01/23/2007" ...
## $ CLOSED.MONTH : chr "1" "2" "12" "1" ...
## $ CLOSED.YEAR : chr "2012" "2008" "2007" "2007" ...
## $ DAYS.TO.CLOSE : chr "9" "2" "2" "0" ...
## $ STREET.ADDRESS : chr "970 N TEL AVIV AVE" "601 NW BRASILIA AVE" "992 NW MEXICO CITY AVE" "414 E 12TH ST" ...
## $ ADDRESS.WITH.GEOCODE : chr "970 TEL AVIV AVE\nKansas City, Missouri 64163\n(39.315115155000456, -94.71125970499969)" "601 BRASILIA AVE\nKansas City, Missouri 64028\n(39.30603268700048, -94.71640757099965)" "992 MEXICO CITY AVE\nKansas City, Missouri 64163\n(39.316876151000486, -94.71505998999965)" "414 12TH ST\nKansas City, Missouri 64106\n(39.099740099000485, -94.5776004439997)" ...
## $ ZIP.CODE : chr "64163" "64028" "64163" "64106" ...
## $ NEIGHBORHOOD : chr "KCI & 2nd Creek" " " " " " " ...
## $ COUNCIL.DISTRICT : chr "2" "2" "2" "" ...
## $ PARCEL.ID.NO : chr "229817" "171878" "171877" "0" ...
## $ XCOORDINATE : chr "2730659.4" "2717343.1" "2728965.8" "0" ...
## $ YCOORDINATE : chr "1146308.74" "1139555" "1150662" "0" ...
## $ QUALITY.OF.SERVICE : chr "3" "" "" "" ...
## $ TIMELINESS.OF..SERVICE: chr "3" "" "" "" ...
## $ CUSTOMER.SERVICE : chr "3" "" "" "" ...
## $ CreationDate : POSIXct, format: "2011-12-31" "2008-02-20" "2007-12-24" "2007-01-23" ...
## $ CreationMonth : int 12 2 12 1 5 1 9 3 7 1 ...
## $ CreationYear : int 2011 2008 2007 2007 2008 2011 2013 2008 2009 2007 ...
## $ CloseDate : POSIXct, format: "2012-01-09" "2008-02-22" "2007-12-26" "2007-01-23" ...
## $ CloseMonth : int 1 2 12 1 5 1 9 4 7 1 ...
## $ CloseYear : int 2012 2008 2007 2007 2008 2011 2013 2008 2009 2007 ...
## $ DaysToClose : int 9 2 2 0 1 1 0 1 15 0 ...
## $ XCoordinate : num 2730659 2717343 2728966 0 2717343 ...
## $ YCoordinate : num 1146309 1139555 1150662 0 1139555 ...