{"id":402195,"date":"2024-06-29T16:20:56","date_gmt":"2024-06-29T16:20:56","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=402195"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=402195","title":{"rendered":"<span>Crime, Race and Lethal Force in the USA \u2014 Part 2<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/2v\/ir\/52\/2vir52trvbe1yrjn1tb5bu3xdqa.jpeg\" alt=\"image\" data-src=\"https:\/\/habrastorage.org\/webt\/2v\/ir\/52\/2vir52trvbe1yrjn1tb5bu3xdqa.jpeg\" data-blurred=\"true\"\/><\/div>\n<p>  In the <a href=\"https:\/\/habr.com\/ru\/post\/519154\/\">previous part<\/a> of this article, I talked about the research background, goals, assumptions, source data, and used tools. Today, without further ado, let&#8217;s say together\u2026<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h2>Chocks Away!<br \/>  <\/h2>\n<p>  We start by importing the required packages and defining the root folder where the source data sit:<\/p>\n<pre><code class=\"python\">import pandas as pd, numpy as np  # root folder path (change for your own!) ROOT_FOLDER = r'c:\\_PROG_\\Projects\\us_crimes' <\/code><\/pre>\n<p>  <\/p>\n<h2>Lethal Force Fatalities<br \/>  <\/h2>\n<p>  First let&#8217;s look into the use of lethal force data. Load the CSV into a new DataFrame:<\/p>\n<pre><code class=\"python\"># FENC source CSV FENC_FILE = ROOT_FOLDER + '\\\\fatal_enc_db.csv'  # read to DataFrame df_fenc = pd.read_csv(FENC_FILE, sep=';', header=0, usecols=[\"Date (Year)\", \"Subject's race with imputations\", \"Cause of death\", \"Intentional Use of Force (Developing)\", \"Location of death (state)\"]) <\/code><\/pre>\n<p>  You will note that not all the fields are loaded, but only those we&#8217;ll need in the research: year, victim race (with imputations), cause of death (not used now but may come in useful later on), intentional use of force flag, and the state where the death took place.<\/p>\n<p>  It&#8217;s worth understanding what \u00absubject&#8217;s race with imputations\u00bb means. The fact is, the official \/ media sources that FENC uses to glean data don&#8217;t always report the victim&#8217;s race, resulting in data gaps. To compensate these gaps, the FENC community involves third-party experts who estimate the race by the other available data (with some degree of error). You can read more on this on the <a href=\"https:\/\/fatalencounters.org\/\" rel=\"nofollow\">FENC website<\/a> or see notes in the original <a href=\"https:\/\/docs.google.com\/spreadsheets\/d\/1dKmaV_JiWcG8XBoRgP8b4e9Eopkpgt7FL7nyspvzAsE\/edit#gid=0\" rel=\"nofollow\">Excel spreadsheet<\/a> (sheet 2).<\/p>\n<p>  We&#8217;ll then give the columns handier titles and drop the rows with missing data:<\/p>\n<pre><code class=\"python\">df_fenc.columns = ['Race', 'State', 'Cause', 'UOF', 'Year'] df_fenc.dropna(inplace=True) <\/code><\/pre>\n<p>  Now we hava to unify the race categories with those used in the crime and population datasets we are going to match with, since these datasets use somewhat different racial classifications. The FENC database, for one, singles out the Hispanic\/Latino ethnicity, as well as Asian\/Pacific Islanders and Middle Easterns. But in this research, we&#8217;re focusing on Blacks and Whites only. So we must make some aggregation \/ renaming:<\/p>\n<pre><code class=\"python\">df_fenc = df_fenc.replace({'Race': {'European-American\/White': 'White',                            'African-American\/Black': 'Black',                            'Hispanic\/Latino': 'White', 'Native American\/Alaskan': 'American Indian',                           'Asian\/Pacific Islander': 'Asian', 'Middle Eastern': 'Asian',                           'NA': 'Unknown', 'Race unspecified': 'Unknown'}}, value=None) <\/code><\/pre>\n<p>  We are leaving only White (now including Hispanic\/Latino) and Black victims:<\/p>\n<pre><code class=\"python\">df_fenc = df_fenc.loc[df_fenc['Race'].isin(['White', 'Black'])] <\/code><\/pre>\n<p>  What&#8217;s the purpose of the UOF (Use Of Force) field? For this research, we want to analyze only those cases when the police (or other law enforcement agencies) <i>intentionally<\/i> used lethal force. We leave out cases when the death was the result of suicide (for example, when sieged by the police) or pursuit and crash in a vehicle. This constraint follows from two criteria: <\/p>\n<p>  1) the circumstances of deaths not directly resulting from use of force don&#8217;t normally allow of a transparent cause-and-effect link between the acts of the law enforcement officers and the ensuing death (one example could be when a man dies from a heart attack when held at gun-point by a police officer; another common example is when a suspect being arrested shoots him\/herself in the head); <br \/>  2) it is only intentional use of force that counts in official statistics; thus, for instance, the future FBI database I mentioned in the previous part of the article will collect only such cases.<\/p>\n<p>  So to leave only intentional use of force cases:<\/p>\n<pre><code class=\"python\">df_fenc = df_fenc.loc[df_fenc['UOF'].isin(['Deadly force', 'Intentional use of force'])] <\/code><\/pre>\n<p>  For convenience we&#8217;ll add the full state names. I made a separate <a href=\"https:\/\/yadi.sk\/d\/Fb5NOSiLiVXwDA\" rel=\"nofollow\">CSV file<\/a> for that purpose, which we&#8217;re now merging with our data:<\/p>\n<pre><code class=\"python\">df_state_names = pd.read_csv(ROOT_FOLDER + '\\\\us_states.csv', sep=';', header=0) df_fenc = df_fenc.merge(df_state_names, how='inner', left_on='State', right_on='state_abbr') <\/code><\/pre>\n<p>  Type <code>df_fenc.head()<\/code> to peek at the resulting dataset:<\/p>\n<div class=\"scrollable-table\">\n<table border=\"1\">\n<thead>\n<tr>\n<th><\/th>\n<th>Race<\/th>\n<th>State<\/th>\n<th>Cause<\/th>\n<th>UOF<\/th>\n<th>Year<\/th>\n<th>state_name<\/th>\n<th>state_abbr<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<th>0<\/th>\n<td>Black<\/td>\n<td>GA<\/td>\n<td>Gunshot<\/td>\n<td>Deadly force<\/td>\n<td>2000<\/td>\n<td>Georgia<\/td>\n<td>GA<\/td>\n<\/tr>\n<tr>\n<th>1<\/th>\n<td>Black<\/td>\n<td>GA<\/td>\n<td>Gunshot<\/td>\n<td>Deadly force<\/td>\n<td>2000<\/td>\n<td>Georgia<\/td>\n<td>GA<\/td>\n<\/tr>\n<tr>\n<th>2<\/th>\n<td>Black<\/td>\n<td>GA<\/td>\n<td>Gunshot<\/td>\n<td>Deadly force<\/td>\n<td>2000<\/td>\n<td>Georgia<\/td>\n<td>GA<\/td>\n<\/tr>\n<tr>\n<th>3<\/th>\n<td>Black<\/td>\n<td>GA<\/td>\n<td>Gunshot<\/td>\n<td>Deadly force<\/td>\n<td>2000<\/td>\n<td>Georgia<\/td>\n<td>GA<\/td>\n<\/tr>\n<tr>\n<th>4<\/th>\n<td>Black<\/td>\n<td>GA<\/td>\n<td>Gunshot<\/td>\n<td>Deadly force<\/td>\n<td>2000<\/td>\n<td>Georgia<\/td>\n<td>GA<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>  Since we&#8217;re not going to investigate the individual cases, let&#8217;s aggregate the data by years and victim races:<\/p>\n<pre><code class=\"python\"># group by year and race ds_fenc_agg = df_fenc.groupby(['Year', 'Race']).count()['Cause'] df_fenc_agg = ds_fenc_agg.unstack(level=1) # cast numericals to UINT16 to save memory df_fenc_agg = df_fenc_agg.astype('uint16') <\/code><\/pre>\n<p>  The resulting table is indexed by years (2000 \u2014 2020) and contains two columns: &#8216;White&#8217; (number of white victims) and &#8216;Black&#8217; (number of black victims). Let&#8217;s take a look at the corresponding plot:<\/p>\n<pre><code class=\"python\">plt = df_fenc_agg.plot(xticks=df_fenc_agg.index, color=['olive', 'g']) plt.set_xticklabels(df_fenc_agg.index, rotation='vertical') plt.set_xlabel('') plt.set_ylabel('Number of police victims') plt <\/code><\/pre>\n<p>  <a href=\"https:\/\/habrastorage.org\/webt\/ck\/uv\/7o\/ckuv7orp_udcp6ieq19v614ca00.jpeg\" rel=\"nofollow\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/pb\/lw\/fi\/pblwfii03souodybb_6e9dzy5uq.jpeg\" data-src=\"https:\/\/habrastorage.org\/webt\/pb\/lw\/fi\/pblwfii03souodybb_6e9dzy5uq.jpeg\" data-blurred=\"true\"\/><\/a><\/p>\n<p>  <b>Intermediate conclusion:<\/b>  <\/p>\n<blockquote><p>White police victims outnumber black victims in absolute figures.  <\/p><\/blockquote>\n<p>  The average difference factor between the two is about 2.4. It&#8217;s not a far guess that this is due to the difference between the population of the two races in the US. Well, let&#8217;s look at per capita values then.<\/p>\n<p>  Load the population data:<\/p>\n<pre><code class=\"python\"># population CSV file (1991 - 2018 data points) POP_FILE = ROOT_FOLDER + '\\\\us_pop_1991-2018.csv' df_pop = pd.read_csv(POP_FILE, index_col=0, dtype='int64') <\/code><\/pre>\n<p>  Then merge the data with our dataset:<\/p>\n<pre><code class=\"python\"># take only Black and White population for 2000 - 2018 df_pop = df_pop.loc[2000:2018, ['White_pop', 'Black_pop']]  # join dataframes and drop rows with missing values df_fenc_agg = df_fenc_agg.join(df_pop) df_fenc_agg.dropna(inplace=True)  # cast population numbers to integer type df_fenc_agg = df_fenc_agg.astype({'White_pop': 'uint32', 'Black_pop': 'uint32'}) <\/code><\/pre>\n<p>  OK. Finally, create two new columns with per capita (per million) values dividing the abosulte victim counts by the respective race population and multiplying by one million:<\/p>\n<pre><code class=\"python\">df_fenc_agg['White_promln'] = df_fenc_agg['White'] * 1e6 \/ df_fenc_agg['White_pop'] df_fenc_agg['Black_promln'] = df_fenc_agg['Black'] * 1e6 \/ df_fenc_agg['Black_pop'] <\/code><\/pre>\n<p>  Let&#8217;s see what we get:<\/p>\n<div class=\"scrollable-table\">\n<table border=\"1\">\n<thead>\n<tr>\n<th><\/th>\n<th>Black<\/th>\n<th>White<\/th>\n<th>White_pop<\/th>\n<th>Black_pop<\/th>\n<th>White_promln<\/th>\n<th>Black_promln<\/th>\n<\/tr>\n<tr>\n<th>Year<\/th>\n<th><\/th>\n<th><\/th>\n<th><\/th>\n<th><\/th>\n<th><\/th>\n<th><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<th>2000<\/th>\n<td>148<\/td>\n<td>291<\/td>\n<td>218756353<\/td>\n<td>35410436<\/td>\n<td>1.330247<\/td>\n<td>4.179559<\/td>\n<\/tr>\n<tr>\n<th>2001<\/th>\n<td>158<\/td>\n<td>353<\/td>\n<td>219843871<\/td>\n<td>35758783<\/td>\n<td>1.605685<\/td>\n<td>4.418495<\/td>\n<\/tr>\n<tr>\n<th>2002<\/th>\n<td>161<\/td>\n<td>363<\/td>\n<td>220931389<\/td>\n<td>36107130<\/td>\n<td>1.643044<\/td>\n<td>4.458953<\/td>\n<\/tr>\n<tr>\n<th>2003<\/th>\n<td>179<\/td>\n<td>388<\/td>\n<td>222018906<\/td>\n<td>36455476<\/td>\n<td>1.747599<\/td>\n<td>4.910099<\/td>\n<\/tr>\n<tr>\n<th>2004<\/th>\n<td>157<\/td>\n<td>435<\/td>\n<td>223106424<\/td>\n<td>36803823<\/td>\n<td>1.949742<\/td>\n<td>4.265861<\/td>\n<\/tr>\n<tr>\n<th>2005<\/th>\n<td>181<\/td>\n<td>452<\/td>\n<td>224193942<\/td>\n<td>37152170<\/td>\n<td>2.016112<\/td>\n<td>4.871855<\/td>\n<\/tr>\n<tr>\n<th>2006<\/th>\n<td>212<\/td>\n<td>460<\/td>\n<td>225281460<\/td>\n<td>37500517<\/td>\n<td>2.041890<\/td>\n<td>5.653255<\/td>\n<\/tr>\n<tr>\n<th>2007<\/th>\n<td>219<\/td>\n<td>449<\/td>\n<td>226368978<\/td>\n<td>37848864<\/td>\n<td>1.983487<\/td>\n<td>5.786171<\/td>\n<\/tr>\n<tr>\n<th>2008<\/th>\n<td>213<\/td>\n<td>442<\/td>\n<td>227456495<\/td>\n<td>38197211<\/td>\n<td>1.943229<\/td>\n<td>5.576323<\/td>\n<\/tr>\n<tr>\n<th>2009<\/th>\n<td>249<\/td>\n<td>478<\/td>\n<td>228544013<\/td>\n<td>38545558<\/td>\n<td>2.091501<\/td>\n<td>6.459888<\/td>\n<\/tr>\n<tr>\n<th>2010<\/th>\n<td>219<\/td>\n<td>506<\/td>\n<td>229397472<\/td>\n<td>38874625<\/td>\n<td>2.205778<\/td>\n<td>5.633495<\/td>\n<\/tr>\n<tr>\n<th>2011<\/th>\n<td>290<\/td>\n<td>577<\/td>\n<td>230838975<\/td>\n<td>39189528<\/td>\n<td>2.499578<\/td>\n<td>7.399936<\/td>\n<\/tr>\n<tr>\n<th>2012<\/th>\n<td>302<\/td>\n<td>632<\/td>\n<td>231992377<\/td>\n<td>39623138<\/td>\n<td>2.724227<\/td>\n<td>7.621809<\/td>\n<\/tr>\n<tr>\n<th>2013<\/th>\n<td>310<\/td>\n<td>693<\/td>\n<td>232969901<\/td>\n<td>39919371<\/td>\n<td>2.974633<\/td>\n<td>7.765653<\/td>\n<\/tr>\n<tr>\n<th>2014<\/th>\n<td>264<\/td>\n<td>704<\/td>\n<td>233963128<\/td>\n<td>40379066<\/td>\n<td>3.009021<\/td>\n<td>6.538041<\/td>\n<\/tr>\n<tr>\n<th>2015<\/th>\n<td>272<\/td>\n<td>729<\/td>\n<td>234940100<\/td>\n<td>40695277<\/td>\n<td>3.102919<\/td>\n<td>6.683822<\/td>\n<\/tr>\n<tr>\n<th>2016<\/th>\n<td>269<\/td>\n<td>723<\/td>\n<td>234644039<\/td>\n<td>40893369<\/td>\n<td>3.081263<\/td>\n<td>6.578084<\/td>\n<\/tr>\n<tr>\n<th>2017<\/th>\n<td>265<\/td>\n<td>743<\/td>\n<td>235507457<\/td>\n<td>41393491<\/td>\n<td>3.154889<\/td>\n<td>6.401973<\/td>\n<\/tr>\n<tr>\n<th>2018<\/th>\n<td>265<\/td>\n<td>775<\/td>\n<td>236173020<\/td>\n<td>41617764<\/td>\n<td>3.281493<\/td>\n<td>6.367473<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>  The two rightmost columns now contain per million victim counts for both races. Time to visualize that:<\/p>\n<pre><code class=\"python\">plt = df_fenc_agg.loc[:, ['White_promln', 'Black_promln']].plot(xticks=df_fenc_agg.index, color=['g', 'olive']) plt.set_xticklabels(df_fenc_agg.index, rotation='vertical') plt.set_xlabel('') plt.set_ylabel('Number of police victims\\nper 1 mln. within race') plt <\/code><\/pre>\n<p>  <a href=\"https:\/\/habrastorage.org\/webt\/uq\/ku\/vd\/uqkuvdrtqjwwntliqrl3uc014ca.jpeg\" rel=\"nofollow\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/q6\/lc\/ef\/q6lcefrkaxyr_ahnr6xr7rji-vq.jpeg\" data-src=\"https:\/\/habrastorage.org\/webt\/q6\/lc\/ef\/q6lcefrkaxyr_ahnr6xr7rji-vq.jpeg\" data-blurred=\"true\"\/><\/a><\/p>\n<p>  We&#8217;ll also display the basic stats for this data by running:<\/p>\n<pre><code class=\"python\">df_fenc_agg.loc[:, ['White_promln', 'Black_promln']].describe() <\/code><\/pre>\n<div class=\"scrollable-table\">\n<table border=\"1\">\n<thead>\n<tr>\n<th><\/th>\n<th>White_promln<\/th>\n<th>Black_promln<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<th>count<\/th>\n<td>19.000000<\/td>\n<td>19.000000<\/td>\n<\/tr>\n<tr>\n<th><b>mean<\/b><\/th>\n<td><b>2.336123<\/b><\/td>\n<td><b>5.872145<\/b><\/td>\n<\/tr>\n<tr>\n<th><b>std<\/b><\/th>\n<td><b>0.615133<\/b><\/td>\n<td><b>1.133677<\/b><\/td>\n<\/tr>\n<tr>\n<th>min<\/th>\n<td>1.330247<\/td>\n<td>4.179559<\/td>\n<\/tr>\n<tr>\n<th>25%<\/th>\n<td>1.946485<\/td>\n<td>4.890977<\/td>\n<\/tr>\n<tr>\n<th>50%<\/th>\n<td>2.091501<\/td>\n<td>5.786171<\/td>\n<\/tr>\n<tr>\n<th>75%<\/th>\n<td>2.991827<\/td>\n<td>6.558062<\/td>\n<\/tr>\n<tr>\n<th>max<\/th>\n<td>3.281493<\/td>\n<td>7.765653<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>  <b>Intermediate conclusions:<\/b>  <\/p>\n<blockquote>\n<ol>\n<li>Lethal force results on average in 5.9 per one million Black deaths and 2.3 per one million White deaths (Black victim count is 2.6 greater in unit values).<\/li>\n<li>Data deviation (scatter) for Blacks is 1.8 higher than for Whites \u2014 you can see that the green curve representing White victims is considerably smoother.<\/li>\n<li>Black victims peaked in 2013 at 7.7 per million; White victims peaked in 2018 at 3.3 per million.<\/li>\n<li>White victims grow continuously from year to year (by 0.1 \u2014 0.2 per million on average), while Black victims rolled back to their 2009 level after a climax in 2011 \u2014 2013.<\/li>\n<\/ol>\n<p>  <\/p><\/blockquote>\n<p>  Thus, we can answer our <b>first question<\/b>:<\/p>\n<p>   \u2014 <b><i>Can one say the police kill Blacks more frequently than Whites?<\/i><\/b><br \/>   \u2014 <b>Yes, it is a correct inference. Blacks are 2.6 times more likely to meet death by the hands of law enforcement agencies than Whites.<\/b><\/p>\n<p>  Bearing in mind this inference, let&#8217;s go ahead and look at the crime data to see if (and how) they are related to lethal force fatalities and races.<\/p>\n<h2>Crime Data<br \/>  <\/h2>\n<p>  Let&#8217;s load our crime CSV:<\/p>\n<pre><code class=\"python\">CRIMES_FILE = ROOT_FOLDER + '\\\\culprits_victims.csv' df_crimes = pd.read_csv(CRIMES_FILE, sep=';', header=0,                          index_col=0, usecols=['Year', 'Offense', 'Offender\/Victim', 'White',                                         'White pro capita', 'Black', 'Black pro capita']) <\/code><\/pre>\n<p>  Again, as before, we&#8217;re using only the relevant fields: year, offense type, offender \/ victim classifier and offense counts for each race (absolute \u2014 &#8216;White&#8217;, &#8216;Black&#8217; and per capita \u2014 &#8216;White pro capita&#8217;, &#8216;Black pro capita&#8217;).<\/p>\n<p>  Let&#8217;s look what we have here (with <code>df_crimes.head()<\/code>):<\/p>\n<div class=\"scrollable-table\">\n<table border=\"1\">\n<thead>\n<tr>\n<th><\/th>\n<th>Offense<\/th>\n<th>Offender\/Victim<\/th>\n<th>Black<\/th>\n<th>White<\/th>\n<th>Black pro capita<\/th>\n<th>White pro capita<\/th>\n<\/tr>\n<tr>\n<th>Year<\/th>\n<th><\/th>\n<th><\/th>\n<th><\/th>\n<th><\/th>\n<th><\/th>\n<th><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<th>1991<\/th>\n<td>All Offenses<\/td>\n<td>Offender<\/td>\n<td>490<\/td>\n<td>598<\/td>\n<td>1.518188e-05<\/td>\n<td>2.861673e-06<\/td>\n<\/tr>\n<tr>\n<th>1991<\/th>\n<td>All Offenses<\/td>\n<td>Offender<\/td>\n<td>4<\/td>\n<td>4<\/td>\n<td>1.239337e-07<\/td>\n<td>1.914160e-08<\/td>\n<\/tr>\n<tr>\n<th>1991<\/th>\n<td>All Offenses<\/td>\n<td>Offender<\/td>\n<td>508<\/td>\n<td>122<\/td>\n<td>1.573958e-05<\/td>\n<td>5.838195e-07<\/td>\n<\/tr>\n<tr>\n<th>1991<\/th>\n<td>All Offenses<\/td>\n<td>Offender<\/td>\n<td>155<\/td>\n<td>176<\/td>\n<td>4.802432e-06<\/td>\n<td>8.422314e-07<\/td>\n<\/tr>\n<tr>\n<th>1991<\/th>\n<td>All Offenses<\/td>\n<td>Offender<\/td>\n<td>13<\/td>\n<td>19<\/td>\n<td>4.027846e-07<\/td>\n<td>9.092270e-08<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>  We won&#8217;t need data on offense victims so far, so get rid of them:<\/p>\n<pre><code class=\"python\"># leave only offenders df_crimes1 = df_crimes.loc[df_crimes['Offender\/Victim'] == 'Offender'] # leave only 2000 - 2018 data years and remove redundant columns df_crimes1 = df_crimes1.loc[2000:2018, ['Offense', 'White', 'White pro capita', 'Black', 'Black pro capita']] <\/code><\/pre>\n<p>  Here&#8217;s the resulting dataset (1295 rows * 5 columns):<\/p>\n<div class=\"scrollable-table\">\n<table border=\"1\">\n<thead>\n<tr>\n<th><\/th>\n<th>Offense<\/th>\n<th>White<\/th>\n<th>White pro capita<\/th>\n<th>Black<\/th>\n<th>Black pro capita<\/th>\n<\/tr>\n<tr>\n<th>Year<\/th>\n<th><\/th>\n<th><\/th>\n<th><\/th>\n<th><\/th>\n<th><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<th>2000<\/th>\n<td>All Offenses<\/td>\n<td>679<\/td>\n<td>0.000003<\/td>\n<td>651<\/td>\n<td>0.000018<\/td>\n<\/tr>\n<tr>\n<th>2000<\/th>\n<td>All Offenses<\/td>\n<td>11458<\/td>\n<td>0.000052<\/td>\n<td>30199<\/td>\n<td>0.000853<\/td>\n<\/tr>\n<tr>\n<th>2000<\/th>\n<td>All Offenses<\/td>\n<td>4439<\/td>\n<td>0.000020<\/td>\n<td>3188<\/td>\n<td>0.000090<\/td>\n<\/tr>\n<tr>\n<th>2000<\/th>\n<td>All Offenses<\/td>\n<td>10481<\/td>\n<td>0.000048<\/td>\n<td>5153<\/td>\n<td>0.000146<\/td>\n<\/tr>\n<tr>\n<th>2000<\/th>\n<td>All Offenses<\/td>\n<td>746<\/td>\n<td>0.000003<\/td>\n<td>63<\/td>\n<td>0.000002<\/td>\n<\/tr>\n<tr>\n<th>&#8230;<\/th>\n<td>&#8230;<\/td>\n<td>&#8230;<\/td>\n<td>&#8230;<\/td>\n<td>&#8230;<\/td>\n<td>&#8230;<\/td>\n<\/tr>\n<tr>\n<th>2018<\/th>\n<td>Larceny Theft Offenses<\/td>\n<td>1961<\/td>\n<td>0.000008<\/td>\n<td>1669<\/td>\n<td>0.000040<\/td>\n<\/tr>\n<tr>\n<th>2018<\/th>\n<td>Larceny Theft Offenses<\/td>\n<td>48616<\/td>\n<td>0.000206<\/td>\n<td>30048<\/td>\n<td>0.000722<\/td>\n<\/tr>\n<tr>\n<th>2018<\/th>\n<td>Drugs Narcotic Offenses<\/td>\n<td>555974<\/td>\n<td>0.002354<\/td>\n<td>223398<\/td>\n<td>0.005368<\/td>\n<\/tr>\n<tr>\n<th>2018<\/th>\n<td>Drugs Narcotic Offenses<\/td>\n<td>305052<\/td>\n<td>0.001292<\/td>\n<td>63785<\/td>\n<td>0.001533<\/td>\n<\/tr>\n<tr>\n<th>2018<\/th>\n<td>Weapon Law Violation<\/td>\n<td>70034<\/td>\n<td>0.000297<\/td>\n<td>58353<\/td>\n<td>0.001402<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>  Now we need to convert the per capita (per 1 person) values to per million values (in keeping with the unit data we use throughout the research). Just multiply the per capita columns by one million:<\/p>\n<pre><code class=\"python\">df_crimes1['White_promln'] = df_crimes1['White pro capita'] * 1e6 df_crimes1['Black_promln'] = df_crimes1['Black pro capita'] * 1e6 <\/code><\/pre>\n<p>  To see the whole picture \u2014 how crimes committed by Whites and Blacks are distributed across the offense types, let&#8217;s aggregate the absolute crime counts by years:<\/p>\n<pre><code class=\"python\">df_crimes_agg = df_crimes1.groupby(['Offense']).sum().loc[:, ['White', 'Black']] <\/code><\/pre>\n<div class=\"scrollable-table\">\n<table border=\"1\">\n<thead>\n<tr>\n<th><\/th>\n<th>White<\/th>\n<th>Black<\/th>\n<\/tr>\n<tr>\n<th>Offense<\/th>\n<th><\/th>\n<th><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<th>All Offenses<\/th>\n<td>44594795<\/td>\n<td>22323144<\/td>\n<\/tr>\n<tr>\n<th>Assault Offenses<\/th>\n<td>12475830<\/td>\n<td>7462272<\/td>\n<\/tr>\n<tr>\n<th>Drugs Narcotic Offenses<\/th>\n<td>9624596<\/td>\n<td>3453140<\/td>\n<\/tr>\n<tr>\n<th>Larceny Theft Offenses<\/th>\n<td>9563917<\/td>\n<td>4202235<\/td>\n<\/tr>\n<tr>\n<th>Murder And Nonnegligent Manslaughter<\/th>\n<td>28913<\/td>\n<td>39617<\/td>\n<\/tr>\n<tr>\n<th>Sex Offenses<\/th>\n<td>833088<\/td>\n<td>319366<\/td>\n<\/tr>\n<tr>\n<th>Weapon Law Violation<\/th>\n<td>829485<\/td>\n<td>678861<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>  Or in a graph:<\/p>\n<pre><code class=\"python\">plt = df_crimes_agg.plot.barh(color=['g', 'olive']) plt.set_ylabel('') plt.set_xlabel('Number of offenses (sum for 2000-2018)') <\/code><\/pre>\n<p>  <a href=\"https:\/\/habrastorage.org\/webt\/a3\/lw\/wz\/a3lwwz2zux5w9azxhbyguwsm7we.jpeg\" rel=\"nofollow\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/ky\/k2\/ji\/kyk2jiduuboayxatua4epjitpmw.jpeg\" data-src=\"https:\/\/habrastorage.org\/webt\/ky\/k2\/ji\/kyk2jiduuboayxatua4epjitpmw.jpeg\" data-blurred=\"true\"\/><\/a><\/p>\n<p>  We can observe here that:<\/p>\n<ul>\n<li>drug offenses, assaults and &#8216;All Offenses&#8217; dominate over the other offense types (murder, weapon law violations and sex offenses)<\/li>\n<li>in absolute figures, Whites commit more crimes than Blacks (exactly twice as much for the &#8216;All Offenses&#8217; category)<\/li>\n<\/ul>\n<p>  Again we realize that no robust conclusions can be made about &#8216;race criminality&#8217; without population data. So we&#8217;re looking at per capita (per million) values:<\/p>\n<pre><code class=\"python\">df_crimes_agg1 = df_crimes1.groupby(['Offense']).sum().loc[:, ['White_promln', 'Black_promln']] <\/code><\/pre>\n<div class=\"scrollable-table\">\n<table border=\"1\">\n<thead>\n<tr>\n<th><\/th>\n<th>White_promln<\/th>\n<th>Black_promln<\/th>\n<\/tr>\n<tr>\n<th>Offense<\/th>\n<th><\/th>\n<th><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<th>All Offenses<\/th>\n<td>194522.307758<\/td>\n<td>574905.952459<\/td>\n<\/tr>\n<tr>\n<th>Assault Offenses<\/th>\n<td>54513.398833<\/td>\n<td>192454.602875<\/td>\n<\/tr>\n<tr>\n<th>Drugs Narcotic Offenses<\/th>\n<td>41845.758869<\/td>\n<td>88575.523095<\/td>\n<\/tr>\n<tr>\n<th>Larceny Theft Offenses<\/th>\n<td>41697.303725<\/td>\n<td>108189.184125<\/td>\n<\/tr>\n<tr>\n<th>Murder And Nonnegligent Manslaughter<\/th>\n<td>125.943007<\/td>\n<td>1016.403706<\/td>\n<\/tr>\n<tr>\n<th>Sex Offenses<\/th>\n<td>3633.777035<\/td>\n<td>8225.144985<\/td>\n<\/tr>\n<tr>\n<th>Weapon Law Violation<\/th>\n<td>3612.671402<\/td>\n<td>17389.163849<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>  Or as a graph:<\/p>\n<pre><code class=\"python\">plt = df_crimes_agg1.plot.barh(color=['g', 'olive']) plt.set_ylabel('') plt.set_xlabel('Number of offenses (sum for 2000-2018) per 1 mln. within race') <\/code><\/pre>\n<p>  <a href=\"https:\/\/habrastorage.org\/webt\/w1\/xo\/js\/w1xojs5kjf-urlypjndmcobis5c.jpeg\" rel=\"nofollow\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/bh\/qu\/tg\/bhqutgw5umvvaktr0nkkszbllsg.jpeg\" data-src=\"https:\/\/habrastorage.org\/webt\/bh\/qu\/tg\/bhqutgw5umvvaktr0nkkszbllsg.jpeg\" data-blurred=\"true\"\/><\/a><\/p>\n<p>  We&#8217;ve got quite a different picture this time. Blacks commit more crimes for each analyzed category than Whites, approaching a triple difference for &#8216;All Offenses&#8217;.<\/p>\n<p>  We will now leave only the &#8216;All Offenses&#8217; category as the most representative of the 7 and sum up the rows by years (since the source data may feature several entries per year, matching the number of reporting agencies).<\/p>\n<pre><code class=\"python\"># leave only 'All Offenses' category df_crimes1 = df_crimes1.loc[df_crimes1['Offense'] == 'All Offenses'] # could also have left assault and murder (try as experiment!) #df_crimes1 = df_crimes1.loc[df_crimes1['Offense'].str.contains('Assault|Murder')]  # drop absolute columns and aggregate data by years df_crimes1 = df_crimes1.groupby(level=0).sum().loc[:, ['White_promln', 'Black_promln']] <\/code><\/pre>\n<p>  The resulting dataset:<\/p>\n<div class=\"scrollable-table\">\n<table border=\"1\">\n<thead>\n<tr>\n<th><\/th>\n<th>White_promln<\/th>\n<th>Black_promln<\/th>\n<\/tr>\n<tr>\n<th>Year<\/th>\n<th><\/th>\n<th><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<th>2000<\/th>\n<td>6115.058976<\/td>\n<td>17697.409882<\/td>\n<\/tr>\n<tr>\n<th>2001<\/th>\n<td>6829.701429<\/td>\n<td>20431.707645<\/td>\n<\/tr>\n<tr>\n<th>2002<\/th>\n<td>7282.333249<\/td>\n<td>20972.838329<\/td>\n<\/tr>\n<tr>\n<th>2003<\/th>\n<td>7857.691182<\/td>\n<td>22218.966500<\/td>\n<\/tr>\n<tr>\n<th>2004<\/th>\n<td>8826.576863<\/td>\n<td>26308.815799<\/td>\n<\/tr>\n<tr>\n<th>2005<\/th>\n<td>9713.826255<\/td>\n<td>30616.569637<\/td>\n<\/tr>\n<tr>\n<th>2006<\/th>\n<td>10252.894313<\/td>\n<td>33189.382429<\/td>\n<\/tr>\n<tr>\n<th>2007<\/th>\n<td>10566.527362<\/td>\n<td>34100.495064<\/td>\n<\/tr>\n<tr>\n<th>2008<\/th>\n<td>10580.520024<\/td>\n<td>34052.276749<\/td>\n<\/tr>\n<tr>\n<th>2009<\/th>\n<td>10889.263592<\/td>\n<td>33954.651792<\/td>\n<\/tr>\n<tr>\n<th>2010<\/th>\n<td>10977.017218<\/td>\n<td>33884.236826<\/td>\n<\/tr>\n<tr>\n<th>2011<\/th>\n<td>11035.346176<\/td>\n<td>32946.454471<\/td>\n<\/tr>\n<tr>\n<th>2012<\/th>\n<td>11562.836825<\/td>\n<td>33150.706035<\/td>\n<\/tr>\n<tr>\n<th>2013<\/th>\n<td>11211.113491<\/td>\n<td>32207.571607<\/td>\n<\/tr>\n<tr>\n<th>2014<\/th>\n<td>11227.354594<\/td>\n<td>31517.346141<\/td>\n<\/tr>\n<tr>\n<th>2015<\/th>\n<td>11564.786088<\/td>\n<td>31764.865490<\/td>\n<\/tr>\n<tr>\n<th>2016<\/th>\n<td>12193.026562<\/td>\n<td>33186.064958<\/td>\n<\/tr>\n<tr>\n<th>2017<\/th>\n<td>12656.261666<\/td>\n<td>34900.390499<\/td>\n<\/tr>\n<tr>\n<th>2018<\/th>\n<td>13180.171893<\/td>\n<td>37805.202605<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>  Let&#8217;s see how it looks on a plot:<\/p>\n<pre><code class=\"python\">plt = df_crimes1.plot(xticks=df_crimes1.index, color=['g', 'olive']) plt.set_xticklabels(df_fenc_agg.index, rotation='vertical') plt.set_xlabel('') plt.set_ylabel('Number of offenses\\nper 1 mln. within race') <\/code><\/pre>\n<p>  <a href=\"https:\/\/habrastorage.org\/webt\/c8\/6n\/xu\/c86nxuwdqvodtjkpugnnknvkjpa.jpeg\" rel=\"nofollow\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/d2\/ar\/vk\/d2arvkzw_laf-81o4nhu90iik2y.jpeg\" data-src=\"https:\/\/habrastorage.org\/webt\/d2\/ar\/vk\/d2arvkzw_laf-81o4nhu90iik2y.jpeg\" data-blurred=\"true\"\/><\/a><\/p>\n<p>  <b>Intermediate conclusions<\/b>:  <\/p>\n<blockquote>\n<ol>\n<li>Whites commit twice as many offenses as Blacks in absolute numbers, but three times as fewer in per capita numbers (per 1 million population within that race).<\/li>\n<li>Criminality among Whites grows more or less steadily over the entire period of investigation (doubled over 19 years). Criminality among Blacks also grows, but by leaps and starts, showing steep growth from 2001 to 2006, then abating slightly over 2007 \u2014 2016 and plummeting again after 2017. Over the entire period, however, the growth factor is also 2, like with Whites.<\/li>\n<li>But for the period of decrease in 2007 \u2014 2016, criminality among Blacks grows at a higher rate than that among Whites.<\/li>\n<\/ol>\n<p>  <\/p><\/blockquote>\n<p>  We can therefore answer our <b>second question<\/b>:<\/p>\n<p>   \u2014 <b><i>Which race is statistically more prone to crime?<\/i><\/b><br \/>   \u2014 <b>Crimes committed by Blacks are three times more frequent than crimes committed by Whites.<\/b><\/p>\n<h2>Criminality and Lethal Force Fatalities<br \/>  <\/h2>\n<p>  We&#8217;ve now come to the most important part. Let&#8217;s see if we can answer the third question: <i>Can one say the police kills in proportion to the number of crimes?<\/i><\/p>\n<p>  The question boils down to looking at the correlation between our two datasets \u2014 use of force data (from the FENC database) and crime data (from the FBI database).<\/p>\n<p>  We start by routinely merging the two datasets into one:<\/p>\n<pre><code class=\"python\"># glue together the FENC and CRIMES dataframes df_uof_crimes = df_fenc_agg.join(df_crimes1, lsuffix='_uof', rsuffix='_cr') # we won't need the first 2 columns (absolute FENC values), so get rid of them df_uof_crimes = df_uof_crimes.loc[:, 'White_pop':'Black_promln_cr'] <\/code><\/pre>\n<p>  The resulting combined data:<\/p>\n<div class=\"scrollable-table\">\n<table border=\"1\">\n<thead>\n<tr>\n<th><\/th>\n<th>White_pop<\/th>\n<th>Black_pop<\/th>\n<th>White_promln_uof<\/th>\n<th>Black_promln_uof<\/th>\n<th>White_promln_cr<\/th>\n<th>Black_promln_cr<\/th>\n<\/tr>\n<tr>\n<th>Year<\/th>\n<th><\/th>\n<th><\/th>\n<th><\/th>\n<th><\/th>\n<th><\/th>\n<th><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<th>2000<\/th>\n<td>218756353<\/td>\n<td>35410436<\/td>\n<td>1.330247<\/td>\n<td>4.179559<\/td>\n<td>6115.058976<\/td>\n<td>17697.409882<\/td>\n<\/tr>\n<tr>\n<th>2001<\/th>\n<td>219843871<\/td>\n<td>35758783<\/td>\n<td>1.605685<\/td>\n<td>4.418495<\/td>\n<td>6829.701429<\/td>\n<td>20431.707645<\/td>\n<\/tr>\n<tr>\n<th>2002<\/th>\n<td>220931389<\/td>\n<td>36107130<\/td>\n<td>1.643044<\/td>\n<td>4.458953<\/td>\n<td>7282.333249<\/td>\n<td>20972.838329<\/td>\n<\/tr>\n<tr>\n<th>2003<\/th>\n<td>222018906<\/td>\n<td>36455476<\/td>\n<td>1.747599<\/td>\n<td>4.910099<\/td>\n<td>7857.691182<\/td>\n<td>22218.966500<\/td>\n<\/tr>\n<tr>\n<th>2004<\/th>\n<td>223106424<\/td>\n<td>36803823<\/td>\n<td>1.949742<\/td>\n<td>4.265861<\/td>\n<td>8826.576863<\/td>\n<td>26308.815799<\/td>\n<\/tr>\n<tr>\n<th>2005<\/th>\n<td>224193942<\/td>\n<td>37152170<\/td>\n<td>2.016112<\/td>\n<td>4.871855<\/td>\n<td>9713.826255<\/td>\n<td>30616.569637<\/td>\n<\/tr>\n<tr>\n<th>2006<\/th>\n<td>225281460<\/td>\n<td>37500517<\/td>\n<td>2.041890<\/td>\n<td>5.653255<\/td>\n<td>10252.894313<\/td>\n<td>33189.382429<\/td>\n<\/tr>\n<tr>\n<th>2007<\/th>\n<td>226368978<\/td>\n<td>37848864<\/td>\n<td>1.983487<\/td>\n<td>5.786171<\/td>\n<td>10566.527362<\/td>\n<td>34100.495064<\/td>\n<\/tr>\n<tr>\n<th>2008<\/th>\n<td>227456495<\/td>\n<td>38197211<\/td>\n<td>1.943229<\/td>\n<td>5.576323<\/td>\n<td>10580.520024<\/td>\n<td>34052.276749<\/td>\n<\/tr>\n<tr>\n<th>2009<\/th>\n<td>228544013<\/td>\n<td>38545558<\/td>\n<td>2.091501<\/td>\n<td>6.459888<\/td>\n<td>10889.263592<\/td>\n<td>33954.651792<\/td>\n<\/tr>\n<tr>\n<th>2010<\/th>\n<td>229397472<\/td>\n<td>38874625<\/td>\n<td>2.205778<\/td>\n<td>5.633495<\/td>\n<td>10977.017218<\/td>\n<td>33884.236826<\/td>\n<\/tr>\n<tr>\n<th>2011<\/th>\n<td>230838975<\/td>\n<td>39189528<\/td>\n<td>2.499578<\/td>\n<td>7.399936<\/td>\n<td>11035.346176<\/td>\n<td>32946.454471<\/td>\n<\/tr>\n<tr>\n<th>2012<\/th>\n<td>231992377<\/td>\n<td>39623138<\/td>\n<td>2.724227<\/td>\n<td>7.621809<\/td>\n<td>11562.836825<\/td>\n<td>33150.706035<\/td>\n<\/tr>\n<tr>\n<th>2013<\/th>\n<td>232969901<\/td>\n<td>39919371<\/td>\n<td>2.974633<\/td>\n<td>7.765653<\/td>\n<td>11211.113491<\/td>\n<td>32207.571607<\/td>\n<\/tr>\n<tr>\n<th>2014<\/th>\n<td>233963128<\/td>\n<td>40379066<\/td>\n<td>3.009021<\/td>\n<td>6.538041<\/td>\n<td>11227.354594<\/td>\n<td>31517.346141<\/td>\n<\/tr>\n<tr>\n<th>2015<\/th>\n<td>234940100<\/td>\n<td>40695277<\/td>\n<td>3.102919<\/td>\n<td>6.683822<\/td>\n<td>11564.786088<\/td>\n<td>31764.865490<\/td>\n<\/tr>\n<tr>\n<th>2016<\/th>\n<td>234644039<\/td>\n<td>40893369<\/td>\n<td>3.081263<\/td>\n<td>6.578084<\/td>\n<td>12193.026562<\/td>\n<td>33186.064958<\/td>\n<\/tr>\n<tr>\n<th>2017<\/th>\n<td>235507457<\/td>\n<td>41393491<\/td>\n<td>3.154889<\/td>\n<td>6.401973<\/td>\n<td>12656.261666<\/td>\n<td>34900.390499<\/td>\n<\/tr>\n<tr>\n<th>2018<\/th>\n<td>236173020<\/td>\n<td>41617764<\/td>\n<td>3.281493<\/td>\n<td>6.367473<\/td>\n<td>13180.171893<\/td>\n<td>37805.202605<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>  Let me refresh you memory on the individual columns here:<\/p>\n<ol>\n<li><b>White_pop<\/b> \u2014 White population<\/li>\n<li><b>Black_pop<\/b> \u2014 Black population<\/li>\n<li><b>White_promln_uof<\/b> \u2014 White lethal force victims per 1 million Whites<\/li>\n<li><b>Black_promln_uof<\/b> \u2014 Black lethal force victims per 1 million Blacks<\/li>\n<li><b>White_promln_cr<\/b> \u2014 Number of crimes committed by Whites per 1 million Whites<\/li>\n<li><b>Black_promln_cr<\/b> \u2014 Number of crimes committed by Blacks per 1 million Blacks<\/li>\n<\/ol>\n<p>  We next want to see how the police victim and crime curves compare on one plot. For Whites:<\/p>\n<pre><code class=\"python\">plt = df_uof_crimes['White_promln_cr'].plot(xticks=df_uof_crimes.index, legend=True) plt.set_ylabel('Number of White offenses per 1 mln. within race') plt2 = df_uof_crimes['White_promln_uof'].plot(xticks=df_uof_crimes.index, legend=True, secondary_y=True, style='g') plt2.set_ylabel('Number of White UOF victims per 1 mln. within race', rotation=90) plt2.set_xlabel('') plt.set_xlabel('') plt.set_xticklabels(df_uof_crimes.index, rotation='vertical') <\/code><\/pre>\n<p>  <a href=\"https:\/\/habrastorage.org\/webt\/cg\/qy\/bi\/cgqybi1swb60nc9l20nyws-7au0.jpeg\" rel=\"nofollow\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/ej\/o9\/3p\/ejo93prco24ebx1bjnbwtou3ufc.jpeg\" data-src=\"https:\/\/habrastorage.org\/webt\/ej\/o9\/3p\/ejo93prco24ebx1bjnbwtou3ufc.jpeg\" data-blurred=\"true\"\/><\/a><\/p>\n<p>  The same on a scatter plot:<\/p>\n<pre><code class=\"python\">plt = df_uof_crimes.plot.scatter(x='White_promln_cr', y='White_promln_uof') plt.set_xlabel('Number of White offenses per 1 mln. within race') plt.set_ylabel('Number of White UOF victims per 1 mln. within race') <\/code><\/pre>\n<p>  <a href=\"https:\/\/habrastorage.org\/webt\/mo\/me\/oi\/momeoiwaxj_fqy4mzostuzvnons.jpeg\" rel=\"nofollow\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/7v\/te\/xr\/7vtexrhcpkjvj4i-r-xsetaggys.jpeg\" data-src=\"https:\/\/habrastorage.org\/webt\/7v\/te\/xr\/7vtexrhcpkjvj4i-r-xsetaggys.jpeg\" data-blurred=\"true\"\/><\/a><\/p>\n<p>  A quick look at the graphs shows that some correlation is present. OK, now for Blacks:<\/p>\n<pre><code class=\"python\">plt = df_uof_crimes['Black_promln_cr'].plot(xticks=df_uof_crimes.index, legend=True) plt.set_ylabel('Number of Black offenses per 1 mln. within race') plt2 = df_uof_crimes['Black_promln_uof'].plot(xticks=df_uof_crimes.index, legend=True, secondary_y=True, style='g') plt2.set_ylabel('Number of Black UOF victims per 1 mln. within race', rotation=90) plt2.set_xlabel('') plt.set_xlabel('') plt.set_xticklabels(df_uof_crimes.index, rotation='vertical') <\/code><\/pre>\n<p>  <a href=\"https:\/\/habrastorage.org\/webt\/8n\/lo\/pw\/8nlopwra5t46nofeennonmaht1e.jpeg\" rel=\"nofollow\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/_u\/zw\/39\/_uzw399-jtjjyjjbljthcesgu8a.jpeg\" data-src=\"https:\/\/habrastorage.org\/webt\/_u\/zw\/39\/_uzw399-jtjjyjjbljthcesgu8a.jpeg\" data-blurred=\"true\"\/><\/a><\/p>\n<p>  And on a scatter plot:<\/p>\n<pre><code class=\"python\">plt = df_uof_crimes.plot.scatter(x='Black_promln_cr', y='Black_promln_uof') plt.set_xlabel('Number of Black offenses per 1 mln. within race') plt.set_ylabel('Number of Black UOF victims per 1 mln. within race') <\/code><\/pre>\n<p>  <a href=\"https:\/\/habrastorage.org\/webt\/p1\/ux\/wd\/p1uxwdjmgslydeoxtsy5htak9zm.jpeg\" rel=\"nofollow\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/86\/8k\/rp\/868krp7-epf26_lqm4xo1eqv9_8.jpeg\" data-src=\"https:\/\/habrastorage.org\/webt\/86\/8k\/rp\/868krp7-epf26_lqm4xo1eqv9_8.jpeg\" data-blurred=\"true\"\/><\/a><\/p>\n<p>  Things are much worse here: the two trends duck and bob a lot, though the principle correlation is still visible, the proportion is positive, if non-linear.<\/p>\n<p>  We will make use of statistical methods to quantify these correlations, making correlation matrices estimated with the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Pearson_correlation_coefficient\" rel=\"nofollow\">Pearson correlation coefficient<\/a>:<\/p>\n<pre><code class=\"python\">df_corr = df_uof_crimes.loc[:, ['White_promln_cr', 'White_promln_uof',                           'Black_promln_cr', 'Black_promln_uof']].corr(method='pearson') df_corr.style.background_gradient(cmap='PuBu') <\/code><\/pre>\n<p>  We get this table:  <\/p>\n<div class=\"scrollable-table\">\n<table>\n<thead>\n<tr>\n<th><\/th>\n<th>White_promln_cr<\/th>\n<th>White_promln_uof<\/th>\n<th>Black_promln_cr<\/th>\n<th>Black_promln_uof<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<th>White_promln_cr<\/th>\n<td>1.000000<\/td>\n<td>0.885470<\/td>\n<td>0.949909<\/td>\n<td>0.802529<\/td>\n<\/tr>\n<tr>\n<th>White_promln_uof<\/th>\n<td><b>0.885470<\/b><\/td>\n<td>1.000000<\/td>\n<td>0.710052<\/td>\n<td>0.795486<\/td>\n<\/tr>\n<tr>\n<th>Black_promln_cr<\/th>\n<td>0.949909<\/td>\n<td>0.710052<\/td>\n<td>1.000000<\/td>\n<td><b>0.722170<\/b><\/td>\n<\/tr>\n<tr>\n<th>Black_promln_uof<\/th>\n<td>0.802529<\/td>\n<td>0.795486<\/td>\n<td>0.722170<\/td>\n<td>1.000000<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>  The correlation coefficients for both races are in bold: it is <b>0.885<\/b> for Whites and <b>0.722<\/b> for Blacks. Thus a positive correlation between lethal force victims and criminality is observed for both races, but it is more prominent for Whites (probably significant) and nears non-significant for Blacks. The latter result is, of course, due to the higher data heterogeneity (scatter) for Black crimes and police victims.<\/p>\n<p>  As a final step, let&#8217;s try to estimate the probability of Black and White offenders to get shot by the police. We have no direct ways to do that, since we don&#8217;t have information on the criminality of the lethal force victims (who of them was found to be an offender and who was judicially clear). So we can only take the easy path and divide the per capita victim counts by the per capita crime counts for each race and multiply by 100 to show percentage values.<\/p>\n<pre><code class=\"python\"># let's look at the aggregate data (with individual year observations collapsed) df_uof_crimes_agg = df_uof_crimes.loc[:, ['White_promln_cr', 'White_promln_uof',                   'Black_promln_cr', 'Black_promln_uof']].agg(['mean', 'sum', 'min', 'max']) # now calculate the percentage of fatal encounters from the total crime count in each race df_uof_crimes_agg['White_uof_cr'] = df_uof_crimes_agg['White_promln_uof'] * 100. \/                   df_uof_crimes_agg['White_promln_cr'] df_uof_crimes_agg['Black_uof_cr'] = df_uof_crimes_agg['Black_promln_uof'] * 100. \/                   df_uof_crimes_agg['Black_promln_cr'] <\/code><\/pre>\n<p>  We get this table:<\/p>\n<div class=\"scrollable-table\">\n<table border=\"1\">\n<thead>\n<tr>\n<th><\/th>\n<th>White_promln_cr<\/th>\n<th>White_promln_uof<\/th>\n<th>Black_promln_cr<\/th>\n<th>Black_promln_uof<\/th>\n<th>White_uof_cr<\/th>\n<th>Black_uof_cr<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<th>mean<\/th>\n<td>10238.016198<\/td>\n<td>2.336123<\/td>\n<td>30258.208024<\/td>\n<td>5.872145<\/td>\n<td><b>0.022818<\/b><\/td>\n<td><b>0.019407<\/b><\/td>\n<\/tr>\n<tr>\n<th>sum<\/th>\n<td>194522.307758<\/td>\n<td>44.386338<\/td>\n<td>574905.952459<\/td>\n<td>111.570747<\/td>\n<td>0.022818<\/td>\n<td>0.019407<\/td>\n<\/tr>\n<tr>\n<th>min<\/th>\n<td>6115.058976<\/td>\n<td>1.330247<\/td>\n<td>17697.409882<\/td>\n<td>4.179559<\/td>\n<td>0.021754<\/td>\n<td>0.023617<\/td>\n<\/tr>\n<tr>\n<th>max<\/th>\n<td>13180.171893<\/td>\n<td>3.281493<\/td>\n<td>37805.202605<\/td>\n<td>7.765653<\/td>\n<td>0.024897<\/td>\n<td>0.020541<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>  Let&#8217;s show the means (in bold above) as a bar chart:<\/p>\n<pre><code class=\"python\">plt = df_uof_crimes_agg.loc['mean', ['White_uof_cr', 'Black_uof_cr']].plot.bar(color=['g', 'olive']) plt.set_ylabel('Ratio of UOF victims to offense count') plt.set_xticklabels(['White', 'Black'], rotation=0) <\/code><\/pre>\n<p>  <a href=\"https:\/\/habrastorage.org\/webt\/hd\/5-\/zv\/hd5-zv09i0hrarnffxhubplhmtm.jpeg\" rel=\"nofollow\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/c9\/-_\/vf\/c9-_vffsh6nmh83tohvd1odwv9a.jpeg\" data-src=\"https:\/\/habrastorage.org\/webt\/c9\/-_\/vf\/c9-_vffsh6nmh83tohvd1odwv9a.jpeg\" data-blurred=\"true\"\/><\/a><\/p>\n<p>  Looking at this chart, you can see that the probability of a White offender to be shot dead by the police is somewhat higher than that of a Black offender. This estimate is certainly quite tentative, but it can give at least some idea.<\/p>\n<p>  <b>Intermediate conclusions<\/b>:  <\/p>\n<blockquote>\n<ol>\n<li>Fatal encounters with law enforcement <i>are connected<\/i> with criminality (number of offenses committed). The correlation though differs between the two races: for Whites, it is almost perfect, for Blacks \u2014 far from perfect.<\/li>\n<li>Looking at the combined police victim \/ crime charts, it becomes obvious that lethal force victims grow &#8216;in reply to&#8217; criminality growth, generally with a few years&#8217; lag (this is more conspicuous in the Black data). This phenomenon chimes in with the reasonable notion that the authorities &#8216;react&#8217; on criminality (more crimes > more impunity > more closeups with law enforcement > more lethal outcomes).<\/li>\n<li>White offenders tend to meet death from the police more frequently than Black offenders, although the difference is almost negligible.<\/li>\n<\/ol>\n<p>  <\/p><\/blockquote>\n<p>  Finally, the answer to our <b>third question<\/b>:<\/p>\n<p>   \u2014 <b><i>Can one say the police kills in proportion to the number of crimes?<\/i><\/b><br \/>   \u2014 <b>Yes, this proportion can be observed, though different between the two races: for Whites, it is almost perfect, for Blacks \u2014 far from perfect.<\/b><\/p>\n<p>  <b>In the <a href=\"https:\/\/habr.com\/ru\/post\/519640\/\">next (and final) part of the narrative<\/a>, we will look into the geographical distribution of the analyzed data across the states.<\/b><\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/519484\/\"> https:\/\/habr.com\/ru\/articles\/519484\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/2v\/ir\/52\/2vir52trvbe1yrjn1tb5bu3xdqa.jpeg\" alt=\"image\" data-src=\"https:\/\/habrastorage.org\/webt\/2v\/ir\/52\/2vir52trvbe1yrjn1tb5bu3xdqa.jpeg\" data-blurred=\"true\"\/><\/div>\n<p>  In the <a href=\"https:\/\/habr.com\/ru\/post\/519154\/\">previous part<\/a> of this article, I talked about the research background, goals, assumptions, source data, and used tools. Today, without further ado, let&#8217;s say together\u2026  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-402195","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/402195","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=402195"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/402195\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=402195"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=402195"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=402195"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}