Source of data

Import and unzip

Convert to data frame and save it to disk

Clean data

Merge complaints

Summary of data

Interpretation

Visualize

Analysis of length of suit by nature of suit

The length of suit (days) was calculated by taking the difference between date_filed and date_terminated.

Analysis of length of suit by causes of action

The length of suit (days) was calculated by taking the difference between date_filed and date_terminated.

Source of more informaiton

More information is found in the variable, filepath_ia. See below for the number of cases for which filepath_ia is available. They are broken down by nature of suit.

Detailed Summary after filtering

##                                                     resource_uri 
##  http://www.courtlistener.com/api/rest/v3/dockets/1048237/:   1  
##  http://www.courtlistener.com/api/rest/v3/dockets/4306438/:   1  
##  http://www.courtlistener.com/api/rest/v3/dockets/4306439/:   1  
##  http://www.courtlistener.com/api/rest/v3/dockets/4306441/:   1  
##  http://www.courtlistener.com/api/rest/v3/dockets/4306443/:   1  
##  http://www.courtlistener.com/api/rest/v3/dockets/4306444/:   1  
##  (Other)                                                  :3411  
##                                                   court     
##  http://www.courtlistener.com/api/rest/v3/courts/nhd/:3417  
##                                                             
##                                                             
##                                                             
##                                                             
##                                                             
##                                                             
##                                                        clusters   
##  http://www.courtlistener.com/api/rest/v3/clusters/1512506/:   1  
##  NA's                                                      :3416  
##                                                                   
##                                                                   
##                                                                   
##                                                                   
##                                                                   
##                                                 absolute_url  source  
##  /docket/1048237/united-states-v-upton/               :   1   0:   1  
##  /docket/4306438/united-states-v-taillon/             :   1   1:3416  
##  /docket/4306439/united-states-v-taza/                :   1           
##  /docket/4306441/gilroy-v-letterman/                  :   1           
##  /docket/4306443/onebeacon-insurance-company-v-oneill/:   1           
##  /docket/4306444/longval-v-wal-mart-stores-inc/       :   1           
##  (Other)                                              :3411           
##                       date_created                      date_modified 
##  2014-10-30T13:59:14.035519Z:   1   2017-08-08T19:34:02.530961Z:   1  
##  2016-08-21T12:02:13.162519Z:   1   2017-08-25T20:47:53.351977Z:   1  
##  2016-08-21T12:02:13.855924Z:   1   2017-08-08T19:48:21.890533Z:   1  
##  2016-08-21T12:02:18.604267Z:   1   2017-06-04T21:58:29.304410Z:   1  
##  2016-08-21T12:02:18.803544Z:   1   2017-02-19T18:56:41.686532Z:   1  
##  2016-08-21T12:02:19.037892Z:   1   2017-02-19T18:56:42.041227Z:   1  
##  (Other)                    :3411   (Other)                    :3411  
##  case_name_short                     case_name    case_name_full
##          : 640   United States v. Brown   :  15   :3417         
##  Brown   :  23   United States v. Smith   :  11                 
##  Amatucci:  12   United States v. Gonzalez:  10                 
##  Gonzalez:  11   United States v. Nguyen  :   9                 
##  Coleman :  11   United States v. Williams:   8                 
##  McCarthy:  10   United States v. Diaz    :   7                 
##  (Other) :2710   (Other)                  :3357                 
##                        slug                      docket_number 
##  united-states-v-brown   :  15   1:02-cr-00153-SM       :   2  
##  united-states-v-smith   :  11   1:12-cr-00051-JD       :   2  
##  united-states-v-gonzalez:  10   1:14-cr-00073          :   2  
##  united-states-v-nguyen  :   9   1:12-cr-00033-PB       :   2  
##  united-states-v-williams:   8   1:15-cr-00211          :   2  
##  united-states-v-diaz    :   7   Crim. No. 80-00028-01-D:   1  
##  (Other)                 :3357   (Other)                :3406  
##   blocked                           assigned_to_str
##  FALSE:3414                                 :3116  
##  TRUE :   3   Judge Paul J. Barbadoro       :  63  
##               Chief Judge Joseph N. Laplante:  54  
##               Judge Steven J. McAuliffe     :  38  
##               Judge Landya B. McCafferty    :  38  
##               Judge Joseph A. DiClerico, Jr :  26  
##               (Other)                       :  82  
##                               referred_to_str pacer_case_id 
##                                       :3415          :   1  
##  Magistrate Judge Landya B. McCafferty:   1   2603   :   1  
##  Magistrate Judge Andrea K. Johnstone :   1   26226  :   1  
##                                               26588  :   1  
##                                               26851  :   1  
##                                               27160  :   1  
##                                               (Other):3411  
##                                                 cause     
##                                                    :1604  
##  42:1983 Civil Rights Act                          : 187  
##  28:1332 Diversity-Personal Injury                 :  84  
##  28:1332 Diversity-Breach of Contract              :  77  
##  28:1441  Petition for Removal - Employment Discrim:  71  
##  28:1331 Federal Question: Other Civil Rights      :  70  
##  (Other)                                           :1324  
##              nature_of_suit    jury_demand  
##                     :1605            :3191  
##  Civil Rights: Other: 329   Plaintiff: 108  
##  Contract: Other    : 237   Defendant:  10  
##  Civil Rights: Jobs : 181   Both     :  63  
##  P.I.: Other        : 155   None     :  45  
##  Insurance          : 102                   
##  (Other)            : 808                   
##                  jurisdiction_type
##                           :3191   
##  Federal Question         :  98   
##  Diversity                : 103   
##  U.S. Government Plaintiff:  12   
##  U.S. Government Defendant:  13   
##                                   
##                                   
##                                                                                     filepath_ia  
##                                                                                           :3089  
##  https://www.archive.org/download/gov.uscourts.nhd.2603/gov.uscourts.nhd.2603.docket.xml  :   1  
##  https://www.archive.org/download/gov.uscourts.nhd.26226/gov.uscourts.nhd.26226.docket.xml:   1  
##  https://www.archive.org/download/gov.uscourts.nhd.26588/gov.uscourts.nhd.26588.docket.xml:   1  
##  https://www.archive.org/download/gov.uscourts.nhd.26851/gov.uscourts.nhd.26851.docket.xml:   1  
##  https://www.archive.org/download/gov.uscourts.nhd.27160/gov.uscourts.nhd.27160.docket.xml:   1  
##  (Other)                                                                                  : 323  
##      date_blocked    date_filed           year_filed  
##  2017-02-27:   1   Min.   :2001-06-05   Min.   :2001  
##  2017-07-11:   1   1st Qu.:2010-04-14   1st Qu.:2010  
##  2018-01-18:   1   Median :2013-12-11   Median :2013  
##  NA's      :3414   Mean   :2012-08-30   Mean   :2012  
##                    3rd Qu.:2015-12-02   3rd Qu.:2015  
##                    Max.   :2017-12-21   Max.   :2017  
##                    NA's   :3045         NA's   :3045  
##  date_terminated        date_last_filing
##  Min.   :2001-09-26   2010-03-30:   1   
##  1st Qu.:2009-10-14   2008-09-09:   1   
##  Median :2013-06-05   2006-08-30:   1   
##  Mean   :2012-08-23   2010-04-09:   1   
##  3rd Qu.:2015-11-06   2009-03-20:   1   
##  Max.   :2017-12-29   (Other)   :  54   
##  NA's   :3177         NA's      :3358   
##                                                                               filepath_local
##  /var/www/courtlistener/cl/../cl/assets/media/recap/gov.uscourts.nhd.2603.docket.xml :   1  
##  /var/www/courtlistener/cl/../cl/assets/media/recap/gov.uscourts.nhd.26226.docket.xml:   1  
##  /var/www/courtlistener/cl/../cl/assets/media/recap/gov.uscourts.nhd.26588.docket.xml:   1  
##  /var/www/courtlistener/cl/../cl/assets/media/recap/gov.uscourts.nhd.26851.docket.xml:   1  
##  /var/www/courtlistener/cl/../cl/assets/media/recap/gov.uscourts.nhd.27160.docket.xml:   1  
##  (Other)                                                                             : 323  
##  NA's                                                                                :3089  
##                                                 assigned_to  
##  http://www.courtlistener.com/api/rest/v3/people/2097/:  47  
##  http://www.courtlistener.com/api/rest/v3/people/875/ :  28  
##  http://www.courtlistener.com/api/rest/v3/people/164/ :  72  
##  http://www.courtlistener.com/api/rest/v3/people/1856/:  67  
##  http://www.courtlistener.com/api/rest/v3/people/2100/:  58  
##  NA's                                                 :3145  
##                                                              
##                                                 referred_to  
##  http://www.courtlistener.com/api/rest/v3/people/2100/:   1  
##  NA's                                                 :3416  
##                                                              
##                                                              
##                                                              
##                                                              
##                                                              
##                     date_last_index
##  2018-01-12T08:15:25.347213Z:   1  
##  2018-01-09T02:14:03.476706Z:   1  
##  2018-01-16T06:40:22.781512Z:   1  
##  2018-01-23T23:03:02.087364Z:   1  
##  2018-01-18T20:02:05.090168Z:   1  
##  (Other)                    :  31  
##  NA's                       :3381  
##                                               tags       lengthOfsuit   
##  http://www.courtlistener.com/api/rest/v3/tag/1/:   3   Min.   :   0.0  
##  NA's                                           :3414   1st Qu.: 121.5  
##                                                         Median : 287.0  
##                                                         Mean   : 393.6  
##                                                         3rd Qu.: 536.0  
##                                                         Max.   :3209.0  
##                                                         NA's   :3177

