faisal_alswied_ crimes in chicago
TRANSCRIPT
-
8/18/2019 Faisal_Alswied_ Crimes in Chicago
1/14
Crimes in Chicago
By: Faisal Alswied
03/20/2015
Dr. Jonathan emmell
A!stract:
"n this #a#er " am $sing the City o% Chicago crime data to analy&e the association !etween the crimes and the locations. Also' a data set o% the socioeconomic indicators in Chicago
was $sed. (rinci#al com#onent analysis was $sed to analy&e the data. )here were two models*
the %irst model di+ided the crimes into three ty#es: +iolent crimes' non+iolent crimes andair#orts, crimes. )he second model di+ide the crimes into two ty#es: +iolent and non+iolent and
their association to the socioeconomic indicators.
-
8/18/2019 Faisal_Alswied_ Crimes in Chicago
2/14
-
8/18/2019 Faisal_Alswied_ Crimes in Chicago
3/14
that has !ad socioeconomic conditions' !$t doesn,t ha+e high n$m!er o% crimes. )his tells $s that
there is a correlation !etween crime and socioeconomic conditions !$t that doesn,t mean
ca$sation.
Technical Summary
I. Data & Data cleaning
For this #ro-ect " $sed a crime data that was o!tained %rom the City o% Chicago we!site.
)he data set is really large* it has a##roimately two million res#onses and thirty +aria!les. )his
data set was aggregated to the comm$nity le+el and ty#e o% crime. Beside this data set " $sed the
socioeconomic indicators that ha+e !een aggregated at the comm$nity le+el. 9ence' " ended $#
ha+ing rows and 1;0 +aria!les. was not a!le to #re%orm (CA on this large n$m!er o%
+aria!les. As a res$lt' " did analysis to 7now the distri!$tion o% each +aria!le and see which o%
these +aria!les is signi%icant. " chose the +aria!les that ha+e a mean o% 100 %or those +aria!les
that normally distri!$ted and a median o% 100 %or those that s7ewed. Conse
-
8/18/2019 Faisal_Alswied_ Crimes in Chicago
4/14
li7ely to ha##en in the %ollowing neigh!orhoods A$stin with the highest score in the %irst
com#onent' oseland' o$th hore' orth 4awndale' Chicago 4awn' est 6nglewood'
6nglewood' A$!$rn resham and reater rand Crossing. )o see the scores %or the %irst
com#onent see >)a!le "" A##endi B.? )he second #rinci#al com#onent is a!o$t the
non+iolent crimes and the crimes that ha##en indoors those crimes incl$de dece#ti+e
#ractices' the%t' and !an7 ro!!eries see >)a!le " A##endi B? %or the loadings. )hese ty#es o%
crimes are most li7ely to ha##en in ear orth ide and the 4oo# see >)a!le "" A##endi B?
%or the scores. )he third #rinci#al com#onent is a!o$t he crimes that ha##en in air#orts.
)hose crimes incl$de the crimes that ha##en in air#lanes and inside the air#orts, terminals
see >)a!le " A##endi B? %or the loadings and >)a!le "" A##endi B.? %or the scores. ra#h
""" !elow shows a #lot o% the scores and the location o% the neigh!orhoods. )hose interesting
%indings made me wonder a!o$t the e%%ect o% the socioeconomic %actors on the crimes.
9ence' " decided to incl$de them in the second model.
Graph I
-
8/18/2019 Faisal_Alswied_ Crimes in Chicago
5/14
Graph II
Graph III
III. Model II
)he %irst model only showed $s only the association !etween the ty#es o% crimes and the
neigh!orhoods. 9owe+er' it did not show $s what is the moti+e !ehind those crimes' the le+el
o% income in those neigh!orhoods or the other socioeconomic indicators. As a res$lt' " added
the socioeconomic indicators see >)a!le "" A##endi A? %or the list o% +aria!les. )hose
+aria!les were added to the +aria!les that were $sed in model " > )a!le " A##endi A.? and
-
8/18/2019 Faisal_Alswied_ Crimes in Chicago
6/14
the res$lts were slightly di%%erent. A%ter loo7ing at the scree #lot' " decided to etract three
com#onents ra#h "8 !elow shows the scree #lot. )he three #rinci#al com#onents that were
etracted descri!e 3 #ercent o% the +aria!ility in the data.
ra#h "8
)he #rinci#le com#onents that were etracted are almost similar to the one that were etracted
%or model one. )he %irst model is a!o$t +iolent crimes. )he second #rinci#le com#onent is a!o$t
non+iolent crimes' !$t there is some contri!$tion %rom some o% the socioeconomic +aria!les s$ch
as income and the n$m!er o% #eo#le who are a!o+e 5 and yo$nger than 1;. )he third
com#onent is com#letely di%%erent than the %irst model and it is a!o$t the socioeconomic
indicators. ra#h 8 show the association !etween +iolent crimes and the socioeconomic
indicators. )he gra#h !elow shows $s that the neigh!orhoods that ha+e high n$m!er o% +iolent
crimes ha+e !ad socioeconomic conditions. 9owe+er' this is not always the case. )here are some
neigh!orhoods that ha+e really !ad socioeconomic conditions s$ch as i+erdale' !$t doesn,t
ha+e high rate o% crimes. )his tells $s that there is a correlation !etween !ad socioeconomic
-
8/18/2019 Faisal_Alswied_ Crimes in Chicago
7/14
conditions and +iolent crimes' !$t this does not indicate ca$sation. )a!le """ and )a!le "8
a##endi B show the loadings and scores %or the second model.
Graph V
IV. Conclusion
-
8/18/2019 Faisal_Alswied_ Crimes in Chicago
8/14
A%ter #er%orming (CA on this high dimensional data set' " was a!le to get a meaning. )he
%irst model told $s that the data has three ty#es o% crimes' which are +iolent' non+iolent'
and Air#orts. ome neigh!orhoods are high on one or the other and some o% them high in
!oth. )he second model etracted almost the same %actors. 9owe+er' it told $s that the
socioeconomic indicators are associated with the high n$m!er o% crimes' !$t this is not
always the case. )here are some neigh!orhoods that ha+e really !ad socioeconomic
conditions' !$t they don,t ha+e high rate o% crimes. As a res$lt' we can see that there is a
correlation' !$t this doesn,t indicate ca$sation. )hen the
-
8/18/2019 Faisal_Alswied_ Crimes in Chicago
9/14
-
8/18/2019 Faisal_Alswied_ Crimes in Chicago
10/14
C)AH(4A)FE@ 0.3 0.10;
D6(A)@6)H)E6 0.;2=
D"86AHHH6"D6)"A4 0.; G0.101
DH)E6 0.15 0.52
AH)A)"E 0.;=2
EC6HFEEDH)E6 0.3 0.2
9E)64H@E)64 G0.15 0.;;2E)96 0.5 0.;5
(AH(E(6) 0.31 0.5=2
(A"H4E)HAA6HEH6 0.55 0.52
6"D6C6 0.=1
6"D6C6H(EC9H9A44A 0.=22 0.1;
6"D6C6HAA6 0.51 0.131 G0.1;1
6"D6)"A4HADHHFE)HB 0.=52
6)AA) 0.=3
C9EE4HH(B4"CHHB"4D" 0.2 G0.102
C9EE4HH(B4"CHHED 0.;=
"D6A4 0.=2 0.215
@A44H6)A"4H)E6 0.5; 0.;21
)66) 0.=0= 0.33;8ACA)H4E)H4AD 0.;15
869"C46HEHCE@@6C"A4 0.=0 0.23
BAHEH)A86 0.
CE86"6C6H)E6 0.1= 0.5;
C)AH)A" 0.;23 0.11
9E(")A4HB"4D"HED 0.22 0.5; G0.102
(E4"C6HFAC"4")H869H(A" 0.32
)A86H4"KEH)E6 0.= 0.32 G0.102
A"(E)H)6@"A4H((6H46 0.=2
A"(E)H)6@"A4H4E6H46 0.=2
Ta"le II 2Scores 3or the 3irst model.Name Violent4outdoor Non5iolent irport
ogers (ar7 0.1205=325 0.1;==;=22 0.0235;;==
est idge 0.00;110 G0.00;1= G0.1===1
#town G0.122325 0.52=2515 G0.115=
4incoln
-
8/18/2019 Faisal_Alswied_ Crimes in Chicago
11/14
A+ondale G0.25=;;= G0.113;00=5 G0.1=5=1
4ogan
-
8/18/2019 Faisal_Alswied_ Crimes in Chicago
12/14
@o$nt reenwood G0.;32025203 G0.51330121= G0.13233555
@organ (ar7 G0.2133 G0.05;5 G0.22225=3
EL9are G0.5=112; G0.335152 ;.3;0551
6dgewater G0.0151321 0.21332 G0.1;=55
Ta"le III 2$oadings 3or the second model.Varia"le Name Violent4outdoor Non5iolent Socioeconomic
AE 0.;=; 0.22=
AA4) 0.=33 0.1= 0.253
BA))6 0.=3 0.1== 0.23
B4A 0.=3
C"@H6IA4HAA4) 0.=3 0.235 0.1=
C"@"A4HDA@A6 0.=5 0.2
C"@"A4H)6(A 0.5 0.2=
D6C6()"86H(AC)"C6 0.332 0.=13
@E)EH869"C46H)96F) 0.=1 0.15
ACE)"C 0.;5 0.31
EFF66H"8E48"HC9"4D6 0.=3 0.1=
E)96HEFF66 0.=25 0.21(B4"CH(6AC6H8"E4A)"E 0.52 0.235 0.1;1
EBB6 0.=15 0.21 0.21
6IHEFF66 0.; 0.3;5
)96F) 0.; 0.;3= G0.15;
6A(EH8"E4A)"E 0.;= 0.355
A@B4" 0.3 0.303
")6F66C6H")9H(B4"CHEFF 0.;=2 0.1; 0.2
(E)"))"E 0.3 0.2 0.35
A"(E)HA"CAF) G0.22=
A446 0.=32 0.102 0.1==
A(A)@6) 0.;5 0.1 0.1=2
BA 0.11 0.;5 G0.1;
C9AHA(A)@6) 0.;; 0.1;5C9AH(A"H4E)HED G0.1 0.52 0.1=5
CE@@6C"A4HHHB"6HEFF 0.;=;
C)AHB 0.3 0.55= 0.1;=
C)AH(4A)FE@ 0.= 0.303
D6(A)@6)H)E6 0.105 0.;1=
D"86AHHH6"D6)"A4 0.2 G0.22;
DH)E6 0.= 0.05 G0.12
AH)A)"E 0.; 0.30
EC6HFEEDH)E6 0.3; 0.5=3 G0.1=
9E)64H@E)64 G0.12= 0.;=
E)96 0.15 0.5;
(AH(E(6) 0.3=; 0.5;5
(A"H4E)HAA6HEH6 0.5= 0.1
6"D6C6 0.=1 0.101
6"D6C6H(EC9H9A44A 0.=1 0.1 0.13=
6"D6C6HAA6 0. G0.1
6"D6)"A4HADHHFE)HB 0.=1
6)AA) 0.=5
C9EE4HH(B4"CHHB"4D" 0.55 0.1;1
C9EE4HH(B4"CHHED 0.;; 0.15=
"D6A4 0.;;3 0.20 0.2
-
8/18/2019 Faisal_Alswied_ Crimes in Chicago
13/14
-
8/18/2019 Faisal_Alswied_ Crimes in Chicago
14/14
4oo# G1.3=;551 5.0331;=; 0.=;0;3=1
ear o$th ide G0.=2;0; 0.1;0;= G0.013=2
Armo$r