The goal of chicagoDA is to facilitate access to the Cook County State
Attorney’s Office data published recently by the Cook County Government.
The package is named chicagoDA
as Chicago is the most famous city
within Cook County and thus will be more recognizable.
You can install the GitHub version of chicagoDA from GitHub with:
install.packages("devtools")
devtools::install_github('ian-flores/chicagoDA')
library(chicagoDA)
library(tidyverse)
The package only has one function which allows to extract all of the data available in the Cook County State Attorney’s Open Data Portal.
get_all_data('sentencing')
There are 4 datasets included in the package. All of them are filtered
for cases received by the State Attorney’s Office during 2019. If
you wish to extract cases from before or after 2019 you’ll need to use
the get_all_data()
function. This is given size constraints for
packages.
Datasets:
The intake data presented in this data reflects the cases brought in for review. Each row represents a potential defendant in a case.
The data frame intake
has 36,190 rows and 17 variables:
glimpse(intake)
#> Observations: 36,190
#> Variables: 17
#> $ case_id <chr> "129405877581", "129568427364", "1295684…
#> $ case_participant_id <chr> "1077995851303", "1079958749626", "10799…
#> $ received_date <dttm> 2019-01-05, 2019-01-01, 2019-01-01, 201…
#> $ offense_category <fct> UUW - Unlawful Use of Weapon, UUW - Unla…
#> $ participant_status <fct> Approved, Approved, Approved, Approved, …
#> $ age_at_incident <int> 31, 24, 20, 35, 42, 20, 30, 35, 31, NA, …
#> $ gender <fct> Male, Male, Male, Male, Male, Male, Male…
#> $ race <fct> Black, Black, Black, White [Hispanic or …
#> $ incident_begin_date <dttm> 2018-11-12, 2019-01-01, 2018-12-31, 201…
#> $ incident_end_date <dttm> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,…
#> $ law_enforcement_agency <fct> CHICAGO PD, CHICAGO PD, CHICAGO PD, CHIC…
#> $ unit <chr> "District 10 - Ogden", "District 3 - Gra…
#> $ incident_city <chr> "Chicago", "Chicago", "Chicago", "Chicag…
#> $ arrest_date <dttm> 2018-11-12 23:23:00, NA, 2018-12-31 22:…
#> $ felony_review_date <dttm> NA, 2019-01-01, 2019-01-01, 2019-01-01,…
#> $ felony_review_result <chr> "", "Approved", "Approved", "Continued I…
#> $ update_offense_category <chr> "Narcotics", "UUW - Unlawful Use of Weap…
You can access its documentation with the following command:
?intake
The Initiation results data presented here reflects all of the arrests that came through the door of the State’s Attorneys Office (SAO). An initiation is how an arrest turns into a “case” in the courts. Most cases are initiated through a process known as felony review, in which SAO attorneys make a decision whether or not to prosecute. Cases may also be indicted by a grand jury or, in narcotics cases, filed directly by law enforcement (labeled “BOND SET (Narcotics)” in this data). Included in this data set are the defendant counts by initiation and year. This data includes felony cases handled by the Criminal, Narcotics, and Special Prosecution Bureaus. It does not include information about cases processed through the Juvenile Justice and Civil Actions Bureaus.
The data frame initiation
has 73,029 rows and 27 variables:
glimpse(initiation)
#> Observations: 73,029
#> Variables: 27
#> $ case_id <chr> "129405877581", "129568427364", "129568…
#> $ case_participant_id <chr> "1077995851303", "1079958749626", "1079…
#> $ offense_category <chr> "UUW - Unlawful Use of Weapon", "UUW - …
#> $ primary_charge <chr> "true", "true", "false", "false", "fals…
#> $ charge_id <chr> "2529188058314", "2534063384335", "2534…
#> $ charge_version_id <chr> "576544933565", "577688601680", "577775…
#> $ charge_offense_title <chr> "[POSSESSION OF CONTROLLED SUBSTANCE WI…
#> $ chapter <chr> "720", "720", "720", "720", "720", "720…
#> $ act <chr> "570", "5", "5", "5", "5", "5", "5", "5…
#> $ section <chr> "401(c)(2)", "24-1.1(a)", "24-1.6(a)(1)…
#> $ class <chr> "1", "2", "4", "4", "4", "4", "4", "4",…
#> $ aoic <chr> "5096200", "0012309", "0017785", "00178…
#> $ event <chr> "Indictment", "Preliminary Hearing", "P…
#> $ event_date <dttm> 2019-06-06, 2019-01-15, 2019-02-01, 20…
#> $ age_at_incident <int> 31, 24, 20, 20, 20, 20, 20, 20, 20, 20,…
#> $ gender <chr> "Male", "Male", "Male", "Male", "Male",…
#> $ race <chr> "Black", "Black", "Black", "Black", "Bl…
#> $ incident_begin_date <dttm> 2018-11-12, 2019-01-01, 2018-12-31, 20…
#> $ incident_end_date <dttm> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA…
#> $ arrest_date <dttm> 2018-11-12 23:23:00, NA, 2018-12-31 22…
#> $ law_enforcement_agency <chr> "CHICAGO PD", "CHICAGO PD", "CHICAGO PD…
#> $ unit <chr> "District 10 - Ogden", "District 3 - Gr…
#> $ incident_city <chr> "Chicago", "Chicago", "Chicago", "Chica…
#> $ received_date <dttm> 2019-01-05, 2019-01-01, 2019-01-01, 20…
#> $ arraignment_date <dttm> 2019-06-20, NA, 2019-02-06, 2019-02-06…
#> $ updated_offense_category <chr> "Narcotics", "UUW - Unlawful Use of Wea…
#> $ charge_count <int> 1, 1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, …
You can access its documentation with the following command:
?initiation
The disposition data presented in this data reflects the culmination of the fact-finding process that leads to the resolution of a case. Each row represents a charge that has been disposed of.
The data frame dispositions
has 20,234 rows and 31 variables:
glimpse(dispositions)
#> Observations: 20,234
#> Variables: 31
#> $ case_id <chr> "129568558770", "129568602572"…
#> $ case_participant_id <chr> "1079960508495", "107996062575…
#> $ offense_category <chr> "UUW - Unlawful Use of Weapon"…
#> $ primary_charge <chr> "true", "false", "false", "fal…
#> $ charge_id <chr> "2534066046185", "253616654153…
#> $ charge_version_id <chr> "577689205836", "578179378084"…
#> $ disposition_charged_offense_title <chr> "RECKLESS DISCHARGE OF A FIREA…
#> $ disposition_charged_chapter <chr> "720", "720", "720", "720", "7…
#> $ disposition_charged_act <chr> "5", "5", "5", "5", "5", "5", …
#> $ disposition_charged_section <chr> "24-1.5(a)", "24-1.1(a)", "24-…
#> $ disposition_charged_class <chr> "4", "2", "2", "2", "2", "2", …
#> $ disposition_charged_aoic <chr> "0010322", "0012309", "0012310…
#> $ disposition_date <chr> "4/8/2019 12:00:00 AM", "8/5/2…
#> $ charge_disposition <chr> "Plea Of Guilty", "Nolle Prose…
#> $ charge_disposition_reason <chr> "", "PG to Other Count/s", "PG…
#> $ judge <chr> "Thaddeus L Wilson", "Thaddeus…
#> $ court_name <chr> "District 1 - Chicago", "Distr…
#> $ court_facility <chr> "26TH Street", "26TH Street", …
#> $ age_at_incident <int> 42, 20, 20, 20, 20, 20, 20, 20…
#> $ gender <chr> "Male", "Male", "Male", "Male"…
#> $ race <chr> "Black", "White [Hispanic or L…
#> $ incident_begin_date <dttm> 2018-12-31, 2019-01-01, 2019-…
#> $ incident_end_date <dttm> NA, NA, NA, NA, NA, NA, NA, N…
#> $ arrest_date <dttm> 2018-12-31 22:55:00, 2018-12-…
#> $ law_enforcement_agency <chr> "CHICAGO PD", "CHICAGO PD", "C…
#> $ unit <chr> "District 10 - Ogden", "Distri…
#> $ incident_city <chr> "Chicago", "Chicago", "Chicago…
#> $ received_date <dttm> 2019-01-01, 2019-01-01, 2019-…
#> $ arraignment_date <dttm> 2019-02-05, 2019-02-07, 2019-…
#> $ updated_offense_category <chr> "Reckless Discharge of Firearm…
#> $ charge_count <int> 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,…
You can access its documentation with the following command:
?dispositions
The sentencing data presented in this report reflects the judgment imposed by the court on people that have been found guilty. Each row represents a charge that has been sentenced.
The data frame sentencing
has 4,329 rows and 39 variables:
glimpse(sentencing)
#> Observations: 4,329
#> Variables: 39
#> $ case_id <chr> "129568558770", "129568602572"…
#> $ case_participant_id <chr> "1079960508495", "107996062575…
#> $ offense_category <chr> "UUW - Unlawful Use of Weapon"…
#> $ primary_charge <chr> "true", "false", "false", "fal…
#> $ charge_id <chr> "2534066046185", "253621741244…
#> $ charge_version_id <chr> "577689205836", "578191662598"…
#> $ disposition_charged_offense_title <chr> "RECKLESS DISCHARGE OF A FIREA…
#> $ disposition_charged_chapter <chr> "720", "720", "720", "720", "7…
#> $ disposition_charged_act <chr> "5", "5", "5", "5", "5", "5", …
#> $ disposition_charged_section <chr> "24-1.5(a)", "24-1.8(a)(1)", "…
#> $ disposition_charged_class <chr> "4", "2", "4", "A", "4", "4", …
#> $ disposition_charged_aoic <chr> "0010322", "0015061", "0010322…
#> $ disposition_date <chr> "4/8/2019 12:00:00 AM", "8/5/2…
#> $ charge_disposition <chr> "Plea Of Guilty", "Finding Gui…
#> $ charge_disposition_reason <chr> "", "", "", "", "", "", "", ""…
#> $ sentence_phase <chr> "Original Sentencing", "Origin…
#> $ sentence_date <chr> "4/8/2019 12:00:00 AM", "8/5/2…
#> $ sentence_judge <chr> "Thaddeus L Wilson", "Thaddeus…
#> $ sentence_type <chr> "Probation", "Prison", "Prison…
#> $ current_sentence <chr> "true", "true", "true", "true"…
#> $ commitment_type <chr> "Probation", "Illinois Departm…
#> $ commitment_term <chr> "2", "54", "1", "1", "1", "18"…
#> $ commitment_unit <chr> "Year(s)", "Months", "Year(s)"…
#> $ court_name <chr> "District 1 - Chicago", "Distr…
#> $ court_facility <chr> "26TH Street", "26TH Street", …
#> $ length_of_case_in_days <int> 62, 179, 291, 175, 92, 141, 21…
#> $ age_at_incident <int> 42, 20, 35, 55, 21, 34, 67, 31…
#> $ gender <fct> Male, Male, Male, Male, Male, …
#> $ race <fct> Black, White [Hispanic or Lati…
#> $ incident_begin_date <dttm> 2018-12-31, 2019-01-01, 2019-…
#> $ incident_end_date <dttm> NA, NA, NA, NA, NA, NA, NA, N…
#> $ arrest_date <dttm> 2018-12-31 22:55:00, 2018-12-…
#> $ law_enforcement_agency <fct> CHICAGO PD, CHICAGO PD, CHICAG…
#> $ unit <chr> "District 10 - Ogden", "Distri…
#> $ incident_city <chr> "Chicago", "Chicago", "Chicago…
#> $ received_date <dttm> 2019-01-01, 2019-01-01, 2019-…
#> $ arraignment_date <dttm> 2019-02-05, 2019-02-07, 2019-…
#> $ updated_offense_category <chr> "Reckless Discharge of Firearm…
#> $ charge_count <int> 1, 11, 5, 2, 1, 1, 1, 1, 4, 1,…
You can access its documentation with the following command:
?sentencing
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.