Detailed Summary before filtering

##                                                     resource_uri 
##  http://www.courtlistener.com/api/rest/v3/dockets/1000788/:   1  
##  http://www.courtlistener.com/api/rest/v3/dockets/1048237/:   1  
##  http://www.courtlistener.com/api/rest/v3/dockets/4306435/:   1  
##  http://www.courtlistener.com/api/rest/v3/dockets/4306436/:   1  
##  http://www.courtlistener.com/api/rest/v3/dockets/4306437/:   1  
##  http://www.courtlistener.com/api/rest/v3/dockets/4306438/:   1  
##  (Other)                                                  :5656  
##                                                   court     
##  http://www.courtlistener.com/api/rest/v3/courts/nhd/:5662  
##                                                             
##                                                             
##                                                             
##                                                             
##                                                             
##                                                             
##                                                        clusters   
##  http://www.courtlistener.com/api/rest/v3/clusters/1443231/:   1  
##  http://www.courtlistener.com/api/rest/v3/clusters/1512506/:   1  
##  http://www.courtlistener.com/api/rest/v3/clusters/1444740/:   0  
##  http://www.courtlistener.com/api/rest/v3/clusters/1446115/:   0  
##  http://www.courtlistener.com/api/rest/v3/clusters/1446162/:   0  
##  (Other)                                                   :   0  
##  NA's                                                      :5660  
##                                                     absolute_url  source  
##  /docket/1000788/grappone-inc-v-subaru-of-new-england-inc/:   1   0:   2  
##  /docket/1048237/united-states-v-upton/                   :   1   1:5660  
##  /docket/4306435/united-states-v-renna/                   :   1           
##  /docket/4306436/united-states-v-peele/                   :   1           
##  /docket/4306437/united-states-v-hill/                    :   1           
##  /docket/4306438/united-states-v-taillon/                 :   1           
##  (Other)                                                  :5656           
##                       date_created                      date_modified 
##  2014-10-30T13:41:29.858749Z:   1   2014-10-30T13:41:29.858749Z:   1  
##  2014-10-30T13:59:14.035519Z:   1   2017-08-08T19:34:02.530961Z:   1  
##  2016-08-21T12:02:12.043449Z:   1   2017-08-08T19:35:14.129860Z:   1  
##  2016-08-21T12:02:12.107810Z:   1   2017-08-08T19:35:20.145869Z:   1  
##  2016-08-21T12:02:12.554237Z:   1   2017-08-08T19:36:15.726411Z:   1  
##  2016-08-21T12:02:13.162519Z:   1   2017-08-25T20:47:53.351977Z:   1  
##  (Other)                    :5656   (Other)                    :5656  
##  case_name_short                               case_name    case_name_full
##          : 952   United States v. Brown             :  16   :5662         
##  Brown   :  40   United States v. Smith             :  11                 
##  Hall    :  24   United States v. Gonzalez          :  10                 
##  Levesque:  20   United States v. Nguyen            :   9                 
##  Blackmer:  17   United States v. Williams          :   8                 
##  Griffin :  17   Chambers v. NH State Prison, Warden:   7                 
##  (Other) :4592   (Other)                            :5601                 
##                                 slug                docket_number 
##  united-states-v-brown            :  16   1:02-cr-00153-SM :   2  
##  united-states-v-smith            :  11   1:12-cr-00051-JD :   2  
##  united-states-v-gonzalez         :  10   1:14-cr-00073    :   2  
##  united-states-v-nguyen           :   9   1:12-cr-00033-PB :   2  
##  united-states-v-williams         :   8   1:15-cr-00211    :   2  
##  chambers-v-nh-state-prison-warden:   7   Civ. No. 74-119-D:   1  
##  (Other)                          :5601   (Other)          :5651  
##   blocked                           assigned_to_str
##  FALSE:5659                                 :5276  
##  TRUE :   3   Judge Paul J. Barbadoro       :  85  
##               Chief Judge Joseph N. Laplante:  64  
##               Judge Steven J. McAuliffe     :  55  
##               Judge Landya B. McCafferty    :  45  
##               (Other)                       : 136  
##               NA's                          :   1  
##                               referred_to_str pacer_case_id 
##                                       :5656          :   1  
##  Magistrate Judge Landya B. McCafferty:   3   16550  :   1  
##  Magistrate Judge Andrea K. Johnstone :   2   25201  :   1  
##  NA's                                 :   1   25242  :   1  
##                                               2603   :   1  
##                                               (Other):5656  
##                                               NA's   :   1  
##                                                 cause     
##                                                    :1612  
##  42:1983 Prisoner Civil Rights                     : 456  
##  42:405 Review of HHS Decision (DIWC)              : 275  
##  28:2254 Petition for Writ of Habeas Corpus (State): 266  
##  42:1983 Civil Rights Act                          : 236  
##  (Other)                                           :2816  
##  NA's                                              :   1  
##                     nature_of_suit    jury_demand  
##                            :1615            :5351  
##  Prisoner: Civil Rights    : 432   Plaintiff: 138  
##  Habeas Corpus (General)   : 347   Defendant:  15  
##  Civil Rights: Other       : 344   Both     :  74  
##  Social Security: DIWC/DIWW: 319   None     :  83  
##  (Other)                   :2604   NA's     :   1  
##  NA's                      :   1                   
##                  jurisdiction_type
##                           :5351   
##  Federal Question         : 149   
##  Diversity                : 114   
##  U.S. Government Plaintiff:  20   
##  U.S. Government Defendant:  27   
##  NA's                     :   1   
##                                   
##                                                                                     filepath_ia  
##                                                                                           :5194  
##  https://www.archive.org/download/gov.uscourts.nhd.16550/gov.uscourts.nhd.16550.docket.xml:   1  
##  https://www.archive.org/download/gov.uscourts.nhd.25202/gov.uscourts.nhd.25202.docket.xml:   1  
##  https://www.archive.org/download/gov.uscourts.nhd.25239/gov.uscourts.nhd.25239.docket.xml:   1  
##  https://www.archive.org/download/gov.uscourts.nhd.2603/gov.uscourts.nhd.2603.docket.xml  :   1  
##  (Other)                                                                                  : 463  
##  NA's                                                                                     :   1  
##      date_blocked       date_filed     year_filed     date_terminated
##  2016-03-23:   0   2006-01-18:   3   Min.   :1991   2007-02-13:   3  
##  2013-10-30:   0   2016-03-22:   3   1st Qu.:2007   2015-07-15:   3  
##  2017-02-27:   1   2016-04-06:   3   Median :2013   2006-03-17:   2  
##  2017-07-11:   1   2004-09-22:   2   Mean   :2011   2007-06-29:   2  
##  2018-01-18:   1   2005-06-06:   2   3rd Qu.:2015   2006-10-25:   2  
##  NA's      :5659   (Other)   : 500   Max.   :2018   (Other)   : 317  
##                    NA's      :5149   NA's   :5149   NA's      :5333  
##    date_last_filing
##  2010-03-30:   2   
##  2011-12-06:   2   
##  2017-02-06:   2   
##  2002-01-18:   1   
##  2011-03-09:   1   
##  (Other)   :  74   
##  NA's      :5580   
##                                                                               filepath_local
##  /var/www/courtlistener/cl/../cl/assets/media/recap/gov.uscourts.nhd.16550.docket.xml:   1  
##  /var/www/courtlistener/cl/../cl/assets/media/recap/gov.uscourts.nhd.25202.docket.xml:   1  
##  /var/www/courtlistener/cl/../cl/assets/media/recap/gov.uscourts.nhd.25239.docket.xml:   1  
##  /var/www/courtlistener/cl/../cl/assets/media/recap/gov.uscourts.nhd.2603.docket.xml :   1  
##  /var/www/courtlistener/cl/../cl/assets/media/recap/gov.uscourts.nhd.26226.docket.xml:   1  
##  (Other)                                                                             : 462  
##  NA's                                                                                :5195  
##                                                 assigned_to  
##  http://www.courtlistener.com/api/rest/v3/people/2097/:  64  
##  http://www.courtlistener.com/api/rest/v3/people/875/ :  39  
##  http://www.courtlistener.com/api/rest/v3/people/164/ :  95  
##  http://www.courtlistener.com/api/rest/v3/people/1856/:  79  
##  http://www.courtlistener.com/api/rest/v3/people/2100/:  72  
##  http://www.courtlistener.com/api/rest/v3/people/862/ :   2  
##  NA's                                                 :5311  
##                                                 referred_to  
##  http://www.courtlistener.com/api/rest/v3/people/2100/:   3  
##  NA's                                                 :5659  
##                                                              
##                                                              
##                                                              
##                                                              
##                                                              
##                     date_last_index
##  2018-01-30T12:27:10.201820Z:   1  
##  2018-01-12T08:15:25.347213Z:   1  
##  2018-01-09T02:14:03.476706Z:   1  
##  2018-01-16T06:40:22.781512Z:   1  
##  2018-01-23T23:03:02.087364Z:   1  
##  (Other)                    :  34  
##  NA's                       :5623  
##                                               tags     
##  http://www.courtlistener.com/api/rest/v3/tag/1/:   3  
##  NA's                                           :5659  
##                                                        
##                                                        
##                                                        
##                                                        
